index.e9c1ff7f.js 15 KB

1
  1. import{d as C,r as f,bH as v,$ as A,c as e,q as u,aw as T,B as D,m as g,o as l,R as N,aj as R}from"./index.332c7f08.js";import{O as b}from"./index.d7c1b6ac.js";import{v as w}from"./toolsValidate.4388d7ee.js";import{C as E}from"./index.324108a5.js";import{C as i}from"./index.91135ff9.js";import{F as p}from"./index.1ed6273e.js";import{r as F,b as V,c as x,a as h,d as P}from"./date.d3980c9f.js";import{T as k,a as y}from"./index.7c580591.js";import"./use-tab-status.9d769af8.js";import"./index.1e2dfe6e.js";import"./index.4aa8e076.js";const G="_attendanceRules_176h5_1",M="_ruleContainer_176h5_6",S="_informationBottom_176h5_10",U="_ruleTitle_176h5_28",I="_smallRuleTitle_176h5_34",L="_ruleContent_176h5_37",q="_ruleMore_176h5_41",H="_red_176h5_44",O="_field_176h5_47",j="_unit_176h5_55",W="_active_176h5_85",$="_ruleRange_176h5_104",z="_ruleTips_176h5_109",J="_ruleDesc_176h5_122",K="_ruleExtra_176h5_131",Q="_popover_176h5_135",X="_flexDev_176h5_138";var t={attendanceRules:G,ruleContainer:M,informationBottom:S,ruleTitle:U,smallRuleTitle:I,ruleContent:L,ruleMore:q,red:H,field:O,unit:j,active:W,"field-m":"_field-m_176h5_89","field-w80":"_field-w80_176h5_92","field-w136":"_field-w136_176h5_95","field-w102":"_field-w102_176h5_98","field-w126":"_field-w126_176h5_101",ruleRange:$,ruleTips:z,ruleDesc:J,ruleExtra:K,popover:Q,flexDev:X},Y=C({name:"range-model",setup(){f({show1:!1,show2:!1});const s=v({}),n=f({}),m=async()=>{try{const{data:a}=await g.get("/api-school/schoolParamConfig/queryByParamNameList",{params:{paramNames:"scope_of_attendance,sign_in_attendance,sign_in_attendance_type,sign_out_attendance,sign_out_attendance_type"}});console.log(a,"data"),(a||[]).forEach(o=>{n[o.paramName]=o.paramValue}),s.value={...n}}catch{}},c=(a,_)=>{const o=[];for(const r in a)a[r]!=_[r]&&o.push({paramName:r,paramValue:_[r]});return o||[]},B=async()=>{if(!n.scope_of_attendance){l("\u8BF7\u8F93\u5165\u8003\u52E4\u5B9A\u4F4D\u8303\u56F4");return}if(!n.sign_in_attendance){l("\u8BF7\u8F93\u5165\u7B7E\u5230\u6263\u51CF\u91D1\u989D");return}if(n.sign_in_attendance>100&&n.sign_in_attendance_type==="PERCENTAGE"){l("\u7B7E\u5230\u6263\u51CF\u91D1\u989D\u8F93\u5165\u6709\u8BEF");return}if(!n.sign_out_attendance){l("\u8BF7\u8F93\u5165\u7B7E\u9000\u6263\u51CF\u91D1\u989D");return}if(n.sign_out_attendance>100&&n.sign_out_attendance_type==="PERCENTAGE"){l("\u7B7E\u9000\u6263\u51CF\u91D1\u989D\u8F93\u5165\u6709\u8BEF");return}try{const a=c(s.value,n);a.length>0&&await g.post("/api-school/schoolParamConfig/update",{hideLoading:!1,data:{configs:[...a],group:"ATTENDANCE"}}),setTimeout(()=>{l("\u4FDD\u5B58\u6210\u529F")},200)}catch{}};A(()=>{m()});const d=a=>a&&a>=0?w(a):"";return()=>e("div",{class:t.ruleContainer},[e(E,{inset:!0},{default:()=>[e(i,null,{title:()=>e("div",{class:t.ruleTitle},[u("\u8003\u52E4\u5B9A\u4F4D\u8303\u56F4")])}),e(i,null,{title:()=>e("div",{class:t.ruleContent,style:{display:"flex",alignItems:"center"}},[u("\u7B7E\u5230\u3001\u7B7E\u9000\u5730\u70B9\u987B\u5728\u5B66\u6821\u5B9A\u4F4D\u70B9"),e(p,{class:[t.field,t["field-m"],t["field-w80"]],autocomplete:"off",formatter:d,type:"number",modelValue:n.scope_of_attendance,"onUpdate:modelValue":a=>n.scope_of_attendance=a},{extra:()=>e("span",{class:t.ruleExtra},[u("\u7C73")])}),u("\u4EE5\u5185")])})]}),e(T,{to:"#app"},{default:()=>[e(b,{position:"bottom"},{default:()=>[e("div",{class:"btnGroup"},[e(D,{type:"primary",round:!0,block:!0,onClick:B},{default:()=>[u("\u4FDD\u5B58\u8BBE\u7F6E")]})])]})]})])}}),Z=C({name:"sigin-in-rule",setup(){f({show1:!1,show2:!1,show3:!1,show4:!1});const s=v({}),n=f({}),m=async()=>{try{const{data:a}=await g.get("/api-school/schoolParamConfig/queryByParamNameList",{params:{paramNames:"normal_sign_in_start,normal_sign_in_end,abnormal_sign_in,abnormal_sign_in_fee,abnormal_sign_in_fee_type,late_sign_in,late_sign_in_fee,late_sign_in_fee_type,absence_sign_in,absence_sign_in_fee,absence_sign_in_fee_type,not_sign_in_fee,not_sign_in_fee_type"}});console.log(a,"data"),(a||[]).forEach(o=>{n[o.paramName]=o.paramValue}),s.value={...n}}catch{}},c=(a,_)=>{const o=[];for(const r in a)a[r]!=_[r]&&o.push({paramName:r,paramValue:_[r]});return o||[]},B=async()=>{if(!n.normal_sign_in_start){l("\u8BF7\u8F93\u5165\u7B7E\u5230\u65F6\u95F4\u8303\u56F4");return}if(!n.normal_sign_in_end){l("\u8BF7\u8F93\u5165\u6B63\u5E38\u7B7E\u5230\u65F6\u95F4");return}if(console.log(n.normal_sign_in_end,n.normal_sign_in_start),n.normal_sign_in_end-n.normal_sign_in_start>0){console.log(!0),l("\u6B63\u5E38\u7B7E\u5230\u65F6\u95F4\u4E0D\u80FD\u5927\u4E8E\u7B7E\u5230\u65F6\u95F4\u8303\u56F4");return}if(!n.abnormal_sign_in_fee){l("\u8BF7\u8F93\u5165\u5F02\u5E38\u7B7E\u5230\u6263\u51CF\u91D1\u989D");return}if(n.abnormal_sign_in_fee>100&&n.abnormal_sign_in_fee_type==="PERCENTAGE"){l("\u5F02\u5E38\u7B7E\u5230\u6263\u51CF\u91D1\u989D\u8F93\u5165\u6709\u8BEF");return}if(!n.late_sign_in){l("\u8BF7\u8F93\u5165\u8FDF\u5230\u65F6\u95F4");return}if(!n.late_sign_in_fee){l("\u8BF7\u8F93\u5165\u8FDF\u5230\u6263\u51CF\u91D1\u989D");return}if(n.late_sign_in_fee>100&&n.late_sign_in_fee_type==="PERCENTAGE"){l("\u8FDF\u5230\u6263\u51CF\u91D1\u989D\u8F93\u5165\u6709\u8BEF");return}if(!n.absence_sign_in_fee){l("\u8BF7\u8F93\u5165\u65F7\u8BFE\u6263\u51CF\u91D1\u989D");return}if(n.absence_sign_in_fee>100&&n.absence_sign_in_fee_type==="PERCENTAGE"){l("\u65F7\u8BFE\u6263\u51CF\u91D1\u989D\u8F93\u5165\u6709\u8BEF");return}if(!n.not_sign_in_fee){l("\u8BF7\u8F93\u5165\u672A\u7B7E\u5230\u6263\u51CF\u91D1\u989D");return}if(n.not_sign_in_fee>100&&n.not_sign_in_fee_type==="PERCENTAGE"){l("\u672A\u7B7E\u5230\u6263\u51CF\u91D1\u989D\u8F93\u5165\u6709\u8BEF");return}try{const a=c(s.value,n);a.length>0&&(await g.post("/api-school/schoolParamConfig/update",{hideLoading:!1,data:{configs:[...a],group:"ATTENDANCE"}}),s.value={...n}),setTimeout(()=>{l("\u4FDD\u5B58\u6210\u529F")},200)}catch{}};A(()=>{m()});const d=a=>a&&a>=0?w(a):"";return()=>e("div",{class:t.ruleContainer},[e(E,{inset:!0},{default:()=>[e(i,null,{title:()=>e("div",{class:t.ruleTitle},[u("\u7B7E\u5230\u65F6\u95F4\u8303\u56F4")])}),e(i,null,{title:()=>e("div",{class:t.ruleContent},[e("div",{class:t.ruleRange},[u("\u8BFE\u7A0B\u5F00\u59CB\u524D\u591A\u5C11\u5206\u949F\u53EF\u4EE5\u7B7E\u5230\uFF1A"),e(p,{class:[t.field,t["field-w102"]],autocomplete:"off",formatter:d,type:"number",modelValue:n.normal_sign_in_start,"onUpdate:modelValue":a=>n.normal_sign_in_start=a},{extra:()=>e("span",{class:t.ruleExtra},[u("\u5206\u949F")])})]),e("div",{class:t.ruleTips},[u("\u4EE5"),e("span",null,[u("12:00:00")]),u("\u5F00\u59CB\u7684\u8BFE\u7A0B\u4E3A\u4F8B,\u6700\u65E9"),e("span",null,[F("12:00:00",n.normal_sign_in_start)]),u("\u53EF\u4EE5\u8FDB\u884C\u7B7E\u5230")])])})]}),e(E,{inset:!0},{default:()=>[e(i,null,{title:()=>e("div",{class:t.ruleTitle},[u("\u6B63\u5E38\u7B7E\u5230")])}),e(i,null,{title:()=>e("div",{class:t.ruleContent},[e("div",{class:t.ruleRange},[u("\u7B7E\u5230\u65F6\u95F4\u65E9\u4E8E\u8BFE\u7A0B\u5F00\u59CB\u65F6\u95F4\uFF1A"),e(p,{class:[t.field,t["field-w102"]],autocomplete:"off",formatter:d,type:"number",modelValue:n.normal_sign_in_end,"onUpdate:modelValue":[a=>n.normal_sign_in_end=a,a=>{console.log(a,"value"),n.abnormal_sign_in=a}]},{extra:()=>e("span",{class:t.ruleExtra},[u("\u5206\u949F")])})]),e("div",{class:t.ruleTips},[u("\u4EE5"),e("span",null,[u("12:00:00")]),u("\u5F00\u59CB\u7684\u8BFE\u7A0B\u4E3A\u4F8B,\u5728"),e("span",{style:"display: inline-block;"},[F("12:00:00",n.normal_sign_in_start),u("~"),F("12:00:00",n.normal_sign_in_end)]),u("\u65F6\u95F4\u8303\u56F4\u5185\u7B7E\u5230\u5C5E\u4E8E"),e("span",null,[u("\u6B63\u5E38\u7B7E\u5230")])])])})]}),e(E,{inset:!0},{default:()=>[e(i,null,{title:()=>e("div",{class:[t.ruleTitle]},[u("\u5F02\u5E38\u7B7E\u5230")])}),e(i,null,{title:()=>e("div",{class:[t.ruleContent,t.ruleMore]},[e("div",{class:t.ruleDesc},[u("\u7B7E\u5230\u65F6\u95F4\u665A\u4E8E\u8BFE\u7A0B\u5F00\u59CB\u65F6\u95F4"),e("span",null,[u("\u524D"),n.normal_sign_in_end||0,u("\u5206\u949F")])," ",e("br",null,null),u("\u65E9\u4E8E\u8BFE\u7A0B\u5F00\u59CB\u65F6\u95F4\u65F6\uFF0C\u6263\u51CF\u5F53\u65E5\u8BAD\u7EC3\u8865\u52A9")]),e("div",{class:t.ruleTips},[u("\u4EE5"),e("span",null,[u("12:00:00")]),u("\u5F00\u59CB\u7684\u8BFE\u7A0B\u4E3A\u4F8B,\u5728"),e("span",{style:"display: inline-block;"},[V("12:00:00",n.normal_sign_in_end),u("~12:00:00")]),u("\u65F6\u95F4\u8303\u56F4\u5185\u7B7E\u5230\u5C5E\u4E8E"),e("span",null,[u("\u5F02\u5E38\u7B7E\u5230")])])])})]}),e(E,{inset:!0},{default:()=>[e(i,null,{title:()=>e("div",{class:[t.ruleTitle]},[u("\u8FDF\u5230")])}),e(i,null,{title:()=>e("div",{class:[t.ruleContent,t.ruleMore]},[e("div",{class:t.ruleRange},[u("\u7B7E\u5230\u65F6\u95F4\u665A\u4E8E\u8BFE\u7A0B\u5F00\u59CB\u65F6\u95F4\uFF1A"),e(p,{class:[t.field,t["field-w102"]],autocomplete:"off",formatter:d,type:"number",modelValue:n.late_sign_in,"onUpdate:modelValue":[a=>n.late_sign_in=a,a=>{n.absence_sign_in=a}]},{extra:()=>e("span",{class:t.ruleExtra},[u("\u5206\u949F")])})]),e("div",{class:t.ruleTips},[u("\u4EE5"),e("span",null,[u("12:00:00")]),u("\u5F00\u59CB\u7684\u8BFE\u7A0B\u4E3A\u4F8B,\u5728"),e("span",{style:"display: inline-block;"},[x("12:00:00",0),u(" ~")," ",h("12:00:00",n.late_sign_in)]),u("\u65F6\u95F4\u8303\u56F4\u5185\u7B7E\u5230\u5C5E\u4E8E"),e("span",null,[u("\u8FDF\u5230")])])])})]}),e(E,{inset:!0},{default:()=>[e(i,null,{title:()=>e("div",{class:[t.ruleTitle]},[u("\u65F7\u8BFE")])}),e(i,null,{title:()=>e("div",{class:[t.ruleContent,t.ruleMore]},[e("div",{class:t.ruleDesc},[u("\u7B7E\u5230\u65F6\u95F4\u665A\u4E8E\u8BFE\u7A0B\u5F00\u59CB\u65F6\u95F4"),e("span",null,[n.late_sign_in||0,u("\u5206\u949F")]),u(" "),e("br",null,null),u("\u6263\u51CF\u5F53\u65E5\u8BAD\u7EC3\u8865\u52A9")]),e("div",{class:t.ruleTips},[u("\u4EE5"),e("span",null,[u("12:00:00")]),u("\u5F00\u59CB\u7684\u8BFE\u7A0B\u4E3A\u4F8B,\u5728"),e("span",null,[h("12:00:00",n.late_sign_in)]),u("\u540E\u7B7E\u5230(\u542B"),h("12:00:00",n.late_sign_in),u(") \u5C5E\u4E8E"),e("span",null,[u("\u65F7\u8BFE")])])])})]}),e(T,{to:"#app"},{default:()=>[e(b,{position:"bottom"},{default:()=>[e("div",{class:"btnGroup"},[e(D,{type:"primary",round:!0,block:!0,onClick:B},{default:()=>[u("\u4FDD\u5B58\u8BBE\u7F6E")]})])]})]})])}}),ee=C({name:"sigin-out-rule",setup(){f({show1:!1,show2:!1,show3:!1});const s=v({}),n=f({}),m=async()=>{try{const{data:a}=await g.get("/api-school/schoolParamConfig/queryByParamNameList",{params:{paramNames:"normal_sign_out,abnormal_sign_out,abnormal_sign_out_fee,abnormal_sign_out_fee_type,premise_sign_out,premise_sign_out_fee,premise_sign_out_fee_type,not_sign_out_fee,not_sign_out_fee_type"}});console.log(a,"data"),(a||[]).forEach(o=>{n[o.paramName]=o.paramValue}),s.value={...n}}catch{}},c=(a,_)=>{const o=[];for(const r in a)a[r]!=_[r]&&o.push({paramName:r,paramValue:_[r]});return o||[]},B=async()=>{if(!n.normal_sign_out){l("\u8BF7\u8F93\u5165\u6B63\u5E38\u7B7E\u9000\u65F6\u95F4");return}if(!n.abnormal_sign_out){l("\u8BF7\u8F93\u5165\u5F02\u5E38\u7B7E\u9000\u65F6\u95F4");return}if(!n.abnormal_sign_out_fee){l("\u8BF7\u8F93\u5165\u5F02\u5E38\u7B7E\u9000\u6263\u51CF\u91D1\u989D");return}if(n.abnormal_sign_out_fee>100&&n.abnormal_sign_out_fee_type==="PERCENTAGE"){l("\u5F02\u5E38\u7B7E\u9000\u6263\u51CF\u91D1\u989D\u8F93\u5165\u6709\u8BEF");return}if(!n.premise_sign_out_fee){l("\u8BF7\u8F93\u5165\u65E9\u9000\u6263\u51CF\u91D1\u989D");return}if(n.premise_sign_out_fee>100&&n.premise_sign_out_fee_type==="PERCENTAGE"){l("\u65E9\u9000\u6263\u51CF\u91D1\u989D\u8F93\u5165\u6709\u8BEF");return}if(!n.not_sign_out_fee){l("\u8BF7\u8F93\u5165\u672A\u7B7E\u9000\u6263\u51CF\u91D1\u989D");return}if(n.not_sign_out_fee>100&&n.not_sign_out_fee_type==="PERCENTAGE"){l("\u672A\u7B7E\u9000\u6263\u51CF\u91D1\u989D\u8F93\u5165\u6709\u8BEF");return}try{const a=c(s.value,n);a.length>0&&(await g.post("/api-school/schoolParamConfig/update",{hideLoading:!1,data:{configs:[...a],group:"ATTENDANCE"}}),s.value={...n}),setTimeout(()=>{l("\u4FDD\u5B58\u6210\u529F")},200)}catch{}};A(()=>{m()});const d=a=>a&&a>=0?w(a):"";return()=>e("div",{class:t.ruleContainer},[e(E,{inset:!0},{default:()=>[e(i,null,{title:()=>e("div",{class:t.ruleTitle},[u("\u6B63\u5E38\u7B7E\u9000")])}),e(i,null,{title:()=>e("div",{class:t.ruleContent},[e("div",{class:t.ruleRange},[u("\u7B7E\u9000\u65F6\u95F4\u4E0D\u5F97\u665A\u4E8E\u8BFE\u7A0B\u7ED3\u675F\u540E\uFF1A"),e(p,{class:[t.field,t["field-w102"]],autocomplete:"off",formatter:d,type:"number",modelValue:n.normal_sign_out,"onUpdate:modelValue":a=>n.normal_sign_out=a},{extra:()=>e("span",{class:t.ruleExtra},[u("\u5206\u949F")])})]),e("div",{class:t.ruleTips},[u("\u4EE5"),e("span",null,[u("12:00:00")]),u("\u7ED3\u675F\u7684\u8BFE\u7A0B\u4E3A\u4F8B, \u5728"),e("span",{style:"display: inline-block;"},[u("12:00:00\uFF5E"),h("12:00:00",n.normal_sign_out)]),u("\u65F6\u95F4\u8303\u56F4\u5185\u7B7E\u9000\u5C5E\u4E8E"),e("span",null,[u("\u6B63\u5E38\u7B7E\u9000")])])])})]}),e(E,{inset:!0},{default:()=>[e(i,null,{title:()=>e("div",{class:t.ruleTitle},[u("\u5F02\u5E38\u7B7E\u9000")])}),e(i,null,{title:()=>e("div",{class:t.ruleContent},[e("div",{class:t.ruleRange},[u("\u7B7E\u9000\u65F6\u95F4\u65E9\u4E8E\u8BFE\u7A0B\u7ED3\u675F\u65F6\u95F4\uFF1A"),e(p,{class:[t.field,t["field-w126"]],autocomplete:"off",formatter:d,type:"number",modelValue:n.abnormal_sign_out,"onUpdate:modelValue":[a=>n.abnormal_sign_out=a,a=>{n.premise_sign_out=a}]},{extra:()=>e("span",{class:t.ruleExtra},[u("\u5206\u949F\u4EE5\u5185")])})]),e("div",{class:t.ruleTips},[u("\u4EE5"),e("span",null,[u("12:00:00")]),u("\u7ED3\u675F\u7684\u8BFE\u7A0B\u4E3A\u4F8B, \u5728"),e("span",{style:"display: inline-block;"},[F("12:00:00",n.abnormal_sign_out),u("~"),P("12:00:00",0)]),u("\u65F6\u95F4\u8303\u56F4\u5185\u7B7E\u9000\u5C5E\u4E8E"),e("span",null,[u("\u5F02\u5E38\u7B7E\u9000")])])])})]}),e(E,{inset:!0},{default:()=>[e(i,null,{title:()=>e("div",{class:[t.ruleTitle]},[u("\u65E9\u9000")])}),e(i,null,{title:()=>e("div",{class:[t.ruleContent,t.ruleMore]},[e("div",{class:t.ruleDesc},[u("\u7B7E\u9000\u65F6\u95F4\u65E9\u4E8E\u8BFE\u7A0B\u7ED3\u675F\u65F6\u95F4"),e("span",null,[n.abnormal_sign_out||0,u("\u5206\u949F")]),u("\u4EE5\u4E0A")," ",e("br",null,null),u("\u6263\u51CF\u5F53\u65E5\u8BAD\u7EC3\u8865\u52A9")]),e("div",{class:t.ruleTips},[u("\u4EE5"),e("span",null,[u("12:00:00")]),u("\u7ED3\u675F\u7684\u8BFE\u7A0B\u4E3A\u4F8B,\u5728"),e("span",null,[F("12:00:00",n.abnormal_sign_out)]),u("\u524D\u7B7E\u9000 (\u542B"),F("12:00:00",n.abnormal_sign_out),u(") \u5C5E\u4E8E"),e("span",null,[u("\u65E9\u9000")])])])})]}),e(T,{to:"#app"},{default:()=>[e(b,{position:"bottom"},{default:()=>[e("div",{class:"btnGroup"},[e(D,{type:"primary",round:!0,block:!0,onClick:B},{default:()=>[u("\u4FDD\u5B58\u8BBE\u7F6E")]})])]})]})])}}),Ee=C({name:"attendance-rules",setup(){const s=f({tabValue:"range",heightV:0}),n=N(),m=c=>{s.heightV=c,console.log(s.heightV,"\u83B7\u53D6\u9AD8\u5EA6"),document.documentElement.style.setProperty("--header-height",c+"px")};return()=>e("div",{class:t.attendanceRules},[e(b,{position:"top",background:"#F8F8F8",onGetHeight:m,ref:n},{default:()=>[e(R,{border:!1},null)]}),e(k,{sticky:!0,lineWidth:20,lineHeight:4,offsetTop:s.heightV,swipeable:!0,animated:!0,active:s.tabValue,"onUpdate:active":c=>s.tabValue=c},{default:()=>[e(y,{title:"\u8003\u52E4\u8303\u56F4",name:"range"},{default:()=>[s.tabValue==="range"&&e(Y,null,null)]}),e(y,{title:"\u7B7E\u5230\u89C4\u5219",name:"signin-rule"},{default:()=>[s.tabValue==="signin-rule"&&e(Z,null,null)]}),e(y,{title:"\u7B7E\u9000\u89C4\u5219",name:"signout-rule"},{default:()=>[s.tabValue==="signout-rule"&&e(ee,null,null)]})]})])}});export{Ee as default};