index-434c2777.js 9.8 KB

1
  1. import{d as Z,r as P,f as B,z as F,S as H,o as S,c as J,i,w as u,a as e,e0 as p,a_ as d,k as M,D as Q,j as U,m as V,n as K,E as N,s as W,_ as Y,q as $,__tla as ee}from"./index-1e808f2e.js";import{E as te,__tla as ae}from"./el-card-03b3588b.js";import{E as re,__tla as le}from"./el-skeleton-item-ac550ee3.js";import{_ as oe,__tla as ce}from"./Echart.vue_vue_type_script_setup_true_lang-a25ff2b1.js";import{_ as ie,__tla as se}from"./index.vue_vue_type_script_setup_true_lang-82cf76e3.js";import{c as ne,d as ue,e as me,f as de,__tla as _e}from"./trade-0686d223.js";import{_ as g,__tla as pe}from"./TradeStatisticValue.vue_vue_type_script_setup_true_lang-ea59de31.js";import{_ as f,__tla as fe}from"./index.vue_vue_type_script_setup_true_lang-ca7a6f97.js";import{d as ye}from"./download-20922b56.js";import{C as ve,__tla as Pe}from"./CardTitle-ddbf3c37.js";import{k as xe,f as ge,__tla as he}from"./formatTime-a348c3be.js";import{u as be,__tla as we}from"./useMessage-5f9e8917.js";import{_ as ke}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ce}from"./CountTo.vue_vue_type_script_setup_true_lang-cb3046c3.js";let O,Se=Promise.all([(()=>{try{return ee}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return le}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return _e}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return Ce}catch{}})()]).then(async()=>{let w,k;w={class:"flex flex-col"},k={class:"flex flex-row items-center justify-between"},O=ke(Z({name:"TradeStatistics",__name:"index",setup(Oe){const A=be(),h=P(!0),b=P(!1),m=P(),s=P(),y=P(),x=B({dataset:{dimensions:["date","turnoverPrice","orderPayPrice","rechargePrice","expensePrice"],source:[]},grid:{left:20,right:20,bottom:20,top:80,containLabel:!0},legend:{top:50},series:[{name:"\u8425\u4E1A\u989D",type:"line",smooth:!0},{name:"\u5546\u54C1\u652F\u4ED8\u91D1\u989D",type:"line",smooth:!0},{name:"\u5145\u503C\u91D1\u989D",type:"line",smooth:!0},{name:"\u652F\u51FA\u91D1\u989D",type:"line",smooth:!0}],toolbox:{feature:{dataZoom:{yAxisIndex:!1},brush:{type:["lineX","clear"]},saveAsImage:{show:!0,name:"\u4EA4\u6613\u72B6\u51B5"}}},tooltip:{trigger:"axis",axisPointer:{type:"cross"},padding:[5,10]},xAxis:{type:"category",boundaryGap:!1,axisTick:{show:!1}},yAxis:{axisTick:{show:!1}}}),I=async()=>{h.value=!0;const _=y.value.times;xe(_[0],_[1])&&(_[0]=ge(K(_[0]).subtract(1,"d"))),await Promise.all([R(),T()]),h.value=!1},R=async()=>{const _=y.value.times;s.value=await ue({times:_})},T=async()=>{const _=y.value.times,v=await me({times:_});for(let n of v)n.turnoverPrice=d(n.turnoverPrice),n.orderPayPrice=d(n.orderPayPrice),n.rechargePrice=d(n.rechargePrice),n.expensePrice=d(n.expensePrice);x.dataset&&x.dataset.source&&(x.dataset.source=v)},E=async()=>{try{await A.exportConfirm(),b.value=!0;const _=y.value.times,v=await de({times:_});ye.excel(v,"\u4EA4\u6613\u72B6\u51B5.xls")}catch{}finally{b.value=!1}};return F(async()=>{await(async()=>{m.value=await ne()})()}),(_,v)=>{const n=N,C=W,j=Y,z=$,D=ie,L=oe,q=re,G=te,X=H("hasPermi");return S(),J("div",w,[i(C,{gutter:16,class:"summary"},{default:u(()=>[i(n,{sm:6,xs:12},{default:u(()=>{var t,a,r,l,o,c;return[i(g,{tooltip:"\u6628\u65E5\u8BA2\u5355\u6570\u91CF",title:"\u6628\u65E5\u8BA2\u5355\u6570\u91CF",value:((a=(t=e(m))==null?void 0:t.value)==null?void 0:a.yesterdayOrderCount)||0,percent:e(p)((l=(r=e(m))==null?void 0:r.value)==null?void 0:l.yesterdayOrderCount,(c=(o=e(m))==null?void 0:o.reference)==null?void 0:c.yesterdayOrderCount)},null,8,["value","percent"])]}),_:1}),i(n,{sm:6,xs:12},{default:u(()=>{var t,a,r,l,o,c;return[i(g,{tooltip:"\u672C\u6708\u8BA2\u5355\u6570\u91CF",title:"\u672C\u6708\u8BA2\u5355\u6570\u91CF",value:((a=(t=e(m))==null?void 0:t.value)==null?void 0:a.monthOrderCount)||0,percent:e(p)((l=(r=e(m))==null?void 0:r.value)==null?void 0:l.monthOrderCount,(c=(o=e(m))==null?void 0:o.reference)==null?void 0:c.monthOrderCount)},null,8,["value","percent"])]}),_:1}),i(n,{sm:6,xs:12},{default:u(()=>{var t,a,r,l,o,c;return[i(g,{tooltip:"\u6628\u65E5\u652F\u4ED8\u91D1\u989D",title:"\u6628\u65E5\u652F\u4ED8\u91D1\u989D",prefix:"\uFFE5",decimals:2,value:e(d)(((a=(t=e(m))==null?void 0:t.value)==null?void 0:a.yesterdayPayPrice)||0),percent:e(p)((l=(r=e(m))==null?void 0:r.value)==null?void 0:l.yesterdayPayPrice,(c=(o=e(m))==null?void 0:o.reference)==null?void 0:c.yesterdayPayPrice)},null,8,["value","percent"])]}),_:1}),i(n,{sm:6,xs:12},{default:u(()=>{var t,a,r,l,o,c;return[i(g,{tooltip:"\u672C\u6708\u652F\u4ED8\u91D1\u989D",title:"\u672C\u6708\u652F\u4ED8\u91D1\u989D",prefix:"\uFFE5",":decimals":2,value:e(d)(((a=(t=e(m))==null?void 0:t.value)==null?void 0:a.monthPayPrice)||0),percent:e(p)((l=(r=e(m))==null?void 0:r.value)==null?void 0:l.monthPayPrice,(c=(o=e(m))==null?void 0:o.reference)==null?void 0:c.monthPayPrice)},null,8,["value","percent"])]}),_:1})]),_:1}),i(G,{shadow:"never"},{header:u(()=>[M("div",k,[i(e(ve),{title:"\u4EA4\u6613\u72B6\u51B5"}),i(D,{ref_key:"shortcutDateRangePicker",ref:y,onChange:I},{default:u(()=>[Q((S(),U(z,{class:"ml-4",onClick:E,loading:e(b)},{default:u(()=>[i(j,{icon:"ep:download",class:"mr-1"}),V("\u5BFC\u51FA ")]),_:1},8,["loading"])),[[X,["statistics:trade:export"]]])]),_:1},512)])]),default:u(()=>[i(C,{gutter:16},{default:u(()=>[i(n,{md:6,sm:12,xs:24},{default:u(()=>{var t,a,r,l,o,c;return[i(f,{title:"\u8425\u4E1A\u989D",tooltip:"\u5546\u54C1\u652F\u4ED8\u91D1\u989D\u3001\u5145\u503C\u91D1\u989D",icon:"fa-solid:yen-sign","icon-color":"bg-blue-100","icon-bg-color":"text-blue-500",prefix:"\uFFE5",decimals:2,value:e(d)(((a=(t=e(s))==null?void 0:t.value)==null?void 0:a.turnoverPrice)||0),percent:e(p)((l=(r=e(s))==null?void 0:r.value)==null?void 0:l.turnoverPrice,(c=(o=e(s))==null?void 0:o.reference)==null?void 0:c.turnoverPrice)},null,8,["value","percent"])]}),_:1}),i(n,{md:6,sm:12,xs:24},{default:u(()=>{var t,a,r,l,o,c;return[i(f,{title:"\u5546\u54C1\u652F\u4ED8\u91D1\u989D",tooltip:"\u7528\u6237\u8D2D\u4E70\u5546\u54C1\u7684\u5B9E\u9645\u652F\u4ED8\u91D1\u989D\uFF0C\u5305\u62EC\u5FAE\u4FE1\u652F\u4ED8\u3001\u4F59\u989D\u652F\u4ED8\u3001\u652F\u4ED8\u5B9D\u652F\u4ED8\u3001\u7EBF\u4E0B\u652F\u4ED8\u91D1\u989D\uFF08\u62FC\u56E2\u5546\u54C1\u5728\u6210\u56E2\u4E4B\u540E\u8BA1\u5165\uFF0C\u7EBF\u4E0B\u652F\u4ED8\u8BA2\u5355\u5728\u540E\u53F0\u786E\u8BA4\u652F\u4ED8\u540E\u8BA1\u5165\uFF09",icon:"fa-solid:shopping-cart","icon-color":"bg-purple-100","icon-bg-color":"text-purple-500",prefix:"\uFFE5",decimals:2,value:e(d)(((a=(t=e(s))==null?void 0:t.value)==null?void 0:a.orderPayPrice)||0),percent:e(p)((l=(r=e(s))==null?void 0:r.value)==null?void 0:l.orderPayPrice,(c=(o=e(s))==null?void 0:o.reference)==null?void 0:c.orderPayPrice)},null,8,["value","percent"])]}),_:1}),i(n,{md:6,sm:12,xs:24},{default:u(()=>{var t,a,r,l,o,c;return[i(f,{title:"\u5145\u503C\u91D1\u989D",tooltip:"\u7528\u6237\u6210\u529F\u5145\u503C\u7684\u91D1\u989D",icon:"fa-solid:money-check-alt","icon-color":"bg-yellow-100","icon-bg-color":"text-yellow-500",prefix:"\uFFE5",decimals:2,value:e(d)(((a=(t=e(s))==null?void 0:t.value)==null?void 0:a.rechargePrice)||0),percent:e(p)((l=(r=e(s))==null?void 0:r.value)==null?void 0:l.rechargePrice,(c=(o=e(s))==null?void 0:o.reference)==null?void 0:c.rechargePrice)},null,8,["value","percent"])]}),_:1}),i(n,{md:6,sm:12,xs:24},{default:u(()=>{var t,a,r,l,o,c;return[i(f,{title:"\u652F\u51FA\u91D1\u989D",tooltip:"\u4F59\u989D\u652F\u4ED8\u91D1\u989D\u3001\u652F\u4ED8\u4F63\u91D1\u91D1\u989D\u3001\u5546\u54C1\u9000\u6B3E\u91D1\u989D",icon:"ep:warning-filled","icon-color":"bg-green-100","icon-bg-color":"text-green-500",prefix:"\uFFE5",decimals:2,value:e(d)(((a=(t=e(s))==null?void 0:t.value)==null?void 0:a.expensePrice)||0),percent:e(p)((l=(r=e(s))==null?void 0:r.value)==null?void 0:l.expensePrice,(c=(o=e(s))==null?void 0:o.reference)==null?void 0:c.expensePrice)},null,8,["value","percent"])]}),_:1}),i(n,{md:6,sm:12,xs:24},{default:u(()=>{var t,a,r,l,o,c;return[i(f,{title:"\u4F59\u989D\u652F\u4ED8\u91D1\u989D",tooltip:"\u7528\u6237\u4E0B\u5355\u65F6\u4F7F\u7528\u4F59\u989D\u5B9E\u9645\u652F\u4ED8\u7684\u91D1\u989D",icon:"fa-solid:wallet","icon-color":"bg-cyan-100","icon-bg-color":"text-cyan-500",prefix:"\uFFE5",decimals:2,value:e(d)(((a=(t=e(s))==null?void 0:t.value)==null?void 0:a.walletPayPrice)||0),percent:e(p)((l=(r=e(s))==null?void 0:r.value)==null?void 0:l.walletPayPrice,(c=(o=e(s))==null?void 0:o.reference)==null?void 0:c.walletPayPrice)},null,8,["value","percent"])]}),_:1}),i(n,{md:6,sm:12,xs:24},{default:u(()=>{var t,a,r,l,o,c;return[i(f,{title:"\u652F\u4ED8\u4F63\u91D1\u91D1\u989D",tooltip:"\u540E\u53F0\u7ED9\u63A8\u5E7F\u5458\u652F\u4ED8\u7684\u63A8\u5E7F\u4F63\u91D1\uFF0C\u4EE5\u5B9E\u9645\u652F\u4ED8\u4E3A\u51C6",icon:"fa-solid:award","icon-color":"bg-yellow-100","icon-bg-color":"text-yellow-500",prefix:"\uFFE5",decimals:2,value:e(d)(((a=(t=e(s))==null?void 0:t.value)==null?void 0:a.brokerageSettlementPrice)||0),percent:e(p)((l=(r=e(s))==null?void 0:r.value)==null?void 0:l.brokerageSettlementPrice,(c=(o=e(s))==null?void 0:o.reference)==null?void 0:c.brokerageSettlementPrice)},null,8,["value","percent"])]}),_:1}),i(n,{md:6,sm:12,xs:24},{default:u(()=>{var t,a,r,l,o,c;return[i(f,{title:"\u5546\u54C1\u9000\u6B3E\u91D1\u989D",tooltip:"\u7528\u6237\u6210\u529F\u9000\u6B3E\u7684\u5546\u54C1\u91D1\u989D",icon:"fa-solid:times-circle","icon-color":"bg-blue-100","icon-bg-color":"text-blue-500",prefix:"\uFFE5",decimals:2,value:e(d)(((a=(t=e(s))==null?void 0:t.value)==null?void 0:a.afterSaleRefundPrice)||0),percent:e(p)((l=(r=e(s))==null?void 0:r.value)==null?void 0:l.afterSaleRefundPrice,(c=(o=e(s))==null?void 0:o.reference)==null?void 0:c.afterSaleRefundPrice)},null,8,["value","percent"])]}),_:1})]),_:1}),i(q,{loading:e(h),animated:""},{default:u(()=>[i(L,{height:500,options:e(x)},null,8,["options"])]),_:1},8,["loading"])]),_:1})])}}}),[["__scopeId","data-v-ed446fe4"]])});export{Se as __tla,O as default};