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