import{_ as y,d as v,m as p,cU as x,d1 as b,w as k,r as f,o as l,A as d,x as g,u as a,D as B,H as E,a as A,cc as N}from"./index.e80c366d.js";import{s as F,c as w,a as P}from"./content.config.69c43c8c.js";import{f as R}from"./export.6f50dc45.js";import{i as I}from"./isBeyondTime.85391023.js";import{u as S}from"./use-page-search.e3e95470.js";import{u as T,a as D}from"./useBusinessQuery.00e2ea8d.js";import"./createRequset.60472412.js";import"./isBeyondTime.e174d920.js";import"./calc.3602fe08.js";import"./xlsx.ed122d16.js";import"./lodash.92db800d.js";const M="companyNo",U="receivableManager",V=v({__name:"business",setup(H){const r=p(null),{hasPermissionWithCode:C}=x(U),u=b(),{searchConfig:c}=T({sourceConfig:F,queryField:"companyNo"}),i=p(c),{contentConfig:m}=D({sourceConfig:w,apis:{httpList:P.list}}),_={pageSearchHook:()=>S(e=>({result:{...e,plat_type:"1"}}),e=>({result:{...e,plat_type:"1"}}),c)};k(()=>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]){N.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:"\u4E1A\u52A1\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(B)("arrow-up-line"),onClick:h,size:"small",type:"primary"},{default:g(()=>[E("\u5BFC\u51FA")]),_:1},8,["icon"])):A("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var X=y(V,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/receivableManager/components/business.vue"]]);export{X as default};
