moreShopAdmin/dist/admin/assets/index.782883a8.js

2 lines
4.9 KiB
JavaScript

import{U as j,P as S,w as T,b as U,L as z}from"./element-plus.4a7d92a3.js";import{d as R,s as q}from"./workbench.28f6a15a.js";import{h as d}from"./moment.40bc58bf.js";import{B as I}from"./vue-echarts.01ad0ec2.js";import{d as b,Z as F,r as _,i as K,o as m,c as h,U as c,L as f,a as o,u as s,j as O,R as Q,T as Z,a9 as $,S as i,K as G,Q as C}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.3d9f5aaa.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 H={class:"workbench"},J={class:"mb-6 flex justify-between items-center"},W=o("span",{class:"text-2xl"},"\u5546\u54C1\u6982\u51B5",-1),X={class:"flex items-center text-sm"},tt=o("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1),et={class:"flex flex-wrap"},ot=["onClick"],at={class:"mr-2"},st={class:"rounded-full p-2"},nt={class:"text-info"},rt={class:""},it={class:""},lt={class:"mb-6 flex justify-between items-center"},ut=o("span",{class:"text-2xl"},"\u5546\u54C1\u8D8B\u52BF",-1),ct={key:0,class:"text-2xl",style:{margin:"0 auto","padding-right":"67px"}},mt=b({name:"product"}),Gt=b({...mt,setup(pt){const B=[{text:"\u8FD1\u4E00\u5468",value:()=>{const e=new Date,t=new Date;return t.setDate(t.getDate()-7),[t,e]}},{text:"\u672C\u6708",value:()=>{const e=new Date,t=new Date;return t.setDate(1),e.setMonth(e.getMonth()+1),e.setDate(0),[t,e]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const e=new Date,t=new Date;return t.setMonth(t.getMonth()-1),[t,e]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const e=new Date,t=new Date;return t.setMonth(t.getMonth()-3),[t,e]}}],u=F({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}]}),v=new Date,D=v.getFullYear(),y=v.getMonth()+1,Y=new Date(D,y-1,1),M=new Date(D,y,0),l=_([Y,M]),w=_([]),g=_(0),x=_(""),a=F({product_id:"",start_time:"",end_time:"",page_no:1,page_size:10}),p=()=>{a.start_time=d(l.value[0]).format("YYYY-MM-DD"),a.end_time=d(l.value[1]).format("YYYY-MM-DD"),R(a).then(e=>{w.value=e.lists,g.value=e.count})},k=e=>{a.page_no=e,p()},L=e=>{a.start_time=d(l.value[0]).format("YYYY-MM-DD"),a.end_time=d(l.value[1]).format("YYYY-MM-DD"),a.product_id=e.product_id,x.value=e.store_name,q(a).then(t=>{u.xAxis.data=[],u.series=[],u.legend.data=t.series.map(r=>r.name),t.xAxis.forEach(r=>{u.xAxis.data.push(r)}),u.series=t.series.map(r=>({type:"line",smooth:!0,data:r.value,name:r.name}))})};return K(()=>{p()}),(e,t)=>{const r=j,V=T,A=U,P=S,E=z;return m(),h("div",H,[c(E,{shadow:"never",class:"!border-none"},{default:f(()=>[o("div",J,[W,o("div",X,[tt,c(r,{modelValue:s(l),"onUpdate:modelValue":t[0]||(t[0]=n=>O(l)?l.value=n:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:B,onChange:p},null,8,["modelValue"]),c(V,{type:"primary",class:"ml-4",onClick:p},{default:f(()=>[Q("\u67E5\u8BE2")]),_:1})])]),o("div",et,[(m(!0),h(Z,null,$(s(w),(n,N)=>(m(),h("div",{class:"w-1/5 flex mb-6",key:N,onClick:dt=>L(n)},[o("div",at,[o("div",st,[c(A,{style:{width:"50px",height:"50px"},src:n.image},null,8,["src"])])]),o("div",null,[o("div",nt,i(n.store_name),1),o("div",rt," \u9500\u91CF:"+i(n.cart_num)+i(n.unit_name)+"|\u603B\u4EF7:"+i(n.total_price),1),o("div",it,"\u89C4\u683C:"+i(n.store_info),1)])],8,ot))),128))]),s(g)>10?(m(),G(P,{key:0,background:"",layout:"prev, pager, next",total:s(g),onChange:k,style:{"margin-right":"56px","margin-bottom":"11px",float:"right"}},null,8,["total"])):C("",!0)]),_:1}),c(E,{shadow:"never",class:"mt-4 !border-none"},{default:f(()=>[o("div",lt,[ut,s(x)?(m(),h("span",ct,i(s(x))+" "+i(s(a).start_time)+" - "+i(s(a).end_time),1)):C("",!0)]),o("div",null,[c(s(I),{style:{height:"400px"},option:s(u),autoresize:!0},null,8,["option"])])]),_:1})])}}});export{Gt as default};