import{_ as y,d as v,m as p,cT as x,d0 as b,w as E,r as f,o as l,A as d,x as g,u as a,D as k,H as B,a as N,cc as F}from"./index.d0c68291.js";import{s as w,c as A,a as P}from"./content.config.7f8c0fbc.js";import{f as R}from"./export.8d59e752.js";import{i as I}from"./isBeyondTime.2be61112.js";import{u as S}from"./use-page-search.f8fe5a6b.js";import{u as T,a as D}from"./useBusinessQuery.0cfc7001.js";import"./createRequset.2a519b90.js";import"./isBeyondTime.e55d9c20.js";import"./calc.3602fe08.js";import"./lodash.ae569796.js";const M="companyNo",V="receivableManager",H=v({__name:"business",setup(K){const r=p(null),{hasPermissionWithCode:C}=x(V),u=b(),{searchConfig:c}=T({sourceConfig:w,queryField:"companyNo"}),i=p(c),{contentConfig:m}=D({sourceConfig:A,apis:{httpList:P.list}}),_={pageSearchHook:()=>S(e=>({result:{...e,plat_type:"1"}}),e=>({result:{...e,plat_type:"1"}}),c)};E(()=>u.level,e=>{const{formItems:n}=i.value,o=n.findIndex(({field:t})=>t==="depart_id"),{itemid:s=""}=u.info||{};Number(e)===2&&(i.value.formItems[o].disabled=Number(e)===2,i.value.formItems[o].defaultValue=s)},{immediate:!0});async function h(){const e=r.value.getBasicParams()||{},{start:n,end:o}=e;if(!e[M]){F.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8");return}if(I({end:o,start:n,len:30}))return;const t=r.value.getData();R({columns:m.columns,name:"\u9879\u76EE\u7ECF\u7406\u65E5\u62A5.xlsx",data:t})}return(e,n)=>{const o=f("el-button"),s=f("PageContainer");return l(),d(s,{hooks:_,getContentRef:t=>r.value=t,"content-config":a(m),"search-config":a(c),lockKey:"companyNo"},{content_header:g(()=>[a(C)("18")?(l(),d(o,{key:0,icon:a(k)("arrow-up-line"),onClick:h,size:"small",type:"primary"},{default:g(()=>[B("\u5BFC\u51FA")]),_:1},8,["icon"])):N("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var Q=y(H,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/receivableManager/components/business.vue"]]);export{Q as default};
