import{_ as y,d as v,m as p,cp as x,cs 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 N,a as E,ce as w}from"./index.56449854.js";import{s as A,c as F,a as P}from"./content.config.3e15cbbb.js";import{f as R}from"./export.a2ce61c0.js";import{i as D}from"./isBeyondTime.b16fe52f.js";import{u as I}from"./use-page-search.59eb5443.js";import{u as S,a as T}from"./useBusinessQuery.7bd11851.js";import"./createRequset.56e9fc42.js";import"./isBeyondTime.ddc44ee0.js";import"./calc.f00124e1.js";import"./xlsx.ed122d16.js";import"./lodash.0da4bba2.js";const V="companyNo",H="reportDaily",K=v({__name:"business",setup(U){const r=p(null),{hasPermissionWithCode:C}=x(H),u=b(),{searchConfig:i}=S({sourceConfig:A,queryField:"companyNo"}),c=p(i),{contentConfig:m}=T({sourceConfig:F,apis:{httpList:P.list}}),_={pageSearchHook:()=>I(void 0,void 0,i)};k(()=>u.level,e=>{const{formItems:n}=c.value,o=n.findIndex(({field:t})=>t==="depart_id"),{itemid:s=""}=u.info||{};Number(e)===2&&(c.value.formItems[o].disabled=Number(e)===2,c.value.formItems[o].defaultValue=s)},{immediate:!0});async function h(){const e=r.value.getBasicParams()||{},{start:n,end:o}=e;if(!e[V]){w.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8");return}if(D({end:o,start:n,len:30}))return;const t=r.value.getData();R({columns:m.columns,name:"\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(i),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(()=>[N("\u5BFC\u51FA")]),_:1},8,["icon"])):E("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var X=y(K,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/time/reportDaily/components/business.vue"]]);export{X as default};