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__salesReport.53d415d3.async.js 8.9 KiB

11 months ago
1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5679,1322,9464,1981,2869,7013,9719,2383],{33388:function(T){T.exports={"welcome-head":"welcome-head___2uLA1","welcome-head-org":"welcome-head-org___TTx63","echarts-card-choose":"echarts-card-choose___2oFaE","my-loading":"my-loading___11j2H","device-list":"device-list___D-nOI","my-range-picker":"my-range-picker___3WXGc","tabs-title":"tabs-title___3n9F2"}},80638:function(){},74457:function(T,_,e){"use strict";e.r(_),e.d(_,{default:function(){return z}});var a=e(20228),i=e(11382),O=e(66456),x=e(64411),D=e(58024),c=e(91894),s=e(13062),b=e(71230),$=e(57663),P=e(71577),j=e(89032),w=e(15746),t=e(39428),H=e(3182),d=e(2824),v=e(14965),C=e(91774),n=e(18106),g=e(95562),r=e(67294),f=e(78009),h=e(33388),p=e.n(h),N=e(30381),u=e.n(N),B=e(48971),I={GetSalesReport:function(L){return(0,B.WY)("/kitchen/api/Order/GetSalesReport",{method:"Post",data:L})}},R=e(51496),l=e(85893),oe=g.Z.TabPane,J=C.Z.RangePicker,ee=function(){var L=(0,r.useState)("left"),Q=(0,d.Z)(L,2),Z=Q[0],te=Q[1],V=(0,r.useState)(1),M=(0,d.Z)(V,2),y=M[0],o=M[1],U=(0,r.useState)([]),k=(0,d.Z)(U,2),ue=k[0],ie=k[1],X=(0,r.useState)([u()(u()(new Date(Date.now())).format("YYYY-MM-DD 00:00:00")),u()(u()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))]),S=(0,d.Z)(X,2),ae=S[0],K=S[1],ne=(0,r.useState)(!1),q=(0,d.Z)(ne,2),fe=q[0],re=q[1],ce=[{title:"\u540D\u79F0",dataIndex:"name",hideInSearch:!0},{title:"\u9500\u552E\u6570\u91CF",dataIndex:"saleCount",hideInSearch:!0}];(0,r.useEffect)(function(){se()},[y]);var se=function(){var F=(0,H.Z)((0,t.Z)().mark(function W(){var E,A,G;return(0,t.Z)().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return re(!0),E=u()(ae[0]).format("YYYY-MM-DD HH:mm:ss"),A=u()(ae[1]).format("YYYY-MM-DD HH:mm:ss"),Y.next=5,I.GetSalesReport({type:y,startTime:E,endTime:A});case 5:G=Y.sent,G.forEach(function(le){le.key=(0,R.x0)()}),ie(G),re(!1);case 9:case"end":return Y.stop()}},W)}));return function(){return F.apply(this,arguments)}}();return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(f.ZP,{children:[(0,l.jsx)(c.Z,{style:{marginBottom:"30px"},children:(0,l.jsxs)(b.Z,{children:[(0,l.jsx)(w.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:(0,l.jsxs)("div",{className:p()["echarts-card-choose"],children:[(0,l.jsx)("div",{className:p()["echarts-card-choose-text"],children:"\u8D77\u6B62\u65F6\u95F4\uFF1A"}),(0,l.jsx)(J,{showTime:!0,style:{width:"70%"},className:p()["my-range-picker"],value:ae,onChange:function(W,E){var A=[u()(u()(new Date(E[0])).format("YYYY-MM-DD 00:00:00")),u()(u()(new Date(E[1])).format("YYYY-MM-DD 23:59:59"))];K(A)}})]})}),(0,l.jsxs)(w.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:[(0,l.jsx)(P.Z,{className:p()["echarts-card-btn"],type:"primary",style:{width:"100px",marginRight:"10px"},onClick:function(){return se()},children:"\u67E5\u8BE2"}),(0,l.jsx)(P.Z,{className:p()["echarts-card-btn"],style:{width:"100px"},onClick:function(){K([u()(u()(new Date(Date.now())).format("YYYY-MM-DD 00:00:00")),u()(u()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))])},children:"\u91CD\u7F6E"})]})]})}),(0,l.jsx)(c.Z,{children:(0,l.jsx)(i.Z,{spinning:fe,delay:500,children:(0,l.jsx)(g.Z,{tabPosition:Z,value:y,onChange:function(W){o(W)},items:new Array(2).fill(null).map(function(F,W){var E=String(W+1);return{label:E==1?"\u5206\u7C7B\u7EDF\u8BA1":"\u5355\u54C1\u7EDF\u8BA1",key:E,children:(0,l.jsx)(x.Z,{columns:ce,dataSource:ue})}})})})})]})})},z=ee},15746:function(T,_,e){"use strict";var a=e(21584);_.Z=a.Z},89032:function(T,_,e){"use strict";var a=e(38663),i=e.n(a),O=e(6999)},99134:function(T,_,e){"use strict";var a=e(67294),i=(0,a.createContext)({});_.Z=i},21584:function(T,_,e){"use strict";var a=e(96156),i=e(22122),O=e(90484),x=e(94184),D=e.n(x),c=e(67294),s=e(53124),b=e(99134),$=function(t,H){var d={};for(var v in t)Object.prototype.hasOwnProperty.call(t,v)&&H.indexOf(v)<0&&(d[v]=t[v]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var C=0,v=Object.getOwnPropertySymbols(t);C<v.length;C++)H.indexOf(v[C])<0&&Object.prototype.propertyIsEnumerable.call(t,v[C])&&(d[v[C]]=t[v[C]]);return d};function P(t){return typeof t=="number"?"".concat(t," ").concat(t," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(t)?"0 0 ".concat(t):t}var j=["xs","sm","md","lg","xl","xxl"],w=c.forwardRef(function(t,H){var d,v=c.useContext(s.E_),C=v.getPrefixCls,n=v.direction,g=c.useContext(b.Z),r=g.gutter,f=g.wrap,h=g.supportFlexGap,p=t.prefixCls,N=t.span,u=t.order,B=t.offset,I=t.push,R=t.pull,l=t.className,oe=t.children,J=t.flex,ee=t.style,z=$(t,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),m=C("col",p),L={};j.forEach(function(M){var y,o={},U=t[M];typeof U=="number"?o.span=U:(0,O.Z)(U)==="object"&&(o=U||{}),delete z[M],L=(0,i.Z)((0,i.Z)({},L),(y={},(0,a.Z)(y,"".concat(m,"-").concat(M,"-").concat(o.span),o.span!==void 0),(0,a.Z)(y,"".concat(m,"-").concat(M,"-order-").concat(o.order),o.order||o.order===0),(0,a.Z)(y,"".concat(m,"-").concat(M,"-offset-").concat(o.offset),o.offset||o.offset===0),(0,a.Z)(y,"".concat(m,"-").concat(M,"-push-").concat(o.push),o.push||o.push===0),(0,a.Z)(y,"".concat(m,"-").concat(M,"-pull-").concat(o.pull),o.pull||o.pull===0),(0,a.Z)(y,"".concat(m,"-rtl"),n==="rtl"),y))});var Q=D()(m,(d={},(0,a.Z)(d,"".concat(m,"-").concat(N),N!==void 0),(0,a.Z)(d,"".concat(m,"-order-").concat(u),u),(0,a.Z)(d,"".concat(m,"-offset-").concat(B),B),(0,a.Z)(d,"".concat(m,"-push-").concat(I),I),(0,a.Z)(d,"".concat(m,"-pull-").concat(R),R),d),l,L),Z={};if(r&&r[0]>0){var te=r[0]/2;Z.paddingLeft=te,Z.paddingRight=te}if(r&&r[1]>0&&!h){var V=r[1]/2;Z.paddingTop=V,Z.paddingBottom=V}return J&&(Z.flex=P(J),f===!1&&!Z.minWidth&&(Z.minWidth=0)),c.createElement("div",(0,i.Z)({},z,{style:(0,i.Z)((0,i.Z)({},Z),ee),className:Q,ref:H}),oe)});_.Z=w},92820:function(T,_,e){"use strict";var a=e(22122),i=e(96156),O=e(90484),x=e(28481),D=e(94184),c=e.n(D),s=e(67294),b=e(53124),$=e(98082),P=e(24308),j=e(93355),w=e(99134),t=function(n,g){var r={};for(var f in n)Object.prototype.hasOwnProperty.call(n,f)&&g.indexOf(f)<0&&(r[f]=n[f]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,f=Object.getOwnPropertySymbols(n);h<f.length;h++)g.indexOf(f[h])<0&&Object.prototype.propertyIsEnumerable.call(n,f[h])&&(r[f[h]]=n[f[h]]);return r},H=(0,j.b)("top","middle","bottom","stretch"),d=(0,j.b)("start","end","center","space-around","space-between","space-evenly");function v(n,g){var r=s.useState(typeof n=="string"?n:""),f=(0,x.Z)(r,2),h=f[0],p=f[1],N=function(){if(typeof n=="string"&&p(n),(0,O.Z)(n)==="object")for(var B=0;B<P.c4.length;B++){var I=P.c4[B];if(!!g[I]){var R=n[I];if(R!==void 0){p(R);return}}}};return s.useEffect(function(){N()},[JSON.stringify(n),g]),h}var C=s.forwardRef(function(n,g){var r,f=n.prefixCls,h=n.justify,p=n.align,N=n.className,u=n.style,B=n.children,I=n.gutter,R=I===void 0?0:I,l=n.wrap,oe=t(n,["prefixCls","justify","align","className","style","children","gutter","wrap"]),J=s.useContext(b.E_),ee=J.getPrefixCls,z=J.direction,m=s.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),L=(0,x.Z)(m,2),Q=L[0],Z=L[1],te=s.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),V=(0,x.Z)(te,2),M=V[0],y=V[1],o=v(p,M),U=v(h,M),k=(0,$.Z)(),ue=s.useRef(R);s.useEffect(function(){var W=P.ZP.subscribe(function(E){y(E);var A=ue.current||0;(!Array.isArray(A)&&(0,O.Z)(A)==="object"||Array.isArray(A)&&((0,O.Z)(A[0])==="object"||(0,O.Z)(A[1])==="object"))&&Z(E)});return function(){return P.ZP.unsubscribe(W)}},[]);var ie=function(){var E=[void 0,void 0],A=Array.isArray(R)?R:[R,void 0];return A.forEach(function(G,de){if((0,O.Z)(G)==="object")for(var Y=0;Y<P.c4.length;Y++){var le=P.c4[Y];if(Q[le]&&G[le]!==void 0){E[de]=G[le];break}}else E[de]=G}),E},X=ee("row",f),S=ie(),ae=c()(X,(r={},(0,i.Z)(r,"".concat(X,"-no-wrap"),l===!1),(0,i.Z)(r,"".concat(X,"-").concat(U),U),(0,i.Z)(r,"".concat(X,"-").concat(o),o),(0,i.Z)(r,"".concat(X,"-rtl"),z==="rtl"),r),N),K={},ne=S[0]!=null&&S[0]>0?S[0]/-2:void 0,q=S[1]!=null&&S[1]>0?S[1]/-2:void 0;if(ne&&(K.marginLeft=ne,K.marginRight=ne),k){var fe=(0,x.Z)(S,2);K.rowGap=fe[1]}else q&&(K.marginTop=q,K.marginBottom=q);var re=(0,x.Z)(S,2),ce=re[0],se=re[1],F=s.useMemo(function(){return{gutter:[ce,se],wrap:l,supportFlexGap:k}},[ce,se,l,k]);return s.createElement(w.Z.Provider,{value:F},s.createElement("div",(0,a.Z)({},oe,{className:ae,style:(0,a.Z)((0,a.Z)({},K),u),ref:g}),B))});_.Z=C},6999:function(T,_,e){"use strict";var a=e(38663),i=e.n(a),O=e(80638),x=e.n(O)},71230:function(T,_,e){"use strict";var a=e(92820);_.Z=a.Z},13062:function(T,_,e){"use strict";var a=e(38663),i=e.n(a),O=e(6999)},51496:function(T,_,e){"use strict";e.d(_,{x0:function(){return x}});let a=D=>crypto.getRandomValues(new Uint8Array(D)),i=(D,c,s)=>{let b=(2<<Math.log(D.length-1)/Math.LN2)-1,$=-~(1.6*b*c/D.length);return(P=c)=>{let j="";for(;;){let w=s($),t=$;for(;t--;)if(j+=D[w[t]&b]||"",j.length===P)return j}}},O=(D,c=21)=>i(D,c,a),x=(D=21)=>crypto.getRandomValues(new Uint8Array(D)).reduce((c,s)=>(s&=63,s<36?c+=s.toString(36):s<62?c+=(s-26).toString(36).toUpperCase():s>62?c+="-":c+="_",c),"")}}]);