You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
10 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4658],{54658:function(Le,J,t){"use strict";t.r(J),t.d(J,{default:function(){return ve}});var ke=t(13062),Y=t(71230),He=t(49111),re=t(19650),m=t(11849),Ue=t(89032),D=t(15746),Ke=t(58024),j=t(91894),Qe=t(95300),w=t(7277),v=t(3182),Xe=t(14965),ie=t(91774),x=t(2824),ue=t(94043),r=t.n(ue),O=t(26139),G=t(21059),h=t(67294),le=t(21349),V=t(80652),oe=t(64183),de=t(78677),ce=t(63430),me=t(30381),S=t.n(me),A=t(48971);function I(l){return P.apply(this,arguments)}function P(){return P=(0,v.Z)(r().mark(function l(y){return r().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,A.WY)("/kitchen/api\u200B/member-analysis\u200B/top-goods",{method:"Post",data:y}));case 1:case"end":return a.stop()}},l)})),P.apply(this,arguments)}function fe(l){return $.apply(this,arguments)}function $(){return $=(0,v.Z)(r().mark(function l(y){return r().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,A.WY)("/kitchen/api/member-analysis/newm-member",{method:"Post",data:y}));case 1:case"end":return a.stop()}},l)})),$.apply(this,arguments)}function he(){return M.apply(this,arguments)}function M(){return M=(0,v.Z)(r().mark(function l(){return r().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",(0,A.WY)("\u200B/kitchen/api\u200B/member-analysis\u200B/sales-volume",{method:"Get"}));case 1:case"end":return p.stop()}},l)})),M.apply(this,arguments)}function z(l){return b.apply(this,arguments)}function b(){return b=(0,v.Z)(r().mark(function l(y){return r().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,A.WY)("\u200B/kitchen/api/member-analysis/sales-time-point",{method:"POST",data:y}));case 1:case"end":return a.stop()}},l)})),b.apply(this,arguments)}function L(l){return N.apply(this,arguments)}function N(){return N=(0,v.Z)(r().mark(function l(y){return r().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,A.WY)("/kitchen\u200B\u200B/api\u200B/member-analysis\u200B/repurchasing",{method:"POST",data:y}));case 1:case"end":return a.stop()}},l)})),N.apply(this,arguments)}function ye(l){return R.apply(this,arguments)}function R(){return R=(0,v.Z)(r().mark(function l(y){return r().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,A.WY)("/kitchen/api\u200B/member-analysis\u200B/sale-samount-analysis",{method:"GET"}));case 1:case"end":return a.stop()}},l)})),R.apply(this,arguments)}function k(l){return W.apply(this,arguments)}function W(){return W=(0,v.Z)(r().mark(function l(y){return r().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,A.WY)("\u200B/kitchen/api\u200B/member-analysis\u200B/order-analysis",{method:"POST",data:y}));case 1:case"end":return a.stop()}},l)})),W.apply(this,arguments)}var e=t(85893),qe="message",F={xs:24,sm:12,md:12,lg:12,xl:6,style:{marginBottom:24}},pe=function(){var y=(0,h.useState)(""),p=(0,x.Z)(y,2),a=p[0],_e=p[1],g="YYYY-MM-DD",E=ie.Z.RangePicker,ge=(0,h.useState)([]),H=(0,x.Z)(ge,2),xe=H[0],U=H[1],Ze=(0,h.useState)([]),K=(0,x.Z)(Ze,2),Te=K[0],Se=K[1],De=(0,h.useState)({}),Q=(0,x.Z)(De,2),c=Q[0],je=Q[1],Ae=(0,h.useState)({}),X=(0,x.Z)(Ae,2),Z=X[0],Be=X[1],we=(0,h.useState)([]),q=(0,x.Z)(we,2),Ce=q[0],_=q[1],Fe=(0,h.useState)([]),ee=(0,x.Z)(Fe,2),Ee=ee[0],te=ee[1],Ye=(0,h.useState)([]),ae=(0,x.Z)(Ye,2),Oe=ae[0],ne=ae[1],Ge=(0,h.useState)([]),se=(0,x.Z)(Ge,2),C=se[0],Pe=se[1],T=function(n){var s=new Date;s.setDate(s.getDate()+n);var i=s.getFullYear(),B=s.getMonth()+1,u=s.getDate();return i+"-"+B+"-"+u},$e=function(n){if(!C||C.length===0)return!1;var s=C[0]&&n.diff(C[0],"days")>15,i=C[1]&&C[1].diff(n,"days")>15;return i||s};(0,h.useEffect)(function(){var o=new Date,n=function(){var s=(0,v.Z)(r().mark(function i(B){return r().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:I(JSON.stringify({startTime:T(-7),EndTime:o,Top:5})).then(function(d){d.data&&U(d.data.dataInfo)}),ye().then(function(d){d.data&&Be(d.data)}),fe(JSON.stringify({startTime:T(-7),EndTime:o,Top:5})).then(function(d){d.data&&Se(d.data.dataInfo)}),he().then(function(d){d.data&&je(d.data)}),z(JSON.stringify({startTime:T(-7),EndTime:o,Top:5})).then(function(d){d.data&&_(d.data.dataInfo)}),L(JSON.stringify({startTime:T(-7),EndTime:o,Top:5})).then(function(d){d.data&&te(d.data.dataInfo)}),k(JSON.stringify({startTime:T(-15),EndTime:o,Top:5})).then(function(d){d.data&&ne(d.data)});case 7:case"end":return f.stop()}},i)}));return function(B){return s.apply(this,arguments)}}();n()},[]);var Me=function(){var o=(0,v.Z)(r().mark(function n(s,i){return r().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,I(JSON.stringify({startTime:i[0],EndTime:i[1],Top:5})).then(function(f){f.data&&U(f.data.dataInfo)});case 2:case"end":return u.stop()}},n)}));return function(s,i){return o.apply(this,arguments)}}(),be=function(){var o=(0,v.Z)(r().mark(function n(s,i){return r().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,z(JSON.stringify({startTime:i[0],EndTime:i[1],Top:5})).then(function(f){f.data&&_(f.data.dataInfo)});case 2:case"end":return u.stop()}},n)}));return function(s,i){return o.apply(this,arguments)}}(),Ne=function(){var o=(0,v.Z)(r().mark(function n(s,i){return r().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,L(JSON.stringify({startTime:i[0],EndTime:i[1],Top:5})).then(function(f){f.data&&te(f.data.dataInfo)});case 2:case"end":return u.stop()}},n)}));return function(s,i){return o.apply(this,arguments)}}(),Re=function(){var o=(0,v.Z)(r().mark(function n(s,i){return r().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,k(JSON.stringify({startTime:i[0],EndTime:i[1],Top:5})).then(function(f){f.data&&ne(f.data)});case 2:case"end":return u.stop()}},n)}));return function(s,i){return o.apply(this,arguments)}}(),We={data:xe,xField:"name",yField:"star",height:110,meta:{star:{alias:"\u9500\u552E\u4EFD\u6570",min:0}},xAxis:{label:{autoHide:!0,autoRotate:!1}},minColumnWidth:20,maxColumnWidth:20},Je={data:Te,height:118,xField:"name",yField:"star",meta:{star:{alias:"\u65B0\u589E\u7528\u6237",min:0}},xAxis:{range:[0,1]}},Ve={height:300,data:Ce,xField:"name",yField:"star",label:{},meta:{star:{alias:"\u4E0B\u5355\u91CF"}},point:{size:5,shape:"diamond",style:{fill:"white",stroke:"#5B8FF9",lineWidth:2}},tooltip:{showMarkers:!1},state:{active:{style:{shadowBlur:4,stroke:"#000",fill:"red"}}},interactions:[{type:"marker-active"}]},Ie={height:300,appendPadding:10,data:Ee,angleField:"star",colorField:"name",radius:.9,label:{type:"inner",offset:"-30%",content:function(n){var s=n.percent;return"".concat((s*100).toFixed(0),"%")},style:{fontSize:14,textAlign:"center"}},interactions:[{type:"element-active"}]},ze={data:Oe,xField:"time",yField:"count",yAxis:{label:{formatter:function(n){return"".concat(n).replace(/\d{1,3}(?=(\d{3})+$)/g,function(s){return"".concat(s,",")})}}},seriesField:"name",color:function(n){var s=n.name;return s==="\u603B\u8BA2\u5355\u6570"?"#5B8FF9":s==="\u5DF2\u652F\u4ED8\u5355"?"#5AD8A6":s==="\u672A\u4ED8\u6B3E\u5355"?"#F6BD16":"#657798"},lineStyle:function(n){var s=n.type;return s==="register"?{lineDash:[4,4],opacity:1}:{opacity:.5}}};return(0,e.jsxs)(le.Z,{children:[(0,e.jsx)(h.Suspense,{children:(0,e.jsxs)(Y.Z,{gutter:16,children:[(0,e.jsx)(D.Z,(0,m.Z)((0,m.Z)({},F),{},{children:(0,e.jsx)(j.Z,{title:"\u9500\u552E\u989D",actions:[(0,e.jsxs)("span",{style:{float:"left"},children:["\xA0\xA0\u4ECA\u65E5\u9500\u552E\u989D\uFF1A",c.sumTodayDay]})],bordered:!1,children:(0,e.jsxs)("div",{style:{height:70},children:[(0,e.jsxs)("div",{style:{float:"left"},children:["\u603B\u9500\u552E\u989D:",(0,e.jsx)(w.Z,{title:"",value:c.sum})]}),(0,e.jsxs)("div",{style:{float:"right"},children:[" ",(0,e.jsx)(w.Z,{title:"_",value:c.sumYesterDay==0?0:(c.sumTodayDay-c.sumYesterDay)/c.sumYesterDay*100,precision:2,valueStyle:{color:c.sumTodayDay>c.sumYesterDay?"#3f8600":"#cf1322"},prefix:c.sumTodayDay>c.sumYesterDay?(0,e.jsx)(O.Z,{}):(0,e.jsx)(G.Z,{}),suffix:"%"})]}),(0,e.jsx)("div",{style:{float:"right"},children:"\xA0\xA0"}),(0,e.jsxs)("div",{style:{float:"right"},children:[" ",(0,e.jsx)(w.Z,{title:"\u540C\u6BD4\u6628\u65E5",value:c.sumTodayDay-c.sumYesterDay,precision:2,valueStyle:{color:c.sumTodayDay>c.sumYesterDay?"#3f8600":"#cf1322 "},prefix:c.sumTodayDay>c.sumYesterDay?(0,e.jsx)(O.Z,{}):(0,e.jsx)(G.Z,{})})]})]})})})),(0,e.jsx)(D.Z,(0,m.Z)((0,m.Z)({},F),{},{children:(0,e.jsx)(j.Z,{title:"\u9500\u91CF",actions:[(0,e.jsxs)("span",{style:{float:"left"},children:["\xA0\xA0\u4ECA\u65E5\u8BA2\u5355\u6570\uFF1A",Z.sumTodayDay]})],bordered:!1,children:(0,e.jsxs)(re.Z,{size:"large",children:[(0,e.jsx)(w.Z,{title:"\u7528\u6237\u603B\u6570",value:Z.count,style:{float:"left"},xl:18}),(0,e.jsx)(w.Z,{title:"\u8BA2\u5355\u603B\u6570",value:Z.sum,style:{float:"left"}}),(0,e.jsx)(w.Z,{title:"\u540C\u6BD4\u6628\u65E5",value:Z.sumYesterDay==0?0:(Z.sumTodayDay-Z.sumYesterDay)/Z.sumYesterDay*100,precision:2,valueStyle:{color:Z.sumTodayDay>Z.sumYesterDay?"#3f8600":"#cf1322"},prefix:c.sumTodayDay>c.sumYesterDay?(0,e.jsx)(O.Z,{}):(0,e.jsx)(G.Z,{}),suffix:"%"})]})})})),(0,e.jsx)(D.Z,(0,m.Z)((0,m.Z)({},F),{},{children:(0,e.jsx)(j.Z,{title:"\u70ED\u9500\u5546\u54C1Top",extra:(0,e.jsx)(E,{size:"Small",style:{width:230},defaultValue:[S()(T(-7),g),S()(new Date,g)],onChange:Me,format:g}),bordered:!1,children:(0,e.jsx)(de.Z,(0,m.Z)({},We))})})),(0,e.jsx)(D.Z,(0,m.Z)((0,m.Z)({},F),{},{children:(0,e.jsx)(j.Z,{title:"\u65B0\u589E\u7528\u6237",bordered:!1,children:(0,e.jsx)(oe.Z,(0,m.Z)({},Je))})}))]})}),(0,e.jsx)(h.Suspense,{children:(0,e.jsxs)(Y.Z,{gutter:24,children:[(0,e.jsx)(D.Z,{xl:18,lg:24,md:24,sm:24,xs:24,children:(0,e.jsx)(j.Z,{title:"\u9500\u552E\u65F6\u95F4\u70B9\u5206\u6790",extra:(0,e.jsx)(E,{defaultValue:[S()(T(-7),g),S()(new Date,g)],onChange:be,format:g}),bordered:!1,children:(0,e.jsx)(V.Z,(0,m.Z)({},Ve))})}),(0,e.jsx)(D.Z,(0,m.Z)((0,m.Z)({},F),{},{children:(0,e.jsx)(j.Z,{title:"\u590D\u8D2D\u7387",extra:(0,e.jsx)(E,{defaultValue:[S()(T(-7),g),S()(new Date,g)],onChange:Ne,format:g}),bordered:!1,children:(0,e.jsx)(ce.Z,(0,m.Z)({},Ie))})}))]})}),(0,e.jsx)(h.Suspense,{children:(0,e.jsx)(Y.Z,{gutter:24,children:(0,e.jsx)(D.Z,{xl:24,lg:24,md:24,sm:24,xs:24,children:(0,e.jsx)(j.Z,{title:"\u8BA2\u5355\u5206\u6790",extra:(0,e.jsx)(E,{defaultValue:[S()(T(-7),g),S()(new Date,g)],onChange:Re,onCalendarChange:function(n){return Pe(n)},disabledDate:$e,format:g}),bordered:!1,children:(0,e.jsx)(V.Z,(0,m.Z)({},ze))})})})})]})},ve=pe}}]);