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