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