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