Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

p__order__order-member-statement.efefd1a6.async.js 9.5 KiB

1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6763],{18974:function(C){C.exports={"data-search-card":"data-search-card___fc1xW","data-search-row":"data-search-row___FtrAv","data-search-item":"data-search-item___g5H_b","data-search-prefix":"data-search-prefix___bxf2p","search-btn-item":"search-btn-item___1lD6h","data-search-day":"data-search-day___1AMa5","search-day-selected":"search-day-selected___1rdk5","data-search-sufixx":"data-search-sufixx___3Ht7c","loading-card":"loading-card___2AdV6","member-card-box":"member-card-box___1GV0Y","member-card-prefix":"member-card-prefix___3LNuc","member-card-sufixx":"member-card-sufixx___AFiDV","new-member":"new-member___2TlTQ","repur-chase":"repur-chase___1cYei","member-card":"member-card___3syWs","member-row-common":"member-row-common___1sZlj"}},5032:function(C){C.exports={"data-search-card":"data-search-card___M6nke","data-search-row":"data-search-row___3PMu2","data-search-item":"data-search-item___2UlXn","data-search-prefix":"data-search-prefix___icpVX","search-btn-item":"search-btn-item___1D2io","data-search-day":"data-search-day___2meX3","search-day-selected":"search-day-selected___X0xyP","data-search-sufixx":"data-search-sufixx___2M50P","loading-card":"loading-card___Et78m","member-card-box":"member-card-box___2eZXL","member-card-prefix":"member-card-prefix___1y0yw","member-card-sufixx":"member-card-sufixx___2v95D","new-member":"new-member___V3uRz","repur-chase":"repur-chase___1mB1Y","member-card":"member-card___5_ExE","member-row-common":"member-row-common___2OrNr"}},97632:function(C,T,e){"use strict";e.d(T,{Z:function(){return t}});var q=e(58024),j=e(91894),ee=e(13062),E=e(71230),ae=e(57663),g=e(71577),M=e(62999),U=e(54680),S=e(89032),v=e(15746),x=e(20228),l=e(11382),W=e(14965),N=e(71356),K=e(67294),m=e(18974),r=e.n(m),s=e(30381),_=e.n(s),n=e(85893),b=N.Z.RangePicker;function t(c){var y=function(){return(0,n.jsx)("div",{className:r()["loading-card"],children:(0,n.jsx)(l.Z,{size:"large"})})};return(0,n.jsxs)("div",{children:[c.showLoading?(0,n.jsx)(y,{}):null,(0,n.jsx)(j.Z,{className:r()["data-search-card"],children:(0,n.jsxs)(E.Z,{gutter:20,className:r()["data-search-row"],children:[(0,n.jsx)(v.Z,{xs:24,sm:24,md:24,lg:12,xl:6,className:r()["data-search-item"],children:(0,n.jsx)(b,{size:"middle",className:r()["data-search-sufixx"],value:c.timeRange,onChange:function(Z,f){var I=[_()(_()(new Date(f[0])).format("YYYY-MM-DD 00:00:00")),_()(_()(new Date(f[1])).format("YYYY-MM-DD 23:59:59"))];c.onTimePickerChange(I)}})}),(0,n.jsxs)(v.Z,{xs:24,sm:24,md:24,lg:12,xl:6,className:r()["data-search-item"],children:[(0,n.jsx)("div",{className:c.searchDayIndex===0?"".concat(r()["data-search-day"]," ").concat(r()["search-day-selected"]):"".concat(r()["data-search-day"]),onClick:function(){return c.onChangeTimeIndex(0)},children:"\u4ECA\u5929"}),(0,n.jsx)("div",{className:c.searchDayIndex===1?"".concat(r()["data-search-day"]," ").concat(r()["search-day-selected"]):"".concat(r()["data-search-day"]),onClick:function(){return c.onChangeTimeIndex(1)},children:"\u6628\u5929"}),(0,n.jsx)("div",{className:c.searchDayIndex===2?"".concat(r()["data-search-day"]," ").concat(r()["search-day-selected"]):"".concat(r()["data-search-day"]),onClick:function(){return c.onChangeTimeIndex(2)},children:"\u8FD17\u5929"}),(0,n.jsx)("div",{className:c.searchDayIndex===3?"".concat(r()["data-search-day"]," ").concat(r()["search-day-selected"]):"".concat(r()["data-search-day"]),onClick:function(){return c.onChangeTimeIndex(3)},children:"\u8FD130\u5929"})]}),(0,n.jsx)(v.Z,{xs:24,sm:24,md:24,lg:12,xl:6,className:r()["data-search-item"],children:(0,n.jsx)(U.Z,{className:r()["data-search-sufixx"],dropdownStyle:{maxHeight:400,overflow:"auto"},value:c.currentOrg.title,treeData:c.orgTree,onSelect:function(Z,f){f.type===2||f===3?c.onCurrentOrgChange(f):c.onCurrentOrgChange("")},placeholder:"\u8BF7\u9009\u62E9\u7EC4\u7EC7\u67B6\u6784",treeDefaultExpandAll:!0})}),(0,n.jsx)(v.Z,{xs:24,sm:24,md:12,lg:12,xl:6,className:r()["data-search-item"],children:(0,n.jsxs)("div",{className:r()["data-search-btns"],children:[(0,n.jsx)(g.Z,{className:r()["search-btn-item"],onClick:c.onResetSearch,children:"\u91CD\u7F6E"}),(0,n.jsx)(g.Z,{className:r()["search-btn-item"],type:"primary",onClick:c.onQueryBtn,children:"\u67E5\u8BE2"})]})})]})})]})}},15111:function(C,T,e){"use strict";e.r(T),e.d(T,{default:function(){return c}});var q=e(13062),j=e(71230),ee=e(89032),E=e(15746),ae=e(58024),g=e(91894),M=e(39428),U=e(34792),S=e(48086),v=e(3182),x=e(2824),l=e(67294),W=e(78009),N=e(97632),K=e(5032),m=e.n(K),r=e(30381),s=e.n(r),_=e(48971),n={getOrgTree:function(){return(0,_.WY)("/kitchen/api/report-statistics/org-tree",{method:"GET"})},getMemberReport:function(u){return(0,_.WY)("/kitchen/api/report-statistics/user-report",{method:"POST",data:u})}},b=e(41297),t=e(85893);function c(){var y=(0,l.useState)(0),u=(0,x.Z)(y,2),Z=u[0],f=u[1],I=(0,l.useState)([s()(s()(new Date(Date.now())).format("YYYY-MM-DD 00:00:00")),s()(s()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))]),p=(0,x.Z)(I,2),w=p[0],F=p[1],re=(0,l.useState)([]),V=(0,x.Z)(re,2),te=V[0],se=V[1],ne=(0,l.useState)(!1),z=(0,x.Z)(ne,2),ce=z[0],R=z[1],de=(0,l.useState)(""),G=(0,x.Z)(de,2),B=G[0],X=G[1],oe=(0,l.useState)({userCount:0,newAddUser:[],repurChase:[]}),Q=(0,x.Z)(oe,2),A=Q[0],me=Q[1],ie=(0,l.useState)(0),H=(0,x.Z)(ie,2),le=H[0],ue=H[1],he=(0,l.useState)(0),$=(0,x.Z)(he,2),xe=$[0],fe=$[1],O=null,P=null,De=function(d){f(d);var a=[];switch(d){case 0:a=[s()(s()(new Date(Date.now())).format("YYYY-MM-DD 00:00:00")),s()(s()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))];break;case 1:a=[s()(s()(new Date(Date.now()-24*60*60*1e3)).format("YYYY-MM-DD 00:00:00")),s()(s()(new Date(Date.now()-24*60*60*1e3)).format("YYYY-MM-DD 23:59:59"))];break;case 2:a=[s()(s()(new Date(Date.now()-24*60*60*1e3*7)).format("YYYY-MM-DD 00:00:00")),s()(s()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))];break;case 3:a=[s()(s()(new Date(Date.now()-24*60*60*1e3*30)).format("YYYY-MM-DD 00:00:00")),s()(s()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))];break}F(a)},ve=function(){var h=(0,v.Z)((0,M.Z)().mark(function d(){var a,o;return(0,M.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return R(!0),i.next=3,n.getOrgTree();case 3:a=i.sent,R(!1),a.statusCode===200?(o=a.data,_e(o),se(o)):S.default.error(a.errors||"\u83B7\u53D6\u7EC4\u7EC7\u6811\u51FA\u9519");case 6:case"end":return i.stop()}},d)}));return function(){return h.apply(this,arguments)}}(),_e=function h(d){d.forEach(function(a){a.children&&a.children.length>0?h(a.children):a.type===2||a.type===3?a.disabled=!1:a.disabled=!0})},J=function(){var h=(0,v.Z)((0,M.Z)().mark(function d(){var a,o,D,i;return(0,M.Z)().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return a={shopIds:[B.key],startTime:w[0],endTime:w[1]},B.key||delete a.shopIds,R(!0),Y.next=5,n.getMemberReport(a);case 5:o=Y.sent,R(!1),o.statusCode===200?(D=0,i=0,o.data.newAddUser.forEach(function(L){D+=L.userValue}),o.data.repurChase.forEach(function(L){i+=L.userValue}),ue(D),fe(i),me(o.data)):S.default.error(o.errors||"\u83B7\u53D6\u4F1A\u5458\u62A5\u8868\u5931\u8D25");case 8:case"end":return Y.stop()}},d)}));return function(){return h.apply(this,arguments)}}(),ge=function(){var d=document.getElementById("new-member");O||(O=b.S1(d));var a=[],o=[];A.newAddUser.forEach(function(i){var k=new Date(i.userKey);a.push(k.toLocaleDateString()),o.push(i.userValue)});var D={title:{text:"\u65B0\u589E\u4F1A\u5458"},tooltip:{trigger:"axis"},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",data:a},yAxis:{type:"value"},series:[{data:o,type:"bar"}]};O.setOption(D)},Ce=function(){var d=document.getElementById("repur-chase");P||(P=b.S1(d));var a=[],o=[];A.repurChase.forEach(function(i){a.push(i.userKey),o.push(i.userValue)});var D={title:{text:"\u590D\u8D2D\u6B21\u6570"},tooltip:{trigger:"axis",axisPointer:{label:{show:!0,formatter:"\u590D\u8D2D{value}\u6B21"}}},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",data:a},yAxis:{type:"value"},series:[{data:o,type:"line",smooth:!0}]};P.setOption(D)},Ee=function(){X("")},Me=function(d){X(d)},ye=function(d){F(d)};return(0,l.useEffect)(function(){ve(),J()},[]),(0,l.useEffect)(function(){ge(),Ce(),window.onresize=function(){O&&P&&(O.resize(),P.resize())}},[A]),(0,t.jsxs)(W.ZP,{children:[(0,t.jsx)(N.Z,{orgTree:te,timeRange:w,searchDayIndex:Z,currentOrg:B,showLoading:ce,onTimePickerChange:ye,onChangeTimeIndex:De,onCurrentOrgChange:Me,onResetSearch:Ee,onQueryBtn:J}),(0,t.jsxs)(j.Z,{gutter:10,className:m()["member-row-common"],children:[(0,t.jsx)(E.Z,{xs:24,sm:24,md:24,lg:8,xl:6,children:(0,t.jsxs)(g.Z,{className:m()["member-card"],children:[(0,t.jsxs)("div",{className:m()["member-card-box"],children:[(0,t.jsx)("div",{className:m()["member-card-prefix"],children:"\u4F1A\u5458\u603B\u91CF"}),(0,t.jsx)("div",{className:m()["member-card-sufixx"],children:A.userCount})]}),(0,t.jsxs)("div",{className:m()["member-card-box"],children:[(0,t.jsx)("div",{className:m()["member-card-prefix"],children:"\u65B0\u589E\u4F1A\u5458"}),(0,t.jsx)("div",{className:m()["member-card-sufixx"],children:le})]}),(0,t.jsxs)("div",{className:m()["member-card-box"],children:[(0,t.jsx)("div",{className:m()["member-card-prefix"],children:"\u590D\u8D2D\u6570\u91CF"}),(0,t.jsx)("div",{className:m()["member-card-sufixx"],children:xe})]})]})}),(0,t.jsx)(E.Z,{xs:24,sm:24,md:24,lg:16,xl:18,children:(0,t.jsx)(g.Z,{children:(0,t.jsx)("div",{id:"repur-chase",className:m()["repur-chase"]})})})]}),(0,t.jsx)(j.Z,{children:(0,t.jsx)(E.Z,{xs:24,sm:24,md:24,lg:24,xl:24,children:(0,t.jsx)(g.Z,{children:(0,t.jsx)("div",{id:"new-member",className:m()["new-member"]})})})})]})}}}]);