import{_ as b,d as M,m as d,cT as B,cl as k,d0 as E,w,r as f,ag as I,B as N,o as g,A as _,x as h,u as i,D as P,H as R,a as S,cc as F,S as a}from"./index.d0c68291.js";import{s as T,c as A,a as V}from"./content.config.cbee2472.js";import{i as j}from"./isBeyondTime.2be61112.js";import{u as q}from"./use-page-search.f8fe5a6b.js";import{u as z,a as H}from"./useBusinessQuery.0cfc7001.js";import{h as K}from"./export.8d59e752.js";import"./createRequset.2a519b90.js";import"./lodash.ae569796.js";const L="companyNo",U="receivableDetail",W=M({__name:"business",setup($){const m=d(null),{hasPermissionWithCode:y}=B(U),c=k(!1),p=E(),{searchConfig:u}=z({sourceConfig:T,queryField:"companyNo"}),l=d(u),{contentConfig:C}=H({sourceConfig:A,apis:{httpList:V.list}}),v={pageSearchHook:()=>q(e=>{const{date:t,...s}=e,o=a(t).format("YYYY-MM-DD"),n=a(t).daysInMonth(),r=a(o).subtract(-(n-1),"days").format("YYYY-MM-DD");return{result:{start:o+" 00:00:00",end:r+" 23:59:59",plat_type:"1",...s},deleteProps:["date"]}},e=>{const{date:t,companyNo:s,depart_id:o}=e,n=a(t).format("YYYY-MM-DD"),r=a(t).daysInMonth(),D=a(n).subtract(-(r-1),"days").format("YYYY-MM-DD");return{result:{start:n+" 00:00:00",end:D+" 23:59:59",companyNo:s,plat_type:"1",depart_id:o},deleteProps:["date"]}},u)};w(()=>p.level,e=>{const{formItems:t}=l.value,s=t.findIndex(({field:n})=>n==="depart_id"),{itemid:o=""}=p.info||{};Number(e)===2&&(l.value.formItems[s].disabled=Number(e)===2,l.value.formItems[s].defaultValue=o)},{immediate:!0});const Y={onSuccess:()=>c.value=!1,onStart:()=>c.value=!0,onFail:()=>c.value=!1};async function x(){const e=m.value.getBasicParams()||{},{start:t,end:s}=e;if(!e[L]){F.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8");return}j({start:t,end:s,len:30})||await K({fileType:"aplication/x-msexecl",name:"\u5E94\u6536\u8D26\u6B3E\u660E\u7EC6.xlsx",url:"/admin/report/dzListExport",...Y,params:e})}return(e,t)=>{const s=f("el-button"),o=f("PageContainer"),n=I("loading");return N((g(),_(o,{hooks:v,getContentRef:r=>m.value=r,"content-config":i(C),"search-config":i(u),lockKey:"companyNo"},{content_header:h(()=>[i(y)("18")?(g(),_(s,{key:0,icon:i(P)("arrow-up-line"),onClick:x,size:"small",type:"primary"},{default:h(()=>[R("\u5BFC\u51FA")]),_:1},8,["icon"])):S("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])),[[n,c.value]])}}});var se=b(W,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/receivableDetail/components/business.vue"]]);export{se as default};
