import{r as a,a9 as e,ar as t,e as l,c_ as s,aa as u,f as _,g as d,h as n,w as r,z as i,o,i as c,a as f,j as v,t as m,k as p,l as g,F as y,_ as b,y as h,a8 as j,O as k}from"./index-Dnh6GPlT.js";import{_ as w}from"./uni-icons.C_vWVLAq.js";import{_ as x}from"./uni-nav-bar.Bf2crVgQ.js";import{_ as D}from"./empty.9XRZTjWt.js";import{_ as $}from"./_plugin-vue_export-helper.BCo6x5W8.js";/* empty css                                                                  *//* empty css                                                                    */const C=$({__name:"userOvertimeList",setup($){let C=`${(new Date).getFullYear()}-${(new Date).getMonth()+1}`,F=a(`${(new Date).getFullYear()}-${(new Date).getMonth()+1}`),Y=a(0),z=a(0),L=a(0),M=a(1),O=a();const I=a(!0);e((a=>{a.status&&(Y.value=a.status),a.user_id&&(L.value=a.user_id),a.user_id&&(L.value=a.user_id,O.value=a.user_name,t({title:O.value})),Z()}));const N=a([]);l([{label:"工作日",value:1},{label:"节假日",value:2},{label:"休息日",value:2}]);const Q=a([]);l([{label:"调休",value:1},{label:"加班费",value:2}]);const W=a=>{N.value=[],M.value=1,F.value=a.detail.value,Z()},Z=()=>{let a={date:F.value,date_type:Y.value,calc_type:z.value,user_id:L.value};s(a).then((a=>{Q.value=a.data}))},q=()=>{b()};return u((()=>{I.value&&(M.value++,Z())})),(a,e)=>{const t=i,l=h,s=_(d("uni-icons"),w),u=j,b=_(d("uni-nav-bar"),x),$=k;return o(),n(t,{class:"nav"},{default:r((()=>[c(b,{fixed:!0,"left-icon":"left","status-bar":"",backgroundColor:"rgba(255,255,255,1)",color:"#303133",border:!1,onClickLeft:q},{right:r((()=>[c(t,{class:"bar-right"},{default:r((()=>[c(u,{ref:"picker",mode:"date",fields:"month",value:f(F),start:"2021-01",end:f(C),onChange:W},{default:r((()=>[c(l,{class:"uni-nav-bar-text"},{default:r((()=>[c(l,{class:"month"},{default:r((()=>[v(m(f(F)),1)])),_:1}),c(s,{type:"arrowdown",color:"#606266",size:"12"})])),_:1})])),_:1},8,["value","end"])])),_:1})])),default:r((()=>[c(t,{class:"nav-content"},{default:r((()=>[c(t,{class:"title"},{default:r((()=>[c(t,{class:"head-title"},{default:r((()=>[v(m(f(O)),1)])),_:1}),c(l,null,{default:r((()=>[v("的加班明细")])),_:1})])),_:1})])),_:1})])),_:1}),c(t,{class:"card"},{default:r((()=>[c(t,{class:"table-title"},{default:r((()=>[c(t,{class:"item align-left"},{default:r((()=>[v("日期")])),_:1}),c(t,{class:"item"},{default:r((()=>[v("日期类型")])),_:1}),c(t,{class:"item"},{default:r((()=>[v("加班时长")])),_:1}),c(t,{class:"item align-right"},{default:r((()=>[v("核算方式")])),_:1})])),_:1}),f(Q).length>0?(o(),n(t,{key:0,class:"table-list"},{default:r((()=>[(o(!0),p(y,null,g(f(Q),((a,e)=>(o(),n(t,{class:"item",key:e},{default:r((()=>[c(t,{class:"msg align-left"},{default:r((()=>[v(m(a.date),1)])),_:2},1024),c(t,{class:"msg"},{default:r((()=>[v(m(1==a.date_type?"工作日":2==a.date_type?"休息日":3==a.date_type?"节假日":""),1)])),_:2},1024),c(t,{class:"msg"},{default:r((()=>[v(m(a.work_hours)+m("day"==a.time_type?"天":"hour"==a.time_type?"小时":""),1)])),_:2},1024),c(t,{class:"msg align-right"},{default:r((()=>[v(m(1==a.calc_type?"调休":"加班费"),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1})):(o(),n(t,{key:1,class:"default"},{default:r((()=>[c($,{src:D,mode:""}),c(t,{class:"text"},{default:r((()=>[v("暂无加班明细～")])),_:1})])),_:1}))])),_:1})])),_:1})}}},[["__scopeId","data-v-99680a25"]]);export{C as default};
