business.c499cd69.js 1.8 KB

1
  1. import{_ as y,d as B,m,cl as k,cU as b,d1 as R,w,r as f,o as p,A as d,x as h,u as n,D as S,H as N,a as P}from"./index.62ae038d.js";import{s as A,c as F,a as T}from"./content.config.7f9a472f.js";import{h as E}from"./export.100da817.js";import{i as I}from"./isBeyondTime.739eee0f.js";import{u as M}from"./use-page-search.490f9727.js";import{u as U,a as V}from"./useBusinessQuery.7142a93c.js";import"./createRequset.2509add7.js";import"./xlsx.ed122d16.js";import"./lodash.586958d1.js";const q="saleMonth",D=B({__name:"business",setup(H){const c=m(null),a=k(!1),{hasPermissionWithCode:C}=b(q),u=R(),{searchConfig:r}=U({sourceConfig:A,queryField:"companyNo"}),l=m(r),{contentConfig:_}=V({sourceConfig:F,apis:{httpList:T.list}}),g={pageSearchHook:()=>M(void 0,void 0,r)};w(()=>u.level,e=>{const{formItems:s}=l.value,o=s.findIndex(({field:i})=>i==="depart_id"),{itemid:t=""}=u.info||{};Number(e)===2&&(l.value.formItems[o].defaultValue=t)},{immediate:!0});const v={onSuccess:()=>a.value=!1,onStart:()=>a.value=!0,onFail:()=>a.value=!1};async function x(){const e=c.value.getBasicParams()||{},{start_day:s,end_day:o}=e;I({start:s,end:o,len:30})||await E({isAdmin:!1,name:"\u9500\u552E\u8BA2\u5355\u5546\u54C1\u7C7B\u578B.xlsx",fileType:"aplication/x-msexecl",url:"/purchease/sale/saleMonthExport",...v,params:e})}return(e,s)=>{const o=f("el-button"),t=f("PageContainer");return p(),d(t,{hooks:g,getContentRef:i=>c.value=i,"content-config":n(_),"search-config":n(r),lockKey:"companyNo"},{content_header:h(()=>[n(C)("18")?(p(),d(o,{key:0,icon:n(S)("arrow-up-line"),onClick:x,size:"small",type:"primary"},{default:h(()=>[N("\u5BFC\u51FA")]),_:1},8,["icon"])):P("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var Q=y(D,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/saleMonth/components/business.vue"]]);export{Q as default};