import{U as K,J as X,K as I,w as J,L as P,o as W,M as Z,N as q}from"./element-plus.91c68cc0.js";import{_ as G}from"./index.8af77b02.js";import"./index.892cd835.js";import{b as H,a as Q}from"./system_store.7c50d15d.js";import{h as v}from"./moment.40bc58bf.js";import{B as A}from"./vue-echarts.fe276ff7.js";import{d as S,Z as E,r as d,i as $,o as _,c as x,U as t,L as s,a as o,u as l,j as M,T as k,a9 as Y,K as ee,R,a0 as te,S as L,O as oe}from"./@vue.76ce7aa3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.4e6d2a38.js";import"./axios.659d5af3.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./resize-detector.4e96b72b.js";const ae={class:"workbench"},ue={class:"flex justify-between items-center"},ne={class:"flex items-center"},se={class:"flex items-center text-sm"},le={class:"flex flex-wrap box-border mt-4"},re={class:"flex"},ie={class:"mr-2"},me={class:"text-info"},pe={class:"text-6xl"},ce={class:"mt-4 flex justify-center"},de=S({name:"statistics_store"}),et=S({...de,setup(_e){const V=[{text:"\u8FD1\u4E00\u5468",value:()=>{const a=new Date,e=new Date;return e.setDate(e.getDate()-7),[e,a]}},{text:"\u672C\u6708",value:()=>{const a=new Date,e=new Date;return e.setDate(1),a.setMonth(a.getMonth()+1),a.setDate(0),[e,a]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const a=new Date,e=new Date;return e.setMonth(e.getMonth()-1),[e,a]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const a=new Date,e=new Date;return e.setMonth(e.getMonth()-3),[e,a]}}],D=E({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"}]});E({tooltip:{formatter:"{a}
{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 T=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],F=E([{name:"\u95E8\u5E97\u8425\u4E1A\u989D",type:"order_amount",icon:"RectangleCopy49",num:0},{name:"\u5FAE\u4FE1\u6761\u7801\u6536\u6B3E\u91D1\u989D",type:"wechat_code_amount",icon:"RectangleCopy55",num:0},{name:"\u652F\u4ED8\u5B9D\u6761\u7801\u6536\u6B3E\u91D1\u989D",type:"alipay_code_amount",icon:"RectangleCopy52",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\u6536\u6B3E\u91D1\u989D",type:"receipt_amount",icon:"RectangleCopy",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:"\u95E8\u5E97\u6210\u4EA4\u7528\u6237\u6570",type:"user_number",icon:"RectangleCopy54",num:0},{name:"\u4FDD\u8BC1\u91D1",type:"deposit_amount",icon:"RectangleCopy32",num:0},{name:"\u53EF\u7528\u6D88\u8017\u8D44\u91D1",type:"attrition_amount",icon:"RectangleCopy61",num:0}]),n=d([new Date,new Date]),i=d(""),g=d({}),w=E({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)"}}}]}),m=()=>{let a,e;n.value[0]&&n.value[1]&&(v(n.value[0]).format("YYYY/MM/DD")+""+v(n.value[1]).format("YYYY/MM/DD"),a=v(n.value[0]).format("YYYY/MM/DD")+" 00:00:00",e=v(n.value[1]).format("YYYY/MM/DD")+" 23:59:59"),H({start_time:a,end_time:e,store_id:i.value}).then(r=>{F.forEach(y=>{y.num=r[y.type]}),D.xAxis.data=r.statistics.range,D.series[0].data=r.statistics.data.order_amount,D.series[1].data=r.statistics.data.user_number,g.value=r,w.series[0].data=r.pay_type})},N=()=>{n.value=[new Date,new Date],i.value="",m()},f=d(!1),B=d([]),b=(a="")=>{f.value=!0,Q({name:a,page_size:50}).then(e=>{B.value=e.lists,setTimeout(()=>{f.value=!1},300)}).catch(e=>{setTimeout(()=>{f.value=!1},300)})};return $(()=>{b(),m()}),(a,e)=>{const r=X,y=I,O=K,C=J,p=P,z=G,U=W,c=Z,j=q;return _(),x("div",ae,[t(p,{shadow:"never",class:"!border-none"},{default:s(()=>[o("div",ue,[o("div",ne,[e[2]||(e[2]=o("span",{class:"text-2xl mr-4"},"\u8FD0\u8425\u6982\u51B5",-1)),t(y,{modelValue:l(i),"onUpdate:modelValue":e[0]||(e[0]=u=>M(i)?i.value=u:null),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":b,loading:l(f),style:{width:"240px"},onChange:m},{default:s(()=>[(_(!0),x(k,null,Y(l(B),u=>(_(),ee(r,{key:u.id,label:u.name,value:u.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"]),e[3]||(e[3]=o("span",{class:"ml-4 text-info text-[12px]"},"\u70B9\u51FB\u5DE6\u4FA7\u5207\u6362\u95E8\u5E97",-1))]),o("div",se,[e[6]||(e[6]=o("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1)),t(O,{modelValue:l(n),"onUpdate:modelValue":e[1]||(e[1]=u=>M(n)?n.value=u:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:V,onChange:m},null,8,["modelValue"]),t(C,{type:"primary",class:"ml-4",onClick:m},{default:s(()=>e[4]||(e[4]=[R("\u67E5\u8BE2")])),_:1}),t(C,{type:"primary",class:"ml-4",onClick:N},{default:s(()=>e[5]||(e[5]=[R("\u91CD\u7F6E")])),_:1})])])]),_:1}),o("div",le,[(_(!0),x(k,null,Y(l(F),(u,h)=>(_(),x("div",{class:"box-border w-1/5",key:h},[t(p,{class:oe(["!border-none ml-4 mb-4 flex",{"!ml-0":h%5===0}]),shadow:"never"},{default:s(()=>[o("div",re,[o("div",ie,[o("div",{class:"rounded-full p-2",style:te({"background-color":T[h%8]})},[t(z,{iconName:u.icon,white:"",className:"text-6xl"},null,8,["iconName"])],4)]),o("div",null,[o("div",me,L(u.name),1),o("div",pe,L(u.num),1)])])]),_:2},1032,["class"])]))),128))]),t(p,{shadow:"never",class:"!border-none"},{default:s(()=>[e[7]||(e[7]=o("span",{class:"text-2xl"},"\u8425\u4E1A\u8D8B\u52BF",-1)),t(l(A),{style:{height:"400px"},option:l(D),autoresize:!0},null,8,["option"])]),_:1}),o("div",ce,[t(p,{shadow:"never",class:"flex-1 !border-none"},{default:s(()=>[e[8]||(e[8]=o("span",{class:"text-2xl"},"\u4EA4\u6613\u6570\u636E",-1)),t(j,{data:l(g).order_list,height:"500px"},{default:s(()=>[t(c,{label:"\u5934\u50CF",prop:"build_area_text","show-overflow-tooltip":""},{default:s(({row:u})=>[t(U,{style:{width:"50px",height:"50px"},src:u.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(p,{shadow:"never",class:"w-[500px] !border-none ml-4"},{default:s(()=>[e[9]||(e[9]=o("span",{class:"text-2xl"},"\u4EA4\u6613\u7C7B\u578B",-1)),t(l(A),{style:{height:"500px"},option:l(w),autoresize:!0},null,8,["option"])]),_:1})])])}}});export{et as default};