business.1ed8e4a6.js 2.0 KB

1
  1. import{_ as P,d as b,m as l,cl as k,cU as B,d1 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.62ae038d.js";import{s as N,c as A,a as T}from"./content.config.d09da03f.js";import{h as D}from"./export.100da817.js";import{i as U}from"./isBeyondTime.739eee0f.js";import{u as V}from"./use-page-search.490f9727.js";import{u as j,a as q}from"./useBusinessQuery.7142a93c.js";import"./createRequset.2509add7.js";import"./xlsx.ed122d16.js";import"./lodash.586958d1.js";const H="goodPriceInfo",z=b({__name:"business",setup(K){const i=l(null),r=k(!1),{hasPermissionWithCode:h}=B(H),u=F(),{searchConfig:c}=j({sourceConfig:N,queryField:"companyNo"}),m=l(c),{contentConfig:C}=q({sourceConfig:A,apis:{httpList:T.list}}),_={pageSearchHook:()=>V(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;U({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};