index-legacy.98ca70c8.js 16 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML='._attendanceRules_176h5_1{--van-tab-active-text-color: var(--van-primary-color);--van-tab-text-color: #333;--van-tab-font-size: .42667rem}._ruleContainer_176h5_6{overflow:hidden;margin-bottom:.53333rem}._ruleContainer_176h5_6 ._informationBottom_176h5_10 .van-sticky{position:absolute}._ruleContainer_176h5_6 .van-cell{padding:.37333rem .32rem}._ruleContainer_176h5_6 .van-cell:after{transform:scale(1);border-color:#f2f2f2}._ruleContainer_176h5_6 .van-cell-group{margin:.42667rem .34667rem 0;border-radius:.26667rem}._ruleContainer_176h5_6 .van-field__control{text-align:center;font-family:DINA}._ruleContainer_176h5_6 ._ruleTitle_176h5_28{font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._ruleContainer_176h5_6 ._smallRuleTitle_176h5_34{font-size:.37333rem}._ruleContainer_176h5_6 ._ruleContent_176h5_37{font-size:.37333rem;color:#777}._ruleContainer_176h5_6 ._ruleMore_176h5_41{padding:.16rem 0 .21333rem}._ruleContainer_176h5_6 ._red_176h5_44{color:#f44541}._ruleContainer_176h5_6 ._field_176h5_47{background:#f2f2f2;border-radius:.21333rem;height:.93333rem;line-height:.93333rem;padding:0 .21333rem;display:inline-flex}._ruleContainer_176h5_6 ._field_176h5_47 ._unit_176h5_55{position:relative;width:1.06667rem;padding-left:.32rem;display:flex;align-items:center;justify-content:center;height:100%;font-weight:500;font-size:.4rem}._ruleContainer_176h5_6 ._field_176h5_47 ._unit_176h5_55:before{position:absolute;left:0;content:" ";display:inline-block;width:.02667rem;height:.66667rem;background:#e3e3e3;border-radius:.02667rem}._ruleContainer_176h5_6 ._field_176h5_47 ._unit_176h5_55:after{content:" ";display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAKCAYAAAC5Sw6hAAAAAXNSR0IArs4c6QAAARBJREFUKFOV0a1Ow1AUB/D/aQuKmQp4AHgCkDMzQw3Tpvc2JOhqMEt4ABIM09UkpLdNa5gCg0HCE8ADgKgBNdre5SxlgW0d9Jibc+85v/tFAKCUuiCiIQCD8xZRaa0vpZTnxE1JklxprU9bAPNSIhp5nnc2g8Iw3LBte6y1PmyDEdFdnueDIAi+ZhBHHMdbAB4AHPwTewLQE0J8cv0c4iTLsu2iKB4B7P2BvViW1XUc5/277hfEk1EU7RqGwdhOA/ZWVVXX9/3Xn+tLEC+mabpfliVfs7OAfZim2XNd93lxk5VQ/WZ9AGMAm3XTBMBACHG/6qSNUI0dA7iuG0+EEDdNb7cW4ial1BGPUsrbdR8wBQqHTQv5JatLAAAAAElFTkSuQmCC) no-repeat center center;background-size:contain;width:.24rem;height:.13333rem;margin-left:.08rem}._ruleContainer_176h5_6 ._field_176h5_47 ._unit_176h5_55._active_176h5_85:after{transform:rotateX(180deg);margin-top:-.05333rem}._ruleContainer_176h5_6 ._field-m_176h5_89{margin:0 .10667rem}._ruleContainer_176h5_6 ._field-w80_176h5_92{width:2.13333rem}._ruleContainer_176h5_6 ._field-w136_176h5_95{width:3.62667rem}._ruleContainer_176h5_6 ._field-w102_176h5_98{width:2.72rem}._ruleContainer_176h5_6 ._field-w126_176h5_101{width:3.36rem}._ruleContainer_176h5_6 ._ruleRange_176h5_104{display:flex;justify-content:space-between;align-items:center}._ruleContainer_176h5_6 ._ruleTips_176h5_109{margin-top:.32rem;padding:.26667rem;background:#fff3e6;border-radius:.16rem;font-size:.34667rem;color:#333;line-height:.58667rem}._ruleContainer_176h5_6 ._ruleTips_176h5_109 span{color:#f44541;font-weight:500}._ruleContainer_176h5_6 ._ruleDesc_176h5_122{font-size:.37333rem;color:#777;line-height:.64rem}._ruleContainer_176h5_6 ._ruleDesc_176h5_122 span{padding:0 .10667rem;color:#f44541}._ruleContainer_176h5_6 ._ruleExtra_176h5_131{color:#777;font-size:.4rem}._popover_176h5_135{--van-popover-action-width: 2.66667rem}._flexDev_176h5_138{display:flex;align-items:center}\n',document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.ad813f4d.js","./toolsValidate-legacy.95a8e7c1.js","./index-legacy.148f784c.js","./index-legacy.918b8c74.js","./index-legacy.3a3e070a.js","./date-legacy.164510a3.js","./index-legacy.ac7c51db.js","./use-tab-status-legacy.91417466.js","./index-legacy.fab451f1.js","./index-legacy.10d8486a.js"],(function(e){"use strict";var n,a,t,l,i,_,s,o,r,u,c,d,m,f,g,p,h,b,y,v,C,A,E,w;return{setters:[function(e){n=e.d,a=e.r,t=e.bK,l=e.$,i=e.c,_=e.q,s=e.aw,o=e.B,r=e.m,u=e.o,c=e.R,d=e.aj},function(e){m=e.O},function(e){f=e.v},function(e){g=e.C},function(e){p=e.C},function(e){h=e.F},function(e){b=e.r,y=e.b,v=e.c,C=e.a,A=e.d},function(e){E=e.T,w=e.a},function(){},function(){},function(){}],execute:function(){var N="_attendanceRules_176h5_1",V="_ruleContainer_176h5_6",T="_ruleTitle_176h5_28",x="_ruleContent_176h5_37",k="_ruleMore_176h5_41",P="_field_176h5_47",R="_field-m_176h5_89",B="_field-w80_176h5_92",G="_field-w102_176h5_98",U="_field-w126_176h5_101",D="_ruleRange_176h5_104",j="_ruleTips_176h5_109",L="_ruleDesc_176h5_122",z="_ruleExtra_176h5_131",H=n({name:"range-model",setup(){a({show1:!1,show2:!1});const e=t({}),n=a({}),c=async()=>{if(n.scope_of_attendance)if(n.sign_in_attendance)if(n.sign_in_attendance>100&&"PERCENTAGE"===n.sign_in_attendance_type)u("签到扣减金额输入有误");else if(n.sign_out_attendance)if(n.sign_out_attendance>100&&"PERCENTAGE"===n.sign_out_attendance_type)u("签退扣减金额输入有误");else try{const a=((e,n)=>{const a=[];for(const t in e)e[t]!=n[t]&&a.push({paramName:t,paramValue:n[t]});return a||[]})(e.value,n);a.length>0&&await r.post("/api-school/schoolParamConfig/update",{hideLoading:!1,data:{configs:[...a],group:"ATTENDANCE"}}),setTimeout((()=>{u("保存成功")}),200)}catch{}else u("请输入签退扣减金额");else u("请输入签到扣减金额");else u("请输入考勤定位范围")};l((()=>{(async()=>{try{const{data:a}=await r.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((e=>{n[e.paramName]=e.paramValue})),e.value={...n}}catch{}})()}));const d=e=>e&&e>=0?f(e):"";return()=>i("div",{class:V},[i(g,{inset:!0},{default:()=>[i(p,null,{title:()=>i("div",{class:T},[_("考勤定位范围")])}),i(p,null,{title:()=>i("div",{class:x,style:{display:"flex",alignItems:"center"}},[_("签到、签退地点须在学校定位点"),i(h,{class:[P,R,B],autocomplete:"off",formatter:d,type:"number",modelValue:n.scope_of_attendance,"onUpdate:modelValue":e=>n.scope_of_attendance=e},{extra:()=>i("span",{class:z},[_("米")])}),_("以内")])})]}),i(s,{to:"#app"},{default:()=>[i(m,{position:"bottom"},{default:()=>[i("div",{class:"btnGroup"},[i(o,{type:"primary",round:!0,block:!0,onClick:c},{default:()=>[_("保存设置")]})])]})]})])}}),I=n({name:"sigin-in-rule",setup(){a({show1:!1,show2:!1,show3:!1,show4:!1});const e=t({}),n=a({}),c=async()=>{if(n.normal_sign_in_start)if(n.normal_sign_in_end){if(console.log(n.normal_sign_in_end,n.normal_sign_in_start),n.normal_sign_in_end-n.normal_sign_in_start>0)return console.log(!0),void u("正常签到时间不能大于签到时间范围");if(n.abnormal_sign_in_fee)if(n.abnormal_sign_in_fee>100&&"PERCENTAGE"===n.abnormal_sign_in_fee_type)u("异常签到扣减金额输入有误");else if(n.late_sign_in)if(n.late_sign_in_fee)if(n.late_sign_in_fee>100&&"PERCENTAGE"===n.late_sign_in_fee_type)u("迟到扣减金额输入有误");else if(n.absence_sign_in_fee)if(n.absence_sign_in_fee>100&&"PERCENTAGE"===n.absence_sign_in_fee_type)u("旷课扣减金额输入有误");else if(n.not_sign_in_fee)if(n.not_sign_in_fee>100&&"PERCENTAGE"===n.not_sign_in_fee_type)u("未签到扣减金额输入有误");else try{const a=((e,n)=>{const a=[];for(const t in e)e[t]!=n[t]&&a.push({paramName:t,paramValue:n[t]});return a||[]})(e.value,n);a.length>0&&(await r.post("/api-school/schoolParamConfig/update",{hideLoading:!1,data:{configs:[...a],group:"ATTENDANCE"}}),e.value={...n}),setTimeout((()=>{u("保存成功")}),200)}catch{}else u("请输入未签到扣减金额");else u("请输入旷课扣减金额");else u("请输入迟到扣减金额");else u("请输入迟到时间");else u("请输入异常签到扣减金额")}else u("请输入正常签到时间");else u("请输入签到时间范围")};l((()=>{(async()=>{try{const{data:a}=await r.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((e=>{n[e.paramName]=e.paramValue})),e.value={...n}}catch{}})()}));const d=e=>e&&e>=0?f(e):"";return()=>i("div",{class:V},[i(g,{inset:!0},{default:()=>[i(p,null,{title:()=>i("div",{class:T},[_("签到时间范围")])}),i(p,null,{title:()=>i("div",{class:x},[i("div",{class:D},[_("课程开始前多少分钟可以签到:"),i(h,{class:[P,G],autocomplete:"off",formatter:d,type:"number",modelValue:n.normal_sign_in_start,"onUpdate:modelValue":e=>n.normal_sign_in_start=e},{extra:()=>i("span",{class:z},[_("分钟")])})]),i("div",{class:j},[_("以"),i("span",null,[_("12:00:00")]),_("开始的课程为例,最早"),i("span",null,[b("12:00:00",n.normal_sign_in_start)]),_("可以进行签到")])])})]}),i(g,{inset:!0},{default:()=>[i(p,null,{title:()=>i("div",{class:T},[_("正常签到")])}),i(p,null,{title:()=>i("div",{class:x},[i("div",{class:D},[_("签到时间早于课程开始时间:"),i(h,{class:[P,G],autocomplete:"off",formatter:d,type:"number",modelValue:n.normal_sign_in_end,"onUpdate:modelValue":[e=>n.normal_sign_in_end=e,e=>{console.log(e,"value"),n.abnormal_sign_in=e}]},{extra:()=>i("span",{class:z},[_("分钟")])})]),i("div",{class:j},[_("以"),i("span",null,[_("12:00:00")]),_("开始的课程为例,在"),i("span",{style:"display: inline-block;"},[b("12:00:00",n.normal_sign_in_start),_("~"),b("12:00:00",n.normal_sign_in_end)]),_("时间范围内签到属于"),i("span",null,[_("正常签到")])])])})]}),i(g,{inset:!0},{default:()=>[i(p,null,{title:()=>i("div",{class:[T]},[_("异常签到")])}),i(p,null,{title:()=>i("div",{class:[x,k]},[i("div",{class:L},[_("签到时间晚于课程开始时间"),i("span",null,[_("前"),n.normal_sign_in_end||0,_("分钟")])," ",i("br",null,null),_("早于课程开始时间时,扣减当日训练补助")]),i("div",{class:j},[_("以"),i("span",null,[_("12:00:00")]),_("开始的课程为例,在"),i("span",{style:"display: inline-block;"},[y("12:00:00",n.normal_sign_in_end),_("~12:00:00")]),_("时间范围内签到属于"),i("span",null,[_("异常签到")])])])})]}),i(g,{inset:!0},{default:()=>[i(p,null,{title:()=>i("div",{class:[T]},[_("迟到")])}),i(p,null,{title:()=>i("div",{class:[x,k]},[i("div",{class:D},[_("签到时间晚于课程开始时间:"),i(h,{class:[P,G],autocomplete:"off",formatter:d,type:"number",modelValue:n.late_sign_in,"onUpdate:modelValue":[e=>n.late_sign_in=e,e=>{n.absence_sign_in=e}]},{extra:()=>i("span",{class:z},[_("分钟")])})]),i("div",{class:j},[_("以"),i("span",null,[_("12:00:00")]),_("开始的课程为例,在"),i("span",{style:"display: inline-block;"},[v("12:00:00",0),_(" ~")," ",C("12:00:00",n.late_sign_in)]),_("时间范围内签到属于"),i("span",null,[_("迟到")])])])})]}),i(g,{inset:!0},{default:()=>[i(p,null,{title:()=>i("div",{class:[T]},[_("旷课")])}),i(p,null,{title:()=>i("div",{class:[x,k]},[i("div",{class:L},[_("签到时间晚于课程开始时间"),i("span",null,[n.late_sign_in||0,_("分钟")]),_(" "),i("br",null,null),_("扣减当日训练补助")]),i("div",{class:j},[_("以"),i("span",null,[_("12:00:00")]),_("开始的课程为例,在"),i("span",null,[C("12:00:00",n.late_sign_in)]),_("后签到(含"),C("12:00:00",n.late_sign_in),_(") 属于"),i("span",null,[_("旷课")])])])})]}),i(s,{to:"#app"},{default:()=>[i(m,{position:"bottom"},{default:()=>[i("div",{class:"btnGroup"},[i(o,{type:"primary",round:!0,block:!0,onClick:c},{default:()=>[_("保存设置")]})])]})]})])}}),Q=n({name:"sigin-out-rule",setup(){a({show1:!1,show2:!1,show3:!1});const e=t({}),n=a({}),c=async()=>{if(n.normal_sign_out)if(n.abnormal_sign_out)if(n.abnormal_sign_out_fee)if(n.abnormal_sign_out_fee>100&&"PERCENTAGE"===n.abnormal_sign_out_fee_type)u("异常签退扣减金额输入有误");else if(n.premise_sign_out_fee)if(n.premise_sign_out_fee>100&&"PERCENTAGE"===n.premise_sign_out_fee_type)u("早退扣减金额输入有误");else if(n.not_sign_out_fee)if(n.not_sign_out_fee>100&&"PERCENTAGE"===n.not_sign_out_fee_type)u("未签退扣减金额输入有误");else try{const a=((e,n)=>{const a=[];for(const t in e)e[t]!=n[t]&&a.push({paramName:t,paramValue:n[t]});return a||[]})(e.value,n);a.length>0&&(await r.post("/api-school/schoolParamConfig/update",{hideLoading:!1,data:{configs:[...a],group:"ATTENDANCE"}}),e.value={...n}),setTimeout((()=>{u("保存成功")}),200)}catch{}else u("请输入未签退扣减金额");else u("请输入早退扣减金额");else u("请输入异常签退扣减金额");else u("请输入异常签退时间");else u("请输入正常签退时间")};l((()=>{(async()=>{try{const{data:a}=await r.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((e=>{n[e.paramName]=e.paramValue})),e.value={...n}}catch{}})()}));const d=e=>e&&e>=0?f(e):"";return()=>i("div",{class:V},[i(g,{inset:!0},{default:()=>[i(p,null,{title:()=>i("div",{class:T},[_("正常签退")])}),i(p,null,{title:()=>i("div",{class:x},[i("div",{class:D},[_("签退时间不得晚于课程结束后:"),i(h,{class:[P,G],autocomplete:"off",formatter:d,type:"number",modelValue:n.normal_sign_out,"onUpdate:modelValue":e=>n.normal_sign_out=e},{extra:()=>i("span",{class:z},[_("分钟")])})]),i("div",{class:j},[_("以"),i("span",null,[_("12:00:00")]),_("结束的课程为例, 在"),i("span",{style:"display: inline-block;"},[_("12:00:00~"),C("12:00:00",n.normal_sign_out)]),_("时间范围内签退属于"),i("span",null,[_("正常签退")])])])})]}),i(g,{inset:!0},{default:()=>[i(p,null,{title:()=>i("div",{class:T},[_("异常签退")])}),i(p,null,{title:()=>i("div",{class:x},[i("div",{class:D},[_("签退时间早于课程结束时间:"),i(h,{class:[P,U],autocomplete:"off",formatter:d,type:"number",modelValue:n.abnormal_sign_out,"onUpdate:modelValue":[e=>n.abnormal_sign_out=e,e=>{n.premise_sign_out=e}]},{extra:()=>i("span",{class:z},[_("分钟以内")])})]),i("div",{class:j},[_("以"),i("span",null,[_("12:00:00")]),_("结束的课程为例, 在"),i("span",{style:"display: inline-block;"},[b("12:00:00",n.abnormal_sign_out),_("~"),A("12:00:00",0)]),_("时间范围内签退属于"),i("span",null,[_("异常签退")])])])})]}),i(g,{inset:!0},{default:()=>[i(p,null,{title:()=>i("div",{class:[T]},[_("早退")])}),i(p,null,{title:()=>i("div",{class:[x,k]},[i("div",{class:L},[_("签退时间早于课程结束时间"),i("span",null,[n.abnormal_sign_out||0,_("分钟")]),_("以上")," ",i("br",null,null),_("扣减当日训练补助")]),i("div",{class:j},[_("以"),i("span",null,[_("12:00:00")]),_("结束的课程为例,在"),i("span",null,[b("12:00:00",n.abnormal_sign_out)]),_("前签退 (含"),b("12:00:00",n.abnormal_sign_out),_(") 属于"),i("span",null,[_("早退")])])])})]}),i(s,{to:"#app"},{default:()=>[i(m,{position:"bottom"},{default:()=>[i("div",{class:"btnGroup"},[i(o,{type:"primary",round:!0,block:!0,onClick:c},{default:()=>[_("保存设置")]})])]})]})])}});e("default",n({name:"attendance-rules",setup(){const e=a({tabValue:"range",heightV:0}),n=c(),t=n=>{e.heightV=n,console.log(e.heightV,"获取高度"),document.documentElement.style.setProperty("--header-height",n+"px")};return()=>i("div",{class:N},[i(m,{position:"top",background:"#F8F8F8",onGetHeight:t,ref:n},{default:()=>[i(d,{border:!1},null)]}),i(E,{sticky:!0,lineWidth:20,lineHeight:4,offsetTop:e.heightV,swipeable:!0,animated:!0,active:e.tabValue,"onUpdate:active":n=>e.tabValue=n},{default:()=>[i(w,{title:"考勤范围",name:"range"},{default:()=>["range"===e.tabValue&&i(H,null,null)]}),i(w,{title:"签到规则",name:"signin-rule"},{default:()=>["signin-rule"===e.tabValue&&i(I,null,null)]}),i(w,{title:"签退规则",name:"signout-rule"},{default:()=>["signout-rule"===e.tabValue&&i(Q,null,null)]})]})])}}))}}}))}();