import{_ as y,d as k,m,cl as b,cT as B,d0 as R,w,r as f,o as p,A as d,x as g,u as n,D as S,H as A,a as F}from"./index.d0c68291.js";import{s as N,c as P,a as T}from"./content.config.ec6b7dec.js";import{h as E}from"./export.8d59e752.js";import{i as I}from"./isBeyondTime.2be61112.js";import{u as D}from"./use-page-search.f8fe5a6b.js";import{u as V,a as q}from"./useBusinessQuery.0cfc7001.js";import"./isBeyondTime.e55d9c20.js";import"./createRequset.2a519b90.js";import"./lodash.ae569796.js";const H="consult",L=k({__name:"business",setup(U){const c=m(null),a=b(!1),{hasPermissionWithCode:C}=B(H),u=R(),{searchConfig:r}=V({sourceConfig:N,queryField:"companyNo"}),l=m(r),{contentConfig:_}=q({sourceConfig:P,apis:{httpList:T.list}}),h={pageSearchHook:()=>D(void 0,void 0,r)};w(()=>u.level,e=>{const{formItems:s}=l.value,o=s.findIndex(({field:i})=>i==="depart_id"),{itemid:t=""}=u.info||{};Number(e)===2&&(l.value.formItems[o].defaultValue=t)},{immediate:!0});const v={onSuccess:()=>a.value=!1,onStart:()=>a.value=!0,onFail:()=>a.value=!1};async function x(){const e=c.value.getBasicParams()||{},{start:s,end:o}=e;I({start:s,end:o,len:30})||await E({isAdmin:!1,name:"\u7ADE\u4EF7\u5355\u62A5\u8868.xlsx",fileType:"aplication/x-msexecl",url:"/purchease/sale/consultInfoListExport",...v,params:e})}return(e,s)=>{const o=f("el-button"),t=f("PageContainer");return p(),d(t,{hooks:h,getContentRef:i=>c.value=i,"content-config":n(_),"search-config":n(r),lockKey:"companyNo"},{content_header:g(()=>[n(C)("18")?(p(),d(o,{key:0,icon:n(S)("arrow-up-line"),onClick:x,size:"small",type:"primary"},{default:g(()=>[A("\u5BFC\u51FA")]),_:1},8,["icon"])):F("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var Q=y(L,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/consult/components/business.vue"]]);export{Q as default};
