import{_ as b,d as M,cU as I,m as h,d1 as k,cl as w,w as B,r as u,ag as E,B as S,o as g,A as v,x as m,h as N,u as i,D as P,H as R,a as T,S as n}from"./index.e80c366d.js";import{s as d,c as A}from"./content.config.24678ce5.js";import{u as F}from"./use-page-search.e3e95470.js";import{i as V}from"./isBeyondTime.85391023.js";import{h as U}from"./export.6f50dc45.js";import"./createRequset.60472412.js";import"./xlsx.ed122d16.js";const p="receivableDetail",j=M({__name:"all",setup(z){const{hasPermissionWithCode:y}=I(p),f=h(null),_=k(),c=w(!1),Y={pageSearchHook:()=>F(e=>{const{date:t,...a}=e,o=n(t).format("YYYY-MM-DD"),s=n(t).daysInMonth(),r=n(o).subtract(-(s-1),"days").format("YYYY-MM-DD");return{result:{start:o+" 00:00:00",end:r+" 23:59:59",plat_type:"1",...a},deleteProps:["date"]}},e=>{const{date:t,depart_id:a}=e,o=n(t).format("YYYY-MM-DD"),s=n(t).daysInMonth(),r=n(o).subtract(-(s-1),"days").format("YYYY-MM-DD");return{result:{start:o+" 00:00:00",end:r+" 23:59:59",plat_type:"1",depart_id:a},deleteProps:["date"]}},d)},l=h(d);B(()=>_.level,e=>{const{formItems:t}=l.value,a=t.findIndex(({field:s})=>s==="depart_id"),{itemid:o=""}=_.info||{};Number(e)===2&&(l.value.formItems[a].disabled=Number(e)===2,l.value.formItems[a].defaultValue=o)},{immediate:!0});const x={onSuccess:()=>c.value=!1,onStart:()=>c.value=!0,onFail:()=>c.value=!1};async function D(){const e=f.value.getBasicParams()||{},{start:t,end:a}=e;V({start:t,end:a,len:30})||await U({fileType:"aplication/x-msexecl",name:"\u5E94\u6536\u8D26\u6B3E\u660E\u7EC6.xlsx",url:"/admin/report/dzListExport",...x,params:e})}return(e,t)=>{const a=u("el-button"),o=u("page-container"),s=u("page-auth"),r=E("loading");return S((g(),v(s,{"page-name":p},{default:m(()=>[N(o,{hooks:Y,"page-name":p,"get-content-ref":C=>f.value=C,"content-config":i(A),"search-config":i(d)},{content_header:m(()=>[i(y)("9")?(g(),v(a,{key:0,onClick:D,size:"small",icon:i(P)("arrow-up-line"),type:"primary"},{default:m(()=>[R("\u5BFC\u51FA")]),_:1},8,["icon"])):T("v-if",!0)]),_:1},8,["get-content-ref","content-config","search-config"])]),_:1})),[[r,c.value]])}}});var O=b(j,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/receivableDetail/components/all.vue"]]);export{O as default};
