(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);Z0){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);y0?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)}}]);