import{_ as C,d as g,cl as d,m as h,r as i,o as v,A as x,x as u,h as B,u as n,D as k,H as y,cc as R}from"./index.d0c68291.js";import{s as b,c as A}from"./content.config.a590b655.js";import{u as w}from"./use-page-search.f8fe5a6b.js";import{u as F,a as E}from"./useBusinessQuery.e2ee6dc1.js";import{c as P}from"./createRequset.043df941.js";import{h as S}from"./export.8d59e752.js";import{i as T}from"./isBeyondTime.e55d9c20.js";import"./lodash.ae569796.js";const N="relaComNo",z=g({__name:"business",setup(H){const o=d(!1),s=h(null),{searchConfig:a}=F({sourceConfig:b}),{contentConfig:l}=E({sourceConfig:A,apis:{httpList:P("r_saleexportlist")}}),p={pageSearchHook:()=>w(void 0,void 0,a)},f={onSuccess:()=>o.value=!1,onStart:()=>o.value=!0,onFail:()=>o.value=!1};async function m(){const e=s.value.getBasicParams()||{},{start_date:r,end_date:t}=e;if(!e[N]){R.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8");return}T({start:r,end:t,len:10})||await S({fileType:"aplication/zip",url:"r_saleexport",name:"\u8BA2\u5355\u62A5\u8868.zip",isPurchase:!0,...f,params:e})}return(e,r)=>{const t=i("el-button"),c=i("PageContainer");return v(),x(c,{hooks:p,getContentRef:_=>s.value=_,"content-config":n(l),"search-config":n(a),lockKey:"relaComNo"},{content_header:u(()=>[B(t,{onClick:m,size:"small",icon:n(k)("arrow-up-line"),type:"primary"},{default:u(()=>[y("\u5BFC\u51FA")]),_:1},8,["icon"])]),_:1},8,["getContentRef","content-config","search-config"])}}});var O=C(z,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/reportCollection/frontOrder/components/business.vue"]]);export{O as default};
