import{_ as y,d as S,m,cl as k,cU as R,d1 as w,w as B,r as p,o as f,A as d,x as g,u as s,D,H as b,a as E}from"./index.e80c366d.js";import{s as F,c as N,a as P}from"./search.config.8c5738d4.js";import{h as A}from"./export.6f50dc45.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="sameDayShipment",H=S({__name:"business",setup(T){const r=m(null),e=k(!1),{hasPermissionWithCode:h}=R(q),c=w(),{searchConfig:t}=U({sourceConfig:F,queryField:"companyNo"}),u=m(t),{contentConfig:C}=V({sourceConfig:N,apis:{httpList:P.list}}),_={pageSearchHook:()=>I(void 0,void 0,t)};B(()=>c.level,o=>{const{formItems:l}=u.value,n=l.findIndex(({field:i})=>i==="depart_id"),{itemid:a=""}=c.info||{};Number(o)===2&&(u.value.formItems[n].defaultValue=a)},{immediate:!0});const v={onSuccess:()=>e.value=!1,onStart:()=>e.value=!0,onFail:()=>e.value=!1};async function x(){const o=r.value.getBasicParams()||{};await A({isAdmin:!1,name:"\u5F53\u65E5\u53D1\u8D27\u660E\u7EC6\u8868.xlsx",fileType:"aplication/x-msexecl",url:"/purchease/sale/sameDayShipmentExport",...v,params:o})}return(o,l)=>{const n=p("el-button"),a=p("PageContainer");return f(),d(a,{hooks:_,getContentRef:i=>r.value=i,"content-config":s(C),"search-config":s(t),lockKey:"companyNo"},{content_header:g(()=>[s(h)("18")?(f(),d(n,{key:0,loading:e.value,icon:s(D)("arrow-up-line"),onClick:x,size:"small",type:"primary"},{default:g(()=>[b("\u5BFC\u51FA")]),_:1},8,["loading","icon"])):E("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var M=y(H,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/sameDayShipment/components/business.vue"]]);export{M as default};
