|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5003,7975,1322,5284,1915,9130,5081],{1759:function(R){R.exports={"data-search-card":"data-search-card____3y2v","data-search-box":"data-search-box___18vv5","search-btn-item":"search-btn-item___1bmDV","table-page":"table-page___3xfjM","loading-card":"loading-card___dcQnu","data-search-item":"data-search-item___23DXw","data-search-input":"data-search-input___3WC5d","data-search-prefix":"data-search-prefix___Psc0s","data-search-sufixx":"data-search-sufixx___1MMan","data-search-btns":"data-search-btns___OgJ-7","download-btn":"download-btn___3uVYa"}},80638:function(){},3608:function(R,m,e){"use strict";e.r(m),e.d(m,{default:function(){return M}});var r=e(14781),f=e(36138),x=e(66456),A=e(15711),ue=e(58024),T=e(91894),E=e(13062),ee=e(71230),ce=e(57663),y=e(71577),te=e(89032),J=e(15746),a=e(62999),$=e(54680),B=e(93224),u=e(39428),Z=e(34792),t=e(48086),v=e(3182),c=e(2824),i=e(20228),g=e(11382),K=e(14965),U=e(71356),_=e(67294),S=e(78009),O=e(1759),l=e.n(O),ae=e(11849),Y=e(48971),Q={getReportOrgsalesmargin:function(h){return(0,Y.WY)("/kitchen/api/report/orgsalesmargin",{method:"Post",data:h})},gettree:function(h){return(0,Y.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,ae.Z)({},h)})}},H=e(30381),n=e.n(H),b=e(90631),s=e(85893),P=["children"],V=U.Z.RangePicker,G=function(){return(0,s.jsx)("div",{className:l()["loading-card"],children:(0,s.jsx)(g.Z,{size:"large"})})};function M(){var o=(0,_.useState)([]),h=(0,c.Z)(o,2),de=h[0],re=h[1],ve=(0,_.useState)(1),ie=(0,c.Z)(ve,2),N=ie[0],j=ie[1],_e=(0,_.useState)(10),W=(0,c.Z)(_e,2),X=W[0],se=W[1],me=(0,_.useState)(0),ne=(0,c.Z)(me,2),fe=ne[0],Ee=ne[1],ge=(0,_.useState)(!1),le=(0,c.Z)(ge,2),F=le[0],C=le[1],k=(0,_.useState)([n()(n()(new Date(Date.now()-24*60*60*1e3*7)).format("YYYY-MM-DD 00:00:00")),n()(n()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))]),oe=(0,c.Z)(k,2),w=oe[0],q=oe[1],Me=(0,_.useState)([]),he=(0,c.Z)(Me,2),De=he[0],xe=he[1],Ce=(0,_.useState)([]),ye=(0,c.Z)(Ce,2),pe=ye[0],Ze=ye[1],Se=(0,_.useState)([]),Oe=(0,c.Z)(Se,2),Re=Oe[0],Ae=Oe[1],je=[{title:"\u95E8\u5E97\u540D\u79F0",dataIndex:"storeId",key:"storeId",render:function(D){var d=Re.find(function(p){return p.key===D});return d?(0,s.jsx)("span",{children:d.title}):(0,s.jsx)("span",{children:"\u6682\u65E0\u95E8\u5E97\u540D\u79F0"})}},{title:"\u6BDB\u5229\u7387\uFF08%\uFF09",dataIndex:"marginRatio",key:"marginRatio"}],Ie=function(D,d){j(D),se(d)},Pe=function(){var I=(0,v.Z)((0,u.Z)().mark(function D(){var d,p;return(0,u.Z)().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return d={storeId:De[0],begintime:w[0],endtime:w[1],current:N,pageSize:X},C(!0),z.next=4,Q.getReportOrgsalesmargin(d);case 4:p=z.sent,C(!1),p.statusCode===200?re(p.data.data):t.default.error(p.errors||"\u83B7\u53D6\u9500\u552E\u6210\u672C\u5931\u8D25");case 7:case"end":return z.stop()}},D)}));return function(){return I.apply(this,arguments)}}(),Le=function(){var I=(0,v.Z)((0,u.Z)().mark(function D(){var d;return(0,u.Z)().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return C(!0),L.next=3,Q.gettree({});case 3:d=L.sent,C(!1),d.statusCode===200?(Ze(d.data),Ae(Be(d.data))):t.default.error("\u67E5\u8BE2\u5E97\u94FA\u5217\u8868\u5931\u8D25");case 6:case"end":return L.stop()}},D)}));return function(){return I.apply(this,arguments)}}(),Te=function(){xe([]),q([n()(n()(new Date(Date.now()-24*60*60*1e3*7)).format("YYYY-MM-DD 00:00:00")),n()(n()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))])},Be=function I(D){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return D.forEach(function(p){var L=p.children,z=(0,B.Z)(p,P);d.push(z),L&&L.length>0&&I(L,d)}),d};return(0,_.useEffect)(function(){Pe(),Le()},[]),(0,s.jsxs)(S.ZP,{children:[F?(0,s.jsx)(G,{}):null,(0,s.jsx)(T.Z,{className:l()["data-search-card"],children:(0,s.jsxs)(ee.Z,{gutter:20,justify:"start",children:[(0,s.jsxs)(J.Z,{xs:24,sm:24,md:12,lg:12,xl:8,className:l()["data-search-item"],children:[(0,s.jsx)("div",{className:l()["data-search-prefix"],children:"\u95E8\u5E97"}),(0,s.jsx)($.Z,{className:l()["data-search-sufixx"],value:De,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:pe,placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",treeDefaultExpandAll:!0,onChange:function(D){return xe(D)}})]}),(0,s.jsxs)(J.Z,{xs:24,sm:24,md:12,lg:12,xl:8,className:l()["data-search-item"],children:[(0,s.jsx)("div",{className:l()["data-search-prefix"],children:"\u8D77\u59CB\u65F6\u95F4"}),(0,s.jsx)(V,{size:"middle",className:l()["data-search-sufixx"],value:w,onChange:function(D,d){var p=[n()(n()(new Date(d[0])).format("YYYY-MM-DD 00:00:00")),n()(n()(new Date(d[1])).format("YYYY-MM-DD 23:59:59"))];q(p)}})]}),(0,s.jsxs)("div",{className:l()["data-search-btns"],children:[(0,s.jsx)(y.Z,{className:l()["search-btn-item"],onClick:Te,children:"\u91CD\u7F6E"}),(0,s.jsx)(y.Z,{className:l()["search-btn-item"],type:"primary",onClick:Pe,children:"\u67E5\u8BE2"})]})]})}),(0,s.jsxs)(T.Z,{className:l()["table-card"],children:[(0,s.jsx)("div",{className:l()["download-btn"],children:(0,s.jsx)(y.Z,{type:"primary",icon:(0,s.jsx)(b.Z,{}),size:"middle",children:"\u4E0B\u8F7D"})}),(0,s.jsx)(A.Z,{dataSource:de,columns:je,pagination:!1}),(0,s.jsx)("div",{className:l()["table-page"],children:(0,s.jsx)(f.Z,{current:N,pageSize:X,total:fe,onChange:Ie})})]})]})}},15746:function(R,m,e){"use strict";var r=e(21584);m.Z=r.Z},89032:function(R,m,e){"use strict";var r=e(38663),f=e.n(r),x=e(6999)},99134:function(R,m,e){"use strict";var r=e(67294),f=(0,r.createContext)({});m.Z=f},21584:function(R,m,e){"use strict";var r=e(96156),f=e(22122),x=e(90484),A=e(94184),ue=e.n(A),T=e(67294),E=e(53124),ee=e(99134),ce=function(a,$){var B={};for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&$.indexOf(u)<0&&(B[u]=a[u]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,u=Object.getOwnPropertySymbols(a);Z<u.length;Z++)$.indexOf(u[Z])<0&&Object.prototype.propertyIsEnumerable.call(a,u[Z])&&(B[u[Z]]=a[u[Z]]);return B};function y(a){return typeof a=="number"?"".concat(a," ").concat(a," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(a)?"0 0 ".concat(a):a}var te=["xs","sm","md","lg","xl","xxl"],J=T.forwardRef(function(a,$){var B=T.useContext(E.E_),u=B.getPrefixCls,Z=B.direction,t=T.useContext(ee.Z),v=t.gutter,c=t.wrap,i=t.supportFlexGap,g=a.prefixCls,K=a.span,U=a.order,_=a.offset,S=a.push,O=a.pull,l=a.className,ae=a.children,Y=a.flex,Q=a.style,H=ce(a,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),n=u("col",g),b={};te.forEach(function(M){var o={},h=a[M];typeof h=="number"?o.span=h:(0,x.Z)(h)==="object"&&(o=h||{}),delete H[M],b=(0,f.Z)((0,f.Z)({},b),(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(n,"-").concat(M,"-").concat(o.span),o.span!==void 0),"".concat(n,"-").concat(M,"-order-").concat(o.order),o.order||o.order===0),"".concat(n,"-").concat(M,"-offset-").concat(o.offset),o.offset||o.offset===0),"".concat(n,"-").concat(M,"-push-").concat(o.push),o.push||o.push===0),"".concat(n,"-").concat(M,"-pull-").concat(o.pull),o.pull||o.pull===0),"".concat(n,"-rtl"),Z==="rtl"))});var s=ue()(n,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(n,"-").concat(K),K!==void 0),"".concat(n,"-order-").concat(U),U),"".concat(n,"-offset-").concat(_),_),"".concat(n,"-push-").concat(S),S),"".concat(n,"-pull-").concat(O),O),l,b),P={};if(v&&v[0]>0){var V=v[0]/2;P.paddingLeft=V,P.paddingRight=V}if(v&&v[1]>0&&!i){var G=v[1]/2;P.paddingTop=G,P.paddingBottom=G}return Y&&(P.flex=y(Y),c===!1&&!P.minWidth&&(P.minWidth=0)),T.createElement("div",(0,f.Z)({},H,{style:(0,f.Z)((0,f.Z)({},P),Q),className:s,ref:$}),ae)});m.Z=J},92820:function(R,m,e){"use strict";var r=e(22122),f=e(96156),x=e(90484),A=e(28481),ue=e(94184),T=e.n(ue),E=e(67294),ee=e(53124),ce=e(98082),y=e(24308),te=e(93355),J=e(99134),a=function(t,v){var c={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&v.indexOf(i)<0&&(c[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var g=0,i=Object.getOwnPropertySymbols(t);g<i.length;g++)v.indexOf(i[g])<0&&Object.prototype.propertyIsEnumerable.call(t,i[g])&&(c[i[g]]=t[i[g]]);return c},$=(0,te.b)("top","middle","bottom","stretch"),B=(0,te.b)("start","end","center","space-around","space-between","space-evenly");function u(t,v){var c=E.useState(typeof t=="string"?t:""),i=(0,A.Z)(c,2),g=i[0],K=i[1],U=function(){if(typeof t=="string"&&K(t),(0,x.Z)(t)==="object")for(var S=0;S<y.c4.length;S++){var O=y.c4[S];if(!!v[O]){var l=t[O];if(l!==void 0){K(l);return}}}};return E.useEffect(function(){U()},[JSON.stringify(t),v]),g}var Z=E.forwardRef(function(t,v){var c=t.prefixCls,i=t.justify,g=t.align,K=t.className,U=t.style,_=t.children,S=t.gutter,O=S===void 0?0:S,l=t.wrap,ae=a(t,["prefixCls","justify","align","className","style","children","gutter","wrap"]),Y=E.useContext(ee.E_),Q=Y.getPrefixCls,H=Y.direction,n=E.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),b=(0,A.Z)(n,2),s=b[0],P=b[1],V=E.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),G=(0,A.Z)(V,2),M=G[0],o=G[1],h=u(g,M),de=u(i,M),re=(0,ce.Z)(),ve=E.useRef(O);E.useEffect(function(){var le=y.ZP.subscribe(function(F){o(F);var C=ve.current||0;(!Array.isArray(C)&&(0,x.Z)(C)==="object"||Array.isArray(C)&&((0,x.Z)(C[0])==="object"||(0,x.Z)(C[1])==="object"))&&P(F)});return function(){return y.ZP.unsubscribe(le)}},[]);var ie=function(){var F=[void 0,void 0],C=Array.isArray(O)?O:[O,void 0];return C.forEach(function(k,oe){if((0,x.Z)(k)==="object")for(var w=0;w<y.c4.length;w++){var q=y.c4[w];if(s[q]&&k[q]!==void 0){F[oe]=k[q];break}}else F[oe]=k}),F},N=Q("row",c),j=ie(),_e=T()(N,(0,f.Z)((0,f.Z)((0,f.Z)((0,f.Z)({},"".concat(N,"-no-wrap"),l===!1),"".concat(N,"-").concat(de),de),"".concat(N,"-").concat(h),h),"".concat(N,"-rtl"),H==="rtl"),K),W={},X=j[0]!=null&&j[0]>0?j[0]/-2:void 0,se=j[1]!=null&&j[1]>0?j[1]/-2:void 0;if(X&&(W.marginLeft=X,W.marginRight=X),re){var me=(0,A.Z)(j,2);W.rowGap=me[1]}else se&&(W.marginTop=se,W.marginBottom=se);var ne=(0,A.Z)(j,2),fe=ne[0],Ee=ne[1],ge=E.useMemo(function(){return{gutter:[fe,Ee],wrap:l,supportFlexGap:re}},[fe,Ee,l,re]);return E.createElement(J.Z.Provider,{value:ge},E.createElement("div",(0,r.Z)({},ae,{className:_e,style:(0,r.Z)((0,r.Z)({},W),U),ref:v}),_))});m.Z=Z},6999:function(R,m,e){"use strict";var r=e(38663),f=e.n(r),x=e(80638),A=e.n(x)},71230:function(R,m,e){"use strict";var r=e(92820);m.Z=r.Z},13062:function(R,m,e){"use strict";var r=e(38663),f=e.n(r),x=e(6999)}}]);
|