import{_ as k,d as B,m as f,cl as F,cU as R,d1 as S,w as b,r as m,o as p,A as d,x as g,u as a,D as w,H as P,a as A,S as I}from"./index.e80c366d.js";import{s as N,c as E,a as D}from"./content.config.fc655971.js";import{h as U}from"./export.6f50dc45.js";import{u as V}from"./use-page-search.e3e95470.js";import{u as j,a as q}from"./useBusinessQuery.00e2ea8d.js";import"./createRequset.60472412.js";import"./xlsx.ed122d16.js";import"./lodash.92db800d.js";const H="goodOnlineList",L=B({__name:"business",setup(O){const i=f(null),r=F(!1),{hasPermissionWithCode:h}=R(H),u=S(),{searchConfig:c}=j({sourceConfig:N,queryField:"companyNo"}),l=f(c),{contentConfig:C}=q({sourceConfig:E,apis:{httpList:D.list}}),_={pageSearchHook:()=>V(function(o){const{year_month:t,...n}=o;let e="",s="";if(t){e=t+"-01";const y=I(e).subtract(1,"month").endOf("month").date();s=t+"-"+y}return{result:{...n,start:e,end:s},deleteProp:[]}},void 0,c)};b(()=>u.level,o=>{const{formItems:t}=l.value,n=t.findIndex(({field:s})=>s==="depart_id"),{itemid:e=""}=u.info||{};Number(o)===2&&(l.value.formItems[n].defaultValue=e)},{immediate:!0});const v={onSuccess:()=>r.value=!1,onStart:()=>r.value=!0,onFail:()=>r.value=!1};async function x(){const o=i.value.getBasicParams()||{};await U({isAdmin:!1,name:"\u5546\u54C1\u57FA\u672C\u4FE1\u606F\u62A5\u8868.xlsx",fileType:"aplication/x-msexecl",url:"/purchease/purchase/goodBasicInfoExport",...v,params:o})}return(o,t)=>{const n=m("el-button"),e=m("PageContainer");return p(),d(e,{hooks:_,getContentRef:s=>i.value=s,"content-config":a(C),"search-config":a(c),lockKey:"companyNo"},{content_header:g(()=>[a(h)("18")?(p(),d(n,{key:0,icon:a(w)("arrow-up-line"),onClick:x,size:"small",type:"primary"},{default:g(()=>[P("\u5BFC\u51FA")]),_:1},8,["icon"])):A("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var Q=k(L,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/goodBasicInfo/components/business.vue"]]);export{Q as default};
