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