import{_ as y,d as k,m as l,cl as S,cU as b,d1 as B,w as E,r as f,o as p,A as d,x as h,u as n,D as R,H as w,a as N}from"./index.e80c366d.js";import{s as P,c as D,a as F}from"./content.config.56ccffc8.js";import{h as T}from"./export.6f50dc45.js";import{i as A}from"./isBeyondTime.85391023.js";import{u as I}from"./use-page-search.e3e95470.js";import{u as U,a as V}from"./useBusinessQuery.00e2ea8d.js";import"./createRequset.60472412.js";import"./xlsx.ed122d16.js";import"./lodash.92db800d.js";const q="purcheaseOrderSum",H=k({__name:"business",setup(L){const c=l(null),a=S(!1),{hasPermissionWithCode:C}=b(q),u=B(),{searchConfig:r}=U({sourceConfig:P,queryField:"companyNo"}),m=l(r),{contentConfig:g}=V({sourceConfig:D,apis:{httpList:F.list}}),_={pageSearchHook:()=>I(void 0,void 0,r)};E(()=>u.level,e=>{const{formItems:s}=m.value,o=s.findIndex(({field:i})=>i==="depart_id"),{itemid:t=""}=u.info||{};Number(e)===2&&(m.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;A({start:s,end:o,len:30})||await T({isAdmin:!1,name:"\u5DE5\u5DEE\u660E\u7EC6\u5355.xlsx",fileType:"aplication/x-msexecl",url:"/purchease/sale/orderDiffListExport",...v,params:e})}return(e,s)=>{const o=f("el-button"),t=f("PageContainer");return p(),d(t,{hooks:_,getContentRef:i=>c.value=i,"content-config":n(g),"search-config":n(r),lockKey:"companyNo"},{content_header:h(()=>[n(C)("18")?(p(),d(o,{key:0,icon:n(R)("arrow-up-line"),onClick:x,size:"small",type:"primary"},{default:h(()=>[w(" \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/purcheaseOrderSum/components/business.vue"]]);export{Q as default};
