all.8be37211.js 1.8 KB

1
  1. import{_ as y,d as w,cp as I,m as _,cl as S,cs 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.56449854.js";import{s as u,c as E}from"./content.config.cb4f8d5d.js";import{u as V}from"./use-page-search.59eb5443.js";import{h as D}from"./export.a2ce61c0.js";import"./createRequset.56e9fc42.js";import"./xlsx.ed122d16.js";const m="goodCostInfo",j=w({__name:"all",setup(H){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(j,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/time/goodCostInfo/components/all.vue"]]);export{G as default};