business.9f1b113b.js 1.9 KB

1
  1. import{_ as k,d as B,m as f,cl as F,cT as R,d0 as S,w as b,r as m,o as p,A as d,x as g,u as a,D as w,H as P,a as A,S as I}from"./index.5825373a.js";import{s as N,c as E,a as D}from"./content.config.3741f040.js";import{h as T}from"./export.77430aa8.js";import{u as V}from"./use-page-search.61a9d9c5.js";import{u as j,a as q}from"./useBusinessQuery.93b595ef.js";import"./createRequset.bcc048cf.js";import"./xlsx.ed122d16.js";import"./lodash.d072a1f6.js";const H="goodOnlineList",L=B({__name:"business",setup(O){const i=f(null),r=F(!1),{hasPermissionWithCode:h}=R(H),u=S(),{searchConfig:c}=j({sourceConfig:N,queryField:"companyNo"}),l=f(c),{contentConfig:C}=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=I(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({isAdmin:!1,name:"\u5546\u54C1\u57FA\u672C\u4FE1\u606F\u62A5\u8868.xlsx",fileType:"aplication/x-msexecl",url:"/purchease/purchase/goodBasicInfoExport",...v,params:o})}return(o,t)=>{const n=m("el-button"),e=m("PageContainer");return p(),d(e,{hooks:_,getContentRef:s=>i.value=s,"content-config":a(C),"search-config":a(c),lockKey:"companyNo"},{content_header:g(()=>[a(h)("18")?(p(),d(n,{key:0,icon:a(w)("arrow-up-line"),onClick:x,size:"small",type:"primary"},{default:g(()=>[P("\u5BFC\u51FA")]),_:1},8,["icon"])):A("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var Q=k(L,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/goodBasicInfo/components/business.vue"]]);export{Q as default};