1 |
- import{_ as k,d as B,m as f,cl as F,cp as R,cs 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.56449854.js";import{s as N,c as E,a as D}from"./content.config.8bda3a74.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 L="goodOnlineList",O=B({__name:"business",setup(T){const i=f(null),r=F(!1),{hasPermissionWithCode:h}=R(L),u=S(),{searchConfig:c}=q({sourceConfig:N,queryField:"companyNo"}),l=f(c),{contentConfig:C}=H({sourceConfig:E,apis:{httpList:D.list}}),_={pageSearchHook:()=>j(function(o){const{year_month:s,...n}=o;let e="",t="";if(s){e=s+"-01";const y=I(e).subtract(1,"month").endOf("month").date();t=s+"-"+y}return{result:{...n,start:e,end:t},deleteProp:[]}},void 0,c)};b(()=>u.level,o=>{const{formItems:s}=l.value,n=s.findIndex(({field:t})=>t==="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({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,s)=>{const n=m("el-button"),e=m("PageContainer");return p(),d(e,{hooks:_,getContentRef:t=>i.value=t,"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(O,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/time/goodBasicInfo/components/business.vue"]]);export{Q as default};
|