import{_ as T,w as N,L as P,b as j,M as S,N as U}from"./element-plus.7b9d0c0d.js";import{_ as G}from"./index.0cfbf168.js";import{a as z,b as I,c as O}from"./workbench.8ddda7b6.js";import{h as d}from"./moment.40bc58bf.js";import{B as Z}from"./vue-echarts.01ad0ec2.js";import{d as k,Z as M,r as _,i as q,o as v,c as x,U as t,L as l,a,u as c,j as C,R as g,T as H,a9 as J,a0 as K,S as B}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.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.887947f5.js";import"./lodash.9dc701ad.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.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 Q={class:"workbench"},W={class:"mb-6 flex justify-between items-center"},X=a("span",{class:"text-2xl"},"\u5546\u54C1\u6982\u51B5",-1),$={class:"flex items-center text-sm"},ee=a("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1),te={class:"flex flex-wrap"},ae={class:"mr-2"},ne={class:"text-info"},oe={class:"text-6xl"},ue={class:"mb-6 flex justify-between items-center"},se=a("span",{class:"text-2xl"},"\u5546\u54C1\u8D8B\u52BF",-1),le={class:"flex items-center text-sm"},re=a("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1),ie={class:"mb-6 flex justify-between items-center"},pe=a("span",{class:"text-2xl"},"\u5546\u54C1\u6392\u884C",-1),ce={class:"flex items-center text-sm"},me=a("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1),de=k({name:"product"}),We=k({...de,setup(_e){const D=[{text:"\u8FD1\u4E00\u5468",value:()=>{const n=new Date,e=new Date;return e.setDate(e.getDate()-7),[e,n]}},{text:"\u672C\u6708",value:()=>{const n=new Date,e=new Date;return e.setDate(1),n.setMonth(n.getMonth()+1),n.setDate(0),[e,n]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const n=new Date,e=new Date;return e.setMonth(e.getMonth()-1),[e,n]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const n=new Date,e=new Date;return e.setMonth(e.getMonth()-3),[e,n]}}],m=M({xAxis:{type:"category",data:[0],axisLabel:{rotate:45,color:"#333"}},yAxis:[{type:"value",name:"\u91D1\u989D",position:"right",axisLabel:{formatter:"{value}"}},{type:"value",name:"\u6570\u91CF",position:"left",axisLabel:{formatter:"{value}"}}],grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},legend:{data:["\u8BBF\u95EE\u91CF"]},itemStyle:{color:"red"},tooltip:{trigger:"axis"},series:[{name:"\u8BBF\u95EE\u91CF",data:[0],type:"line",smooth:!0}]}),A=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1"],b=M([{name:"\u5546\u54C1\u6D4F\u89C8\u91CF",type:"browse",icon:"RectangleCopy21",num:0,percent:0},{name:"\u5546\u54C1\u8BBF\u5BA2\u6570",type:"user",icon:"RectangleCopy5",num:0,percent:0},{name:"\u52A0\u8D2D\u4EF6\u6570",type:"cart",icon:"RectangleCopy13",num:0,percent:0},{name:"\u4E0B\u5355\u4EF6\u6570",type:"order",icon:"RectangleCopy12",num:0,percent:0},{name:"\u652F\u4ED8\u4EF6\u6570",type:"pay",icon:"RectangleCopy15",num:0,percent:0},{name:"\u652F\u4ED8\u91D1\u989D",type:"payPrice",icon:"RectangleCopy14",num:0,percent:0},{name:"\u6210\u672C\u91D1\u989D",type:"cost",icon:"RectangleCopy24",num:0,percent:0},{name:"\u9000\u6B3E\u91D1\u989D",type:"refundPrice",icon:"RectangleCopy32",num:0,percent:0},{name:"\u9000\u6B3E\u4EF6\u6570",type:"refund",icon:"RectangleCopy19",num:0,percent:0},{name:"\u8BBF\u5BA2-\u652F\u4ED8\u8F6C\u5316\u7387",type:"payPercent",icon:"RectangleCopy4",num:0,percent:0}]),r=_([new Date,new Date]),i=_([]),p=_([]),h=()=>{let n="";r.value[0]&&r.value[1]&&(n=d(r.value[0]).format("YYYY/MM/DD")+"-"+d(r.value[1]).format("YYYY/MM/DD")),z({date:n}).then(e=>{b.forEach(o=>{o.num=e[o.type].num,o.percent=e[o.type].percent})})},F=()=>{let n="";i.value[0]&&i.value[1]&&(n=d(i.value[0]).format("YYYY/MM/DD")+"-"+d(i.value[1]).format("YYYY/MM/DD")),I({date:n}).then(e=>{m.xAxis.data=[],m.series=[],m.legend.data=e.series.map(o=>o.name),e.xAxis.forEach(o=>{m.xAxis.data.push(o)}),m.series=e.series.map(o=>({...o,yAxis:o.type=="line"?0:1}))})},w=_([]),f=()=>{let n="";p.value[0]&&p.value[1]&&(n=d(p.value[0]).format("YYYY/MM/DD")+"-"+d(p.value[1]).format("YYYY/MM/DD")),O({date:n}).then(e=>{w.value=e})};return q(()=>{h(),F(),f()}),(n,e)=>{const o=T,y=N,R=G,E=P,V=j,s=S,L=U;return v(),x("div",Q,[t(E,{shadow:"never",class:"!border-none"},{default:l(()=>[a("div",W,[X,a("div",$,[ee,t(o,{modelValue:c(r),"onUpdate:modelValue":e[0]||(e[0]=u=>C(r)?r.value=u:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:D,onChange:h},null,8,["modelValue"]),t(y,{type:"primary",class:"ml-4",onClick:h},{default:l(()=>[g("\u67E5\u8BE2")]),_:1})])]),a("div",te,[(v(!0),x(H,null,J(c(b),(u,Y)=>(v(),x("div",{class:"w-1/5 flex mb-6",key:Y},[a("div",ae,[a("div",{class:"rounded-full p-2",style:K({"background-color":A[Y%4]})},[t(R,{iconName:u.icon,white:"",className:"text-6xl"},null,8,["iconName"])],4)]),a("div",null,[a("div",ne,B(u.name),1),a("div",oe,B(u.num),1)])]))),128))])]),_:1}),t(E,{shadow:"never",class:"mt-4 !border-none"},{default:l(()=>[a("div",ue,[se,a("div",le,[re,t(o,{modelValue:c(i),"onUpdate:modelValue":e[1]||(e[1]=u=>C(i)?i.value=u:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:D,onChange:F},null,8,["modelValue"]),t(y,{type:"primary",class:"ml-4",onClick:F},{default:l(()=>[g("\u67E5\u8BE2")]),_:1})])]),a("div",null,[t(c(Z),{style:{height:"400px"},option:c(m),autoresize:!0},null,8,["option"])])]),_:1}),t(E,{shadow:"never",class:"mt-4 !border-none"},{default:l(()=>[a("div",ie,[pe,a("div",ce,[me,t(o,{modelValue:c(p),"onUpdate:modelValue":e[2]||(e[2]=u=>C(p)?p.value=u:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:D,onChange:f},null,8,["modelValue"]),t(y,{type:"primary",class:"ml-4",onClick:f},{default:l(()=>[g("\u67E5\u8BE2")]),_:1})])]),a("div",null,[t(L,{data:c(w)},{default:l(()=>[t(s,{label:"\u5546\u54C1\u56FE\u7247"},{default:l(({row:u})=>[t(V,{src:u.image,fit:"cover",style:{width:"50px",height:"50px"},"preview-teleported":!0},null,8,["src"])]),_:1}),t(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"250"}),t(s,{label:"\u6E38\u89C8\u91CF",prop:"visit","min-width":"120"}),t(s,{label:"\u8BBF\u5BA2\u6570",prop:"user","min-width":"120"}),t(s,{label:"\u52A0\u8D2D\u4EF6\u6570",prop:"cart","min-width":"120"}),t(s,{label:"\u4E0B\u5355\u4EF6\u6570",prop:"orders","min-width":"120"}),t(s,{label:"\u652F\u4ED8\u4EF6\u6570",prop:"pay","min-width":"120"}),t(s,{label:"\u652F\u4ED8\u91D1\u989D",prop:"price","min-width":"120"}),t(s,{label:"\u6536\u85CF\u6570",prop:"collect","min-width":"120"}),t(s,{label:"\u6BDB\u5229\u7387(%)",prop:"profit","min-width":"120"},{default:l(({row:u})=>[a("span",null,B(u.profit)+"%",1)]),_:1})]),_:1},8,["data"])])]),_:1})])}}});export{We as default};