No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

2 líneas
10 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4658],{54658:function(ze,J,t){"use strict";t.r(J),t.d(J,{default:function(){return pe}});var ke=t(13062),Y=t(71230),Le=t(49111),re=t(19650),m=t(11849),He=t(89032),D=t(15746),Ue=t(58024),j=t(91894),Ke=t(95300),w=t(7277),r=t(39428),v=t(3182),Qe=t(14965),ie=t(91774),g=t(2824),O=t(26139),G=t(21059),h=t(67294),ue=t(21349),V=t(80652),le=t(64183),oe=t(78677),de=t(63430),ce=t(30381),S=t.n(ce),A=t(48971);function I(l){return P.apply(this,arguments)}function P(){return P=(0,v.Z)((0,r.Z)().mark(function l(y){return(0,r.Z)().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 me(l){return $.apply(this,arguments)}function $(){return $=(0,v.Z)((0,r.Z)().mark(function l(y){return(0,r.Z)().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 fe(){return b.apply(this,arguments)}function b(){return b=(0,v.Z)((0,r.Z)().mark(function l(){return(0,r.Z)().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)})),b.apply(this,arguments)}function z(l){return M.apply(this,arguments)}function M(){return M=(0,v.Z)((0,r.Z)().mark(function l(y){return(0,r.Z)().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)})),M.apply(this,arguments)}function k(l){return R.apply(this,arguments)}function R(){return R=(0,v.Z)((0,r.Z)().mark(function l(y){return(0,r.Z)().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)})),R.apply(this,arguments)}function he(l){return N.apply(this,arguments)}function N(){return N=(0,v.Z)((0,r.Z)().mark(function l(y){return(0,r.Z)().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)})),N.apply(this,arguments)}function L(l){return W.apply(this,arguments)}function W(){return W=(0,v.Z)((0,r.Z)().mark(function l(y){return(0,r.Z)().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),Xe="message",F={xs:24,sm:12,md:12,lg:12,xl:6,style:{marginBottom:24}},ye=function(){var y=(0,h.useState)(""),p=(0,g.Z)(y,2),a=p[0],qe=p[1],Z="YYYY-MM-DD",E=ie.Z.RangePicker,ve=(0,h.useState)([]),H=(0,g.Z)(ve,2),Ze=H[0],U=H[1],ge=(0,h.useState)([]),K=(0,g.Z)(ge,2),xe=K[0],Te=K[1],Se=(0,h.useState)({}),Q=(0,g.Z)(Se,2),c=Q[0],De=Q[1],je=(0,h.useState)({}),X=(0,g.Z)(je,2),x=X[0],Ae=X[1],Be=(0,h.useState)([]),q=(0,g.Z)(Be,2),we=q[0],_=q[1],Ce=(0,h.useState)([]),ee=(0,g.Z)(Ce,2),Fe=ee[0],te=ee[1],Ee=(0,h.useState)([]),ae=(0,g.Z)(Ee,2),Ye=ae[0],ne=ae[1],Oe=(0,h.useState)([]),se=(0,g.Z)(Oe,2),C=se[0],Ge=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},Pe=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)((0,r.Z)().mark(function i(B){return(0,r.Z)().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)}),he().then(function(d){d.data&&Ae(d.data)}),me(JSON.stringify({startTime:T(-7),EndTime:o,Top:5})).then(function(d){d.data&&Te(d.data.dataInfo)}),fe().then(function(d){d.data&&De(d.data)}),z(JSON.stringify({startTime:T(-7),EndTime:o,Top:5})).then(function(d){d.data&&_(d.data.dataInfo)}),k(JSON.stringify({startTime:T(-7),EndTime:o,Top:5})).then(function(d){d.data&&te(d.data.dataInfo)}),L(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 $e=function(){var o=(0,v.Z)((0,r.Z)().mark(function n(s,i){return(0,r.Z)().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)((0,r.Z)().mark(function n(s,i){return(0,r.Z)().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)}}(),Me=function(){var o=(0,v.Z)((0,r.Z)().mark(function n(s,i){return(0,r.Z)().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&&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)((0,r.Z)().mark(function n(s,i){return(0,r.Z)().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&&ne(f.data)});case 2:case"end":return u.stop()}},n)}));return function(s,i){return o.apply(this,arguments)}}(),Ne={data:Ze,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},We={data:xe,height:118,xField:"name",yField:"star",meta:{star:{alias:"\u65B0\u589E\u7528\u6237",min:0}},xAxis:{range:[0,1]}},Je={height:300,data:we,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"}]},Ve={height:300,appendPadding:10,data:Fe,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"}]},Ie={data:Ye,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)(ue.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",x.sumTodayDay]})],bordered:!1,children:(0,e.jsxs)(re.Z,{size:"large",children:[(0,e.jsx)(w.Z,{title:"\u7528\u6237\u603B\u6570",value:x.count,style:{float:"left"},xl:18}),(0,e.jsx)(w.Z,{title:"\u8BA2\u5355\u603B\u6570",value:x.sum,style:{float:"left"}}),(0,e.jsx)(w.Z,{title:"\u540C\u6BD4\u6628\u65E5",value:x.sumYesterDay==0?0:(x.sumTodayDay-x.sumYesterDay)/x.sumYesterDay*100,precision:2,valueStyle:{color:x.sumTodayDay>x.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),Z),S()(new Date,Z)],onChange:$e,format:Z}),bordered:!1,children:(0,e.jsx)(oe.Z,(0,m.Z)({},Ne))})})),(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)(le.Z,(0,m.Z)({},We))})}))]})}),(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),Z),S()(new Date,Z)],onChange:be,format:Z}),bordered:!1,children:(0,e.jsx)(V.Z,(0,m.Z)({},Je))})}),(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),Z),S()(new Date,Z)],onChange:Me,format:Z}),bordered:!1,children:(0,e.jsx)(de.Z,(0,m.Z)({},Ve))})}))]})}),(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),Z),S()(new Date,Z)],onChange:Re,onCalendarChange:function(n){return Ge(n)},disabledDate:Pe,format:Z}),bordered:!1,children:(0,e.jsx)(V.Z,(0,m.Z)({},Ie))})})})})]})},pe=ye}}]);