business.58adb576.js 2.0 KB

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