import{_ as g,d as F,cl as h,m as B,r as u,o as v,A as E,x as r,h as A,u as t,D as x,H as y,cc as n,S as k}from"./index.e80c366d.js";import{s as w,c as D,h as R}from"./content.config.7fa1ad75.js";import{h as S}from"./export.6f50dc45.js";import{u as b}from"./use-page-search.e3e95470.js";import{u as P,a as z}from"./useBusinessQuery.d9a57566.js";import"./xlsx.ed122d16.js";import"./lodash.92db800d.js";const c="relaComNo",N=F({__name:"business",setup(j){const o=h(!1),s=B(null),{searchConfig:a}=P({sourceConfig:w}),{contentConfig:i}=z({sourceConfig:D,apis:{httpList:R}}),f={pageSearchHook:()=>b(void 0,void 0,a)},l={onSuccess:()=>o.value=!1,onStart:()=>o.value=!0,onFail:()=>o.value=!1};async function p(){const e=s.value.getBasicParams()||{};if(!e.start_date&&!e.end_date){n.warning("\u8BF7\u9009\u62E9\u5BFC\u51FA\u6587\u4EF6\u7684\u65F6\u95F4\u533A\u95F4!");return}if(k(e.end_date).diff(e.start_date,"days")>30){n.warning("\u8BF7\u9009\u62E9\u5BFC\u51FA\u6587\u4EF6\u7684\u65F6\u95F4\u533A\u95F4\u4E0D\u80FD\u8D85\u8FC730\u5929!");return}if(!e[c]){n.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8");return}await S({url:"r_saleexportconsultinfoexport",fileType:"aplication/zip",isPurchase:!0,name:"\u7ADE\u4EF7\u5355\u62A5\u8868.zip",...l,params:e})}return(e,m)=>{const C=u("el-button"),_=u("PageContainer");return v(),E(_,{hooks:f,lockKey:c,getContentRef:d=>s.value=d,"content-config":t(i),"search-config":t(a)},{content_header:r(()=>[A(C,{onClick:p,size:"small",icon:t(x)("arrow-up-line"),type:"primary"},{default:r(()=>[y("\u5BFC\u51FA")]),_:1},8,["icon"])]),_:1},8,["getContentRef","content-config","search-config"])}}});var M=g(N,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/reportCollection/frontBidOrder/components/business.vue"]]);export{M as default};
