2 lines
7.6 KiB
JavaScript
2 lines
7.6 KiB
JavaScript
import{S as j,J as U,K,w as X,L as I,o as J,M as P,N as W}from"./element-plus.ea2cdc63.js";import{_ as Z}from"./index.dc6df116.js";import"./index.af73db67.js";import{b as q,a as G}from"./system_store.86d5d3c7.js";import{h as v}from"./moment.40bc58bf.js";import{B as C}from"./vue-echarts.01ad0ec2.js";import{d as L,Z as D,r as p,i as H,o as d,c as x,U as t,L as r,a as o,u as n,j as A,T as M,a9 as Y,K as Q,R as $,a0 as ee,S as k,O as te}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.60201f64.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./resize-detector.4e96b72b.js";const oe={class:"workbench"},ae={class:"flex justify-between items-center"},ue={class:"flex items-center"},se=o("span",{class:"text-2xl mr-4"},"\u8FD0\u8425\u6982\u51B5",-1),ne=o("span",{class:"ml-4 text-info text-[12px]"},"\u70B9\u51FB\u5DE6\u4FA7\u5207\u6362\u95E8\u5E97",-1),le={class:"flex items-center text-sm"},re=o("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1),ie={class:"flex flex-wrap box-border mt-4"},me={class:"flex"},ce={class:"mr-2"},pe={class:"text-info"},de={class:"text-6xl"},_e=o("span",{class:"text-2xl"},"\u8425\u4E1A\u8D8B\u52BF",-1),he={class:"mt-4 flex justify-center"},fe=o("span",{class:"text-2xl"},"\u4EA4\u6613\u6570\u636E",-1),ve=o("span",{class:"text-2xl"},"\u4EA4\u6613\u7C7B\u578B",-1),De=L({name:"statistics_store"}),ot=L({...De,setup(xe){const S=[{text:"\u8FD1\u4E00\u5468",value:()=>{const u=new Date,e=new Date;return e.setDate(e.getDate()-7),[e,u]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const u=new Date,e=new Date;return e.setMonth(e.getMonth()-1),[e,u]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const u=new Date,e=new Date;return e.setMonth(e.getMonth()-3),[e,u]}}],_=D({xAxis:{type:"category",data:[0],axisLabel:{rotate:45,color:"#333"}},yAxis:[{type:"value",name:"\u7528\u6237\u6570\u91CF",position:"left",axisLabel:{formatter:"{value}"}},{type:"value",name:"\u91D1\u989D",position:"right",axisLabel:{formatter:"{value}"}}],grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},legend:{data:["\u8BBF\u95EE\u91CF"]},itemStyle:{color:"red"},tooltip:{trigger:"axis"},series:[{data:[],type:"line",smooth:!0,name:"\u95E8\u5E97\u6536\u6B3E"},{data:[],type:"line",smooth:!0,name:"\u65B0\u589E\u7528\u6237"}]});D({tooltip:{formatter:"{a} <br/>{b}: {c} ({d}%)"},legend:{data:[]},series:[{name:"\u4EA4\u6613\u7C7B\u578B",type:"pie",radius:["35%","65%"],center:["50%","60%"],data:[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]});const R=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],b=D([{name:"\u95E8\u5E97\u6536\u6B3E\u91D1\u989D",type:"receipt_amount",icon:"RectangleCopy",num:0},{name:"\u95E8\u5E97\u8425\u4E1A\u989D",type:"order_amount",icon:"RectangleCopy49",num:0},{name:"\u95E8\u5E97\u6536\u76CA\u91D1\u989D",type:"income_amount",icon:"RectangleCopy53",num:0},{name:"\u6838\u9500\u8BA2\u5355\u91D1\u989D",type:"verify_amount",icon:"RectangleCopy5",num:0},{name:"\u7EBF\u4E0B\u6536\u94F6\u8BA2\u5355\u91D1\u989D",type:"cashier_amount",icon:"RectangleCopy4",num:0},{name:"\u73B0\u91D1\u6536\u94F6\u8BA2\u5355\u91D1\u989D",type:"cash_amount",icon:"RectangleCopy7",num:0},{name:"\u4F59\u989D\u6D88\u8D39\u91D1\u989D",type:"balance_amount",icon:"RectangleCopy59",num:0},{name:"\u95E8\u5E97\u6210\u4EA4\u7528\u6237\u6570",type:"user_number",icon:"RectangleCopy54",num:0}]),l=p(["",""]),i=p(""),g=p({}),F=D({tooltip:{trigger:"item"},legend:{orient:"vertical",left:"left"},series:[{type:"pie",radius:"50%",data:[{value:1048,name:"\u7EBF\u4E0A\u6536\u94F6\u8BA2\u5355"},{value:735,name:"\u73B0\u91D1\u6536\u94F6\u8BA2\u5355"},{value:580,name:"\u6838\u9500\u8BA2\u5355"},{value:484,name:"\u5145\u503C\u8BA2\u5355"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}),E=()=>{let u,e;l.value[0]&&l.value[1]&&(v(l.value[0]).format("YYYY/MM/DD")+""+v(l.value[1]).format("YYYY/MM/DD"),u=v(l.value[0]).format("YYYY/MM/DD")+" 00:00:00",e=v(l.value[1]).format("YYYY/MM/DD")+" 23:59:59"),q({start_time:u,end_time:e,store_id:i.value}).then(s=>{b.forEach(f=>{f.num=s[f.type]}),_.xAxis.data=s.statistics.range,_.series[0].data=s.statistics.data.order_amount,_.series[1].data=s.statistics.data.user_number,g.value=s,F.series[0].data=s.pay_type})},h=p(!1),B=p([]),w=(u="")=>{h.value=!0,G({name:u,page_size:50}).then(e=>{if(B.value=e.lists,i.value===""){const s=Math.floor(Math.random()*e.lists.length);i.value=e.lists[s].id,E()}setTimeout(()=>{h.value=!1},300)}).catch(e=>{setTimeout(()=>{h.value=!1},300)})};return H(()=>{w()}),(u,e)=>{const s=U,f=K,V=j,T=X,m=I,N=Z,O=J,c=P,z=W;return d(),x("div",oe,[t(m,{shadow:"never",class:"!border-none"},{default:r(()=>[o("div",ae,[o("div",ue,[se,t(f,{modelValue:n(i),"onUpdate:modelValue":e[0]||(e[0]=a=>A(i)?i.value=a:null),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":w,loading:n(h),style:{width:"240px"},onChange:E},{default:r(()=>[(d(!0),x(M,null,Y(n(B),a=>(d(),Q(s,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"]),ne]),o("div",le,[re,t(V,{modelValue:n(l),"onUpdate:modelValue":e[1]||(e[1]=a=>A(l)?l.value=a:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:S},null,8,["modelValue"]),t(T,{type:"primary",class:"ml-4",onClick:E},{default:r(()=>[$("\u67E5\u8BE2")]),_:1})])])]),_:1}),o("div",ie,[(d(!0),x(M,null,Y(n(b),(a,y)=>(d(),x("div",{class:"box-border w-1/5",key:y},[t(m,{class:te(["!border-none ml-4 mb-4 flex",{"!ml-0":y%5===0}]),shadow:"never"},{default:r(()=>[o("div",me,[o("div",ce,[o("div",{class:"rounded-full p-2",style:ee({"background-color":R[y%8]})},[t(N,{iconName:a.icon,white:"",className:"text-6xl"},null,8,["iconName"])],4)]),o("div",null,[o("div",pe,k(a.name),1),o("div",de,k(a.num),1)])])]),_:2},1032,["class"])]))),128))]),t(m,{shadow:"never",class:"!border-none"},{default:r(()=>[_e,t(n(C),{style:{height:"400px"},option:n(_),autoresize:!0},null,8,["option"])]),_:1}),o("div",he,[t(m,{shadow:"never",class:"flex-1 !border-none"},{default:r(()=>[fe,t(z,{data:n(g).order_list,height:"500px"},{default:r(()=>[t(c,{label:"\u5934\u50CF",prop:"build_area_text","show-overflow-tooltip":""},{default:r(({row:a})=>[t(O,{style:{width:"50px",height:"50px"},src:a.avatar},null,8,["src"])]),_:1}),t(c,{label:"\u7528\u6237\u540D\u79F0",prop:"nickname","show-overflow-tooltip":""}),t(c,{label:"\u8BA2\u5355\u53F7",prop:"order_id","show-overflow-tooltip":""}),t(c,{label:"\u4EA4\u6613\u91D1\u989D",prop:"pay_price","show-overflow-tooltip":""}),t(c,{label:"\u6210\u4EA4\u65F6\u95F4",prop:"pay_time","show-overflow-tooltip":""})]),_:1},8,["data"])]),_:1}),t(m,{shadow:"never",class:"w-[500px] !border-none ml-4"},{default:r(()=>[ve,t(n(C),{style:{height:"500px"},option:n(F),autoresize:!0},null,8,["option"])]),_:1})])])}}});export{ot as default};
|