2 lines
7.4 KiB
JavaScript
2 lines
7.4 KiB
JavaScript
|
import{m as L,aT as v,r as d,b as U,bg as W,p as _,q as E,t,v as s,x as a,u as l,i as A,V as k,W as M,y as X,a2 as Y,H as q,G as R,N as G,bF as V,bh as x,b3 as I,b4 as P,ae as J,b5 as K,a7 as Q,b6 as Z,b7 as $}from"./.pnpm.1b0299fb.js";import{_ as ee}from"./index.41edbd86.js";import"./index.689cfa31.js";import{b as te,a as ae}from"./system_store.e6c50bcf.js";import"./@vueuse.72d44d91.js";import"./lodash.c3b66c05.js";import"./@vue.9d708d7c.js";const ue={class:"workbench"},oe={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=L({name:"statistics_store"}),he=L({...de,setup(_e){const S=[{text:"\u8FD1\u4E00\u5468",value:()=>{const u=new Date,e=new Date;return e.setDate(e.getDate()-7),[e,u]}},{text:"\u672C\u6708",value:()=>{const u=new Date,e=new Date;return e.setDate(1),u.setMonth(u.getMonth()+1),u.setDate(0),[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=v({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"}]});v({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 T=["#5DB1FF","#4CD384","#FFC46A","#CAA5F1","#FFC46A","#4CD384","#5DB1FF","#CAA5F1"],h=v([{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(""),F=d({}),g=v({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 u,e;n.value[0]&&n.value[1]&&(x(n.value[0]).format("YYYY/MM/DD")+""+x(n.value[1]).format("YYYY/MM/DD"),u=x(n.value[0]).format("YYYY/MM/DD")+" 00:00:00",e=x(n.value[1]).format("YYYY/MM/DD")+" 23:59:59"),te({start_time:u,end_time:e,store_id:i.value}).then(r=>{h.forEach(y=>{y.num=r[y.
|