import{_ as C,d as x,cU as D,m as f,d1 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.e80c366d.js";import{s as h,c as y}from"./content.config.b6995743.js";import{u as w}from"./use-page-search.e3e95470.js";import{i as E}from"./isBeyondTime.85391023.js";import{f as S}from"./export.6f50dc45.js";import"./createRequset.60472412.js";import"./calc.3602fe08.js";import"./xlsx.ed122d16.js";const p="receivableMain",A=x({__name:"all",setup(R){const{hasPermissionWithCode:Y}=D(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:"2",...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:"2",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 M(){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:M,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 q=C(A,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/receivableMain/components/all.vue"]]);export{q as default};
