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.

p__order__order-revenue-statement.a29f8977.async.js 8.3 KiB

1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2642],{18974:function(f){f.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"}},94671:function(f){f.exports={"data-search-card":"data-search-card___3__W1","data-search-box":"data-search-box___1JO3P","search-btn-item":"search-btn-item___pebTO","activity-echarts":"activity-echarts___30Mkv","coupon-ehcarts":"coupon-ehcarts___2woXy"}},97632:function(f,_,e){"use strict";e.d(_,{Z:function(){return i}});var $=e(58024),A=e(91894),J=e(13062),M=e(71230),X=e(57663),x=e(71577),E=e(62999),W=e(54680),S=e(89032),D=e(15746),m=e(20228),o=e(11382),N=e(14965),R=e(71356),I=e(67294),Z=e(18974),a=e.n(Z),j=e(30381),g=e.n(j),n=e(85893),C=R.Z.RangePicker;function i(r){var y=function(){return(0,n.jsx)("div",{className:a()["loading-card"],children:(0,n.jsx)(o.Z,{size:"large"})})};return(0,n.jsxs)("div",{children:[r.showLoading?(0,n.jsx)(y,{}):null,(0,n.jsx)(A.Z,{className:a()["data-search-card"],children:(0,n.jsxs)(M.Z,{gutter:20,className:a()["data-search-row"],children:[(0,n.jsx)(D.Z,{xs:24,sm:24,md:24,lg:12,xl:6,className:a()["data-search-item"],children:(0,n.jsx)(C,{size:"middle",className:a()["data-search-sufixx"],value:r.timeRange,onChange:function(B,v){var L=[g()(g()(new Date(v[0])).format("YYYY-MM-DD 00:00:00")),g()(g()(new Date(v[1])).format("YYYY-MM-DD 23:59:59"))];r.onTimePickerChange(L)}})}),(0,n.jsxs)(D.Z,{xs:24,sm:24,md:24,lg:12,xl:6,className:a()["data-search-item"],children:[(0,n.jsx)("div",{className:r.searchDayIndex===0?"".concat(a()["data-search-day"]," ").concat(a()["search-day-selected"]):"".concat(a()["data-search-day"]),onClick:function(){return r.onChangeTimeIndex(0)},children:"\u4ECA\u5929"}),(0,n.jsx)("div",{className:r.searchDayIndex===1?"".concat(a()["data-search-day"]," ").concat(a()["search-day-selected"]):"".concat(a()["data-search-day"]),onClick:function(){return r.onChangeTimeIndex(1)},children:"\u6628\u5929"}),(0,n.jsx)("div",{className:r.searchDayIndex===2?"".concat(a()["data-search-day"]," ").concat(a()["search-day-selected"]):"".concat(a()["data-search-day"]),onClick:function(){return r.onChangeTimeIndex(2)},children:"\u8FD17\u5929"}),(0,n.jsx)("div",{className:r.searchDayIndex===3?"".concat(a()["data-search-day"]," ").concat(a()["search-day-selected"]):"".concat(a()["data-search-day"]),onClick:function(){return r.onChangeTimeIndex(3)},children:"\u8FD130\u5929"})]}),(0,n.jsx)(D.Z,{xs:24,sm:24,md:24,lg:12,xl:6,className:a()["data-search-item"],children:(0,n.jsx)(W.Z,{className:a()["data-search-sufixx"],dropdownStyle:{maxHeight:400,overflow:"auto"},value:r.currentOrg.title,treeData:r.orgTree,onSelect:function(B,v){v.type===2||v===3?r.onCurrentOrgChange(v):r.onCurrentOrgChange("")},placeholder:"\u8BF7\u9009\u62E9\u7EC4\u7EC7\u67B6\u6784",treeDefaultExpandAll:!0})}),(0,n.jsx)(D.Z,{xs:24,sm:24,md:12,lg:12,xl:6,className:a()["data-search-item"],children:(0,n.jsxs)("div",{className:a()["data-search-btns"],children:[(0,n.jsx)(x.Z,{className:a()["search-btn-item"],onClick:r.onResetSearch,children:"\u91CD\u7F6E"}),(0,n.jsx)(x.Z,{className:a()["search-btn-item"],type:"primary",onClick:r.onQueryBtn,children:"\u67E5\u8BE2"})]})})]})})]})}},25647:function(f,_,e){"use strict";e.r(_),e.d(_,{default:function(){return r}});var $=e(13062),A=e(71230),J=e(89032),M=e(15746),X=e(58024),x=e(91894),E=e(39428),W=e(34792),S=e(48086),D=e(3182),m=e(2824),o=e(67294),N=e(78009),R=e(97632),I=e(41297),Z=e(30381),a=e.n(Z),j=e(94671),g=e.n(j),n=e(48971),C={getOrgTree:function(){return(0,n.WY)("/kitchen/api/report-statistics/org-tree",{method:"GET"})},getReportStatisticsMarketing:function(){return(0,n.WY)("/kitchen/api/report-statistics/marketing",{method:"POST"})}},i=e(85893);function r(){var y=(0,o.useState)(0),h=(0,m.Z)(y,2),B=h[0],v=h[1],L=(0,o.useState)([a()(a()(new Date(Date.now())).format("YYYY-MM-DD 00:00:00")),a()(a()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))]),K=(0,m.Z)(L,2),q=K[0],U=K[1],ee=(0,o.useState)([]),p=(0,m.Z)(ee,2),ae=p[0],te=p[1],ne=(0,o.useState)(!1),w=(0,m.Z)(ne,2),re=w[0],O=w[1],se=(0,o.useState)(""),G=(0,m.Z)(se,2),ce=G[0],F=G[1],oe=(0,o.useState)([]),Q=(0,m.Z)(oe,2),z=Q[0],ie=Q[1],de=(0,o.useState)([]),b=(0,m.Z)(de,2),H=b[0],le=b[1],T=null,P=null,ue=function(s){v(s);var t=[];switch(s){case 0:t=[a()(a()(new Date(Date.now())).format("YYYY-MM-DD 00:00:00")),a()(a()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))];break;case 1:t=[a()(a()(new Date(Date.now()-24*60*60*1e3)).format("YYYY-MM-DD 00:00:00")),a()(a()(new Date(Date.now()-24*60*60*1e3)).format("YYYY-MM-DD 23:59:59"))];break;case 2:t=[a()(a()(new Date(Date.now()-24*60*60*1e3*7)).format("YYYY-MM-DD 00:00:00")),a()(a()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))];break;case 3:t=[a()(a()(new Date(Date.now()-24*60*60*1e3*30)).format("YYYY-MM-DD 00:00:00")),a()(a()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))];break}U(t)},he=function(){var d=(0,D.Z)((0,E.Z)().mark(function s(){var t,u;return(0,E.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return O(!0),l.next=3,C.getOrgTree();case 3:t=l.sent,O(!1),t.statusCode===200?(u=t.data,me(u),te(u)):S.default.error(t.errors||"\u83B7\u53D6\u7EC4\u7EC7\u6811\u51FA\u9519");case 6:case"end":return l.stop()}},s)}));return function(){return d.apply(this,arguments)}}(),me=function d(s){s.forEach(function(t){t.children&&t.children.length>0?d(t.children):t.type===2||t.type===3?t.disabled=!1:t.disabled=!0})},ve=function(){F("")},De=function(s){F(s)},ge=function(s){U(s)},V=function(){var d=(0,D.Z)((0,E.Z)().mark(function s(){var t;return(0,E.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return O(!0),c.next=3,C.getReportStatisticsMarketing();case 3:t=c.sent,O(!1),t.statusCode===200?(ie(t.data.activity),le(t.data.coupon)):S.default.error(t.errors||"\u83B7\u53D6\u8425\u9500\u62A5\u8868\u5217\u8868\u51FA\u9519");case 6:case"end":return c.stop()}},s)}));return function(){return d.apply(this,arguments)}}(),fe=function(){var s=document.getElementById("activity-echarts");T=I.S1(s);var t=[],u=[];z.forEach(function(l){t.push(l.activityName),u.push(l.numberParticipants)});var c={title:{text:"\u6D3B\u52A8\u62A5\u8868"},tooltip:{trigger:"axis"},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",data:t},yAxis:{type:"value"},series:[{data:u,type:"bar",showBackground:!0,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}}]};c&&T.setOption(c)},xe=function(){var s=document.getElementById("coupon-ehcarts");P=I.S1(s);var t=[],u=[],c=[],l=[];H.forEach(function(Y){t.push(Y.couponName),u.push(Y.preferentialAmount),c.push(Y.send),l.push(Y.get)});var k={title:{text:"\u4F18\u60E0\u5238\u62A5\u8868"},tooltip:{trigger:"axis"},legend:{data:["\u4F18\u60E0\u91D1\u989D","\u53D1\u653E\u6570\u91CF","\u9886\u53D6\u6570\u91CF"]},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",boundaryGap:!1,data:t},yAxis:{type:"value"},series:[{name:"\u4F18\u60E0\u91D1\u989D",type:"line",stack:"Total",data:u},{name:"\u53D1\u653E\u6570\u91CF",type:"line",stack:"Total",data:c},{name:"\u9886\u53D6\u6570\u91CF",type:"line",stack:"Total",data:l}]};k&&P.setOption(k)};return(0,o.useEffect)(function(){he(),V()},[]),(0,o.useEffect)(function(){fe(),xe(),window.onresize=function(){T&&P&&(T.resize(),P.resize())}},[z,H]),(0,i.jsxs)(N.ZP,{children:[(0,i.jsx)(R.Z,{orgTree:ae,timeRange:q,searchDayIndex:B,currentOrg:ce,showLoading:re,onTimePickerChange:ge,onChangeTimeIndex:ue,onCurrentOrgChange:De,onResetSearch:ve,onQueryBtn:V}),(0,i.jsxs)(A.Z,{gutter:10,children:[(0,i.jsx)(M.Z,{xs:24,sm:24,md:24,lg:8,xl:8,children:(0,i.jsx)(x.Z,{children:(0,i.jsx)("div",{id:"activity-echarts",className:g()["activity-echarts"]})})}),(0,i.jsx)(M.Z,{xs:24,sm:24,md:24,lg:16,xl:16,children:(0,i.jsx)(x.Z,{children:(0,i.jsx)("div",{id:"coupon-ehcarts",className:g()["coupon-ehcarts"]})})})]})]})}}}]);