import{_ as x,d as D,cT as M,m as f,d0 as b,w as I,r as m,o as _,A as g,x as u,h as k,u as d,D as B,H as N,a as P,S as s}from"./index.d0c68291.js";import{s as h,c as y}from"./content.config.7e3496d7.js";import{u as w}from"./use-page-search.f8fe5a6b.js";import{i as E}from"./isBeyondTime.2be61112.js";import{f as S}from"./export.8d59e752.js";import"./createRequset.2a519b90.js";import"./calc.3602fe08.js";const p="receivable",T=D({__name:"all",setup(A){const{hasPermissionWithCode:Y}=M(p),i=f(null),l=b(),v={pageSearchHook:()=>w(a=>{const{date:e,...t}=a,o=s(e).format("YYYY-MM-DD"),n=s(e).daysInMonth(),r=s(o).subtract(-(n-1),"days").format("YYYY-MM-DD");return{result:{start:o+" 00:00:00",end:r+" 23:59:59",plat_type:"1",dz_type:"1",...t},deleteProps:["date"]}},a=>{const{date:e,depart_id:t}=a,o=s(e).format("YYYY-MM-DD"),n=s(e).daysInMonth(),r=s(o).subtract(-(n-1),"days").format("YYYY-MM-DD");return{result:{start:o+" 00:00:00",end:r+" 23:59:59",plat_type:"1",dz_type:"1",depart_id:t},deleteProps:["date"]}},h)},c=f(h);I(()=>l.level,a=>{const{formItems:e}=c.value,t=e.findIndex(({field:n})=>n==="depart_id"),{itemid:o=""}=l.info||{};Number(a)===2&&(c.value.formItems[t].disabled=Number(a)===2,c.value.formItems[t].defaultValue=o)},{immediate:!0});async function C(){const a=i.value.getBasicParams()||{},{start:e,end:t}=a;if(E({start:e,end:t,len:30}))return;const n=i.value.getData();S({columns:y.columns,name:"\u5E94\u6536\u8D26\u6B3E\u6C47\u603B.xlsx",data:n})}return(a,e)=>{const t=m("el-button"),o=m("page-container"),n=m("page-auth");return _(),g(n,{"page-name":p},{default:u(()=>[k(o,{hooks:v,"page-name":p,"get-content-ref":r=>i.value=r,"content-config":d(y),"search-config":c.value},{content_header:u(()=>[d(Y)("9")?(_(),g(t,{key:0,onClick:C,size:"small",icon:d(B)("arrow-up-line"),type:"primary"},{default:u(()=>[N("\u5BFC\u51FA")]),_:1},8,["icon"])):P("v-if",!0)]),_:1},8,["get-content-ref","content-config","search-config"])]),_:1})}}});var W=x(T,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/receivable/components/all.vue"]]);export{W as default};
