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