1 |
- import{_ as k,d as R,m as f,cl as S,cT as b,d0 as w,w as B,r as m,o as p,A as d,x as C,u as a,D as F,H as I,a as P,S as N}from"./index.2e9457cc.js";import{s as A,c as E,a as D}from"./content.config.7300c665.js";import{h as T}from"./export.a52061a5.js";import{u as V}from"./use-page-search.ea0049a0.js";import{u as j,a as q}from"./useBusinessQuery.47fbf468.js";import"./createRequset.3978c053.js";import"./xlsx.ed122d16.js";import"./lodash.53dc519d.js";const H="goodCostInfo",U=R({__name:"business",setup(z){const i=f(null),r=S(!1),{hasPermissionWithCode:g}=b(H),u=w(),{searchConfig:c}=j({sourceConfig:A,queryField:"companyNo"}),l=f(c),{contentConfig:h}=q({sourceConfig:E,apis:{httpList:D.list}}),_={pageSearchHook:()=>V(function(o){const{year_month:t,...n}=o;let e="",s="";if(t){e=t+"-01";const y=N(e).subtract(1,"month").endOf("month").date();s=t+"-"+y}return{result:{...n,start:e,end:s},deleteProp:[]}},void 0,c)};B(()=>u.level,o=>{const{formItems:t}=l.value,n=t.findIndex(({field:s})=>s==="depart_id"),{itemid:e=""}=u.info||{};Number(o)===2&&(l.value.formItems[n].defaultValue=e)},{immediate:!0});const v={onSuccess:()=>r.value=!1,onStart:()=>r.value=!0,onFail:()=>r.value=!1};async function x(){const o=i.value.getBasicParams()||{};await T({params:o,...v,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=m("el-button"),e=m("PageContainer");return p(),d(e,{hooks:_,getContentRef:s=>i.value=s,"content-config":a(h),"search-config":a(c),lockKey:"companyNo"},{content_header:C(()=>[a(g)("18")?(p(),d(n,{key:0,icon:a(F)("arrow-up-line"),onClick:x,size:"small",type:"primary"},{default:C(()=>[I("\u5BFC\u51FA")]),_:1},8,["icon"])):P("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var Q=k(U,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/goodCostInfo/components/business.vue"]]);export{Q as default};
|