import{r as e,a9 as a,ar as t,e as l,cZ as s,aa as u,f as n,g as o,h as r,w as i,z as d,o as _,i as c,a as f,j as p,t as v,k as m,l as g,F as b,_ as h,y,a8 as k,O as x,N as j}from"./index-DXvjTqMr.js";import{_ as w}from"./uni-icons.Dxt3pfrw.js";import{_ as C}from"./uni-nav-bar.BZJJc0Hh.js";import{_ as M}from"./uni-popup.BpvJsdxE.js";import{_ as D}from"./empty.9XRZTjWt.js";import{a as T}from"./applyForMenuModal.3d9CZAAI.js";import{s as F,g as L,a as S}from"./selectedLabel.D9qJdtOQ.js";import{_ as $}from"./_plugin-vue_export-helper.BCo6x5W8.js";/* empty css                                                                  *//* empty css                                                                    */import"./uni-popup.vue_vue_type_style_index_0_scoped_90b62717_lang.BoqUbMLw.js";import"./moment.BD7_iMEL.js";const Y=$({__name:"userCheckList",setup($){let Y=e(`${(new Date).getFullYear()}-${(new Date).getMonth()+1} `),z=e(`${(new Date).getFullYear()}-${(new Date).getMonth()+1} `);e((new Date).getMonth()+1),e(0);let E=e(0),I=e(1),N=e(20),P=e(),V=e("");const Z=e(!0);a((e=>{e.status&&(B.status=e.status,B.labelText=e.text),e.user_id&&(E.value=e.user_id,P.value=e.user_name,t({title:P.value})),z.value=e.date,H()})),l([{label:"全部",value:0},{label:"请假",value:1},{label:"迟到",value:2}]);const O=e(null),Q=()=>{O.value.close()},R=()=>{O.value.close()},W=e([]),X=l({label:[]}),q=e(null),A=e=>{z.value=e.detail.value,H()},B=l({labelText:"全部",status:""}),G=(e,a)=>{X.label=e;let t=[];if(e.forEach((e=>{t.push(e)})),B.status=t.toString(),I.value=1,e.length>0){let e=[];a.forEach((a=>{e.push(a)})),B.labelText=e.toString()}else B.labelText="全部";H()},H=()=>{let e={date:z.value,status:B.status,user_id:E.value,page:I.value,limit:N.value};s(e).then((e=>{W.value=[...W.value,...e.data]}))},J=()=>{h()};return u((()=>{Z.value&&(I.value++,H())})),(e,a)=>{const t=d,l=y,s=n(o("uni-icons"),w),u=k,h=n(o("uni-nav-bar"),C),$=x,E=n(o("uni-popup"),M);return _(),r(t,{class:"nav"},{default:i((()=>[c(h,{fixed:!0,"left-icon":"left","status-bar":"",backgroundColor:"rgba(255,255,255,1)",color:"#303133",border:!1,onClickLeft:J},{right:i((()=>[c(t,{class:"bar-right"},{default:i((()=>[c(u,{ref:"picker",mode:"date",fields:"month",value:f(z),start:"2021-01",end:f(Y),onChange:A},{default:i((()=>[c(l,{class:"uni-nav-bar-text"},{default:i((()=>[c(l,{class:"month"},{default:i((()=>[p(v(f(z)),1)])),_:1}),c(s,{type:"arrowdown",color:"#606266",size:"12"})])),_:1})])),_:1},8,["value","end"])])),_:1})])),default:i((()=>[c(t,{class:"nav-content"},{default:i((()=>[c(t,{class:"title"},{default:i((()=>[c(t,{class:"head-title"},{default:i((()=>[p(v(f(P)),1)])),_:1}),c(l,null,{default:i((()=>[p("的考勤明细")])),_:1})])),_:1})])),_:1})])),_:1}),c(F,{title:"筛选状态",ref_key:"selectedLabelRef",ref:q,onChangeItem:G},null,512),f(W).length>0?(_(),r(t,{key:0,class:"card"},{default:i((()=>[c(t,{class:"table-list"},{default:i((()=>[(_(!0),m(b,null,g(f(W),((e,a)=>(_(),r(t,{class:"item",key:a},{default:i((()=>[c(t,{class:"num"},{default:i((()=>[c(l,null,{default:i((()=>[p(v(e.date)+"-",1)])),_:2},1024),e.details.length||0!=e.absenteeism?1==e.absenteeism?(_(),r(l,{key:1,class:"waring"},{default:i((()=>[p("旷工")])),_:1})):(_(),r(l,{key:2,class:"waring"},{default:i((()=>[p(v(f(L)([e.details[0].status])),1)])),_:2},1024)):(_(),r(l,{key:0},{default:i((()=>[p("正常")])),_:1})),e.location_status.length?(_(),r(l,{key:3},{default:i((()=>[p("("+v(f(S)(e.external.location_status))+")",1)])),_:2},1024)):j("",!0)])),_:2},1024),e.details.length?(_(),r(t,{key:0,class:"msg",onClick:a=>{return t=e.date,V=t,void O.value.open();var t}},{default:i((()=>[p("处理")])),_:2},1032,["onClick"])):j("",!0)])),_:2},1024)))),128))])),_:1})])),_:1})):(_(),r(t,{key:1,class:"default"},{default:i((()=>[c($,{src:D,mode:""}),c(t,{class:"text"},{default:i((()=>[p("暂无考勤明细～")])),_:1})])),_:1})),c(E,{ref_key:"refsMenuPopup",ref:O,type:"bottom","background-color":"#fff","is-mask-click":!1},{default:i((()=>[c(T,{dateVal:f(V),onCancel:Q,onSelectType:R},null,8,["dateVal"])])),_:1},512)])),_:1})}}},[["__scopeId","data-v-54a2afde"]]);export{Y as default};
