business.b78b6003.js 1.9 KB

1
  1. import{_ as k,d as R,m as f,cl as S,cp as b,cs 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.56449854.js";import{s as A,c as E,a as D}from"./content.config.cb4f8d5d.js";import{h as V}from"./export.a2ce61c0.js";import{u as j}from"./use-page-search.59eb5443.js";import{u as q,a as H}from"./useBusinessQuery.7bd11851.js";import"./createRequset.56e9fc42.js";import"./xlsx.ed122d16.js";import"./lodash.0da4bba2.js";const T="goodCostInfo",U=R({__name:"business",setup(z){const i=f(null),r=S(!1),{hasPermissionWithCode:g}=b(T),u=w(),{searchConfig:c}=q({sourceConfig:A,queryField:"companyNo"}),l=f(c),{contentConfig:h}=H({sourceConfig:E,apis:{httpList:D.list}}),_={pageSearchHook:()=>j(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 V({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/89793/Desktop/projects/report-v3/src/views/time/goodCostInfo/components/business.vue"]]);export{Q as default};