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