|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8387,7975,1322,6353,104,3591,1278,6469,8920,8698,6653],{21151:function(R){R.exports={"data-search-card":"data-search-card___2CvcD","data-search-box":"data-search-box___1PGzZ","search-btn-item":"search-btn-item___1e0rg","table-page":"table-page___docNF","loading-card":"loading-card___3JEuH","data-search-item":"data-search-item___3N1fL","data-search-input":"data-search-input___tj-G1","data-search-prefix":"data-search-prefix___ZSSA2","data-search-sufixx":"data-search-sufixx___lh3_G","data-search-btns":"data-search-btns___8r7Ga","download-btn":"download-btn___3pXdA"}},80638:function(){},30805:function(R,D,e){"use strict";e.r(D),e.d(D,{default:function(){return _}});var r=e(14781),E=e(36138),S=e(66456),T=e(15711),oe=e(58024),I=e(91894),M=e(57663),Y=e(71577),le=e(13062),B=e(71230),H=e(43358),J=e(34041),s=e(89032),L=e(15746),Z=e(62999),g=e(54680),n=e(93224),P=e(39428),O=e(34792),u=e(48086),p=e(3182),m=e(2824),ue=e(20228),w=e(11382),V=e(14965),G=e(91774),c=e(67294),W=e(78009),X=e(21151),d=e.n(X),F=e(11849),K=e(48971),j={getReportSalescost:function(i){return(0,K.WY)("/kitchen/api/report/salescost",{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,F.Z)({},i)})}},y=e(30381),h=e.n(y),k=e(90631),t=e(85893),$=["children"],z=G.Z.RangePicker,C=function(){return(0,t.jsx)("div",{className:d()["loading-card"],children:(0,t.jsx)(w.Z,{size:"large"})})};function _(){var l=(0,c.useState)([]),i=(0,m.Z)(l,2),q=i[0],ee=i[1],ie=(0,c.useState)(1),te=(0,m.Z)(ie,2),ae=te[0],ce=te[1],fe=(0,c.useState)(10),se=(0,m.Z)(fe,2),U=se[0],A=se[1],Q=(0,c.useState)(0),re=(0,m.Z)(Q,2),ne=re[0],de=re[1],Ie=(0,c.useState)(!1),me=(0,m.Z)(Ie,2),Le=me[0],N=me[1],je=(0,c.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"))]),he=(0,m.Z)(je,2),ve=he[0],Ee=he[1],Ae=(0,c.useState)(""),ge=(0,m.Z)(Ae,2),ye=ge[0],pe=ge[1],Te=(0,c.useState)([]),xe=(0,m.Z)(Te,2),Be=xe[0],We=xe[1],Ke=(0,c.useState)([]),De=(0,m.Z)(Ke,2),Ue=De[0],Ne=De[1],Ye=(0,c.useState)([]),Pe=(0,m.Z)(Ye,2),Oe=Pe[0],Ce=Pe[1],Ge=(0,c.useState)([]),Ze=(0,m.Z)(Ge,2),_e=Ze[0],be=Ze[1],we=(0,c.useState)([]),Se=(0,m.Z)(we,2),Fe=Se[0],$e=Se[1],ze=(0,c.useState)([]),Me=(0,m.Z)(ze,2),tt=Me[0],Qe=Me[1],He=function(o,a){ce(o),A(a)},Je=[{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=_e.find(function(x){return x.id===o});return console.log(">>>>",_e,o,a),a?(0,t.jsx)("span",{children:a.name}):(0,t.jsx)("span",{children:"\u6682\u65E0\u5546\u54C1\u540D\u79F0"})}},{title:"\u9500\u552E\u6536\u5165",dataIndex:"salesPrice",key:"salesPrice"},{title:"\u9500\u552E\u6210\u672C",dataIndex:"costPrice",key:"costPrice"},{title:"\u9500\u552E\u6570\u91CF",dataIndex:"salesNum",key:"salesNum"},{title:"\u6210\u672C\u7387\uFF08%\uFF09",dataIndex:"costRate",key:"costRate"}],Re=function(){var v=(0,p.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:ye,goodsId:Oe[0],goodsTypeId:Fe[0],begintime:ve[0],endtime:ve[1],current:ae,pageSize:U},N(!0),b.next=4,j.getReportSalescost(a);case 4:x=b.sent,N(!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,p.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 N(!0),f.next=3,j.gettree();case 3:a=f.sent,N(!1),a.statusCode===200?(We(a.data),Ne(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,p.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 N(!0),f.next=3,j.goodsList();case 3:a=f.sent,N(!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,p.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 N(!0),f.next=3,j.goodsTypeList();case 3:a=f.sent,N(!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(){Ce([]),pe([]),$e([]),Ee([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,c.useEffect)(function(){Re(),Ve(),Xe(),ke()},[]),(0,t.jsxs)(W.ZP,{children:[Le?(0,t.jsx)(C,{}):null,(0,t.jsxs)(I.Z,{className:d()["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:d()["data-search-item"],children:[(0,t.jsx)("div",{className:d()["data-search-prefix"],children:"\u95E8\u5E97"}),(0,t.jsx)(g.Z,{className:d()["data-search-sufixx"],value:ye,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:d()["data-search-item"],children:[(0,t.jsx)("div",{className:d()["data-search-prefix"],children:"\u5546\u54C1"}),(0,t.jsx)(J.Z,{className:d()["data-search-sufixx"],showSearch:!0,mode:"tags",size:"middle",allowClear:!0,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1",value:Oe,onChange:function(o){return Ce(o)},filterOption:function(o,a){return a.children.toLowerCase().includes(o.toLowerCase())},children:_e.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:d()["data-search-item"],children:[(0,t.jsx)("div",{className:d()["data-search-prefix"],children:"\u8D77\u59CB\u65F6\u95F4"}),(0,t.jsx)(z,{size:"middle",className:d()["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"))];Ee(x)}})]})]}),(0,t.jsxs)("div",{className:d()["data-search-btns"],children:[(0,t.jsx)(Y.Z,{className:d()["search-btn-item"],onClick:qe,children:"\u91CD\u7F6E"}),(0,t.jsx)(Y.Z,{className:d()["search-btn-item"],type:"primary",onClick:Re,children:"\u67E5\u8BE2"})]})]}),(0,t.jsxs)(I.Z,{className:d()["table-card"],children:[(0,t.jsx)("div",{className:d()["download-btn"],children:(0,t.jsx)(Y.Z,{type:"primary",icon:(0,t.jsx)(k.Z,{}),size:"middle",children:"\u4E0B\u8F7D"})}),(0,t.jsx)(T.Z,{dataSource:q,columns:Je,pagination:!1}),(0,t.jsx)("div",{className:d()["table-page"],children:(0,t.jsx)(E.Z,{current:ae,pageSize:U,total:ne,onChange:He})})]})]})}},15746:function(R,D,e){"use strict";var r=e(21584);D.Z=r.Z},89032:function(R,D,e){"use strict";var r=e(38663),E=e.n(r),S=e(6999)},99134:function(R,D,e){"use strict";var r=e(67294),E=(0,r.createContext)({});D.Z=E},21584:function(R,D,e){"use strict";var r=e(96156),E=e(22122),S=e(90484),T=e(94184),oe=e.n(T),I=e(67294),M=e(53124),Y=e(99134),le=function(s,L){var Z={};for(var g in s)Object.prototype.hasOwnProperty.call(s,g)&&L.indexOf(g)<0&&(Z[g]=s[g]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,g=Object.getOwnPropertySymbols(s);n<g.length;n++)L.indexOf(g[n])<0&&Object.prototype.propertyIsEnumerable.call(s,g[n])&&(Z[g[n]]=s[g[n]]);return Z};function B(s){return typeof s=="number"?"".concat(s," ").concat(s," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(s)?"0 0 ".concat(s):s}var H=["xs","sm","md","lg","xl","xxl"],J=I.forwardRef(function(s,L){var Z,g=I.useContext(M.E_),n=g.getPrefixCls,P=g.direction,O=I.useContext(Y.Z),u=O.gutter,p=O.wrap,m=O.supportFlexGap,ue=s.prefixCls,w=s.span,V=s.order,G=s.offset,c=s.push,W=s.pull,X=s.className,d=s.children,F=s.flex,K=s.style,j=le(s,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),y=n("col",ue),h={};H.forEach(function(C){var _,l={},i=s[C];typeof i=="number"?l.span=i:(0,S.Z)(i)==="object"&&(l=i||{}),delete j[C],h=(0,E.Z)((0,E.Z)({},h),(_={},(0,r.Z)(_,"".concat(y,"-").concat(C,"-").concat(l.span),l.span!==void 0),(0,r.Z)(_,"".concat(y,"-").concat(C,"-order-").concat(l.order),l.order||l.order===0),(0,r.Z)(_,"".concat(y,"-").concat(C,"-offset-").concat(l.offset),l.offset||l.offset===0),(0,r.Z)(_,"".concat(y,"-").concat(C,"-push-").concat(l.push),l.push||l.push===0),(0,r.Z)(_,"".concat(y,"-").concat(C,"-pull-").concat(l.pull),l.pull||l.pull===0),(0,r.Z)(_,"".concat(y,"-rtl"),P==="rtl"),_))});var k=oe()(y,(Z={},(0,r.Z)(Z,"".concat(y,"-").concat(w),w!==void 0),(0,r.Z)(Z,"".concat(y,"-order-").concat(V),V),(0,r.Z)(Z,"".concat(y,"-offset-").concat(G),G),(0,r.Z)(Z,"".concat(y,"-push-").concat(c),c),(0,r.Z)(Z,"".concat(y,"-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 F&&(t.flex=B(F),p===!1&&!t.minWidth&&(t.minWidth=0)),I.createElement("div",(0,E.Z)({},j,{style:(0,E.Z)((0,E.Z)({},t),K),className:k,ref:L}),d)});D.Z=J},92820:function(R,D,e){"use strict";var r=e(22122),E=e(96156),S=e(90484),T=e(28481),oe=e(94184),I=e.n(oe),M=e(67294),Y=e(53124),le=e(98082),B=e(24308),H=e(93355),J=e(99134),s=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 p=0,u=Object.getOwnPropertySymbols(n);p<u.length;p++)P.indexOf(u[p])<0&&Object.prototype.propertyIsEnumerable.call(n,u[p])&&(O[u[p]]=n[u[p]]);return O},L=(0,H.b)("top","middle","bottom","stretch"),Z=(0,H.b)("start","end","center","space-around","space-between","space-evenly"),g=M.forwardRef(function(n,P){var O,u=n.prefixCls,p=n.justify,m=n.align,ue=n.className,w=n.style,V=n.children,G=n.gutter,c=G===void 0?0:G,W=n.wrap,X=s(n,["prefixCls","justify","align","className","style","children","gutter","wrap"]),d=M.useContext(Y.E_),F=d.getPrefixCls,K=d.direction,j=M.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),y=(0,T.Z)(j,2),h=y[0],k=y[1],t=(0,le.Z)(),$=M.useRef(c);M.useEffect(function(){var se=B.ZP.subscribe(function(U){var A=$.current||0;(!Array.isArray(A)&&(0,S.Z)(A)==="object"||Array.isArray(A)&&((0,S.Z)(A[0])==="object"||(0,S.Z)(A[1])==="object"))&&k(U)});return function(){return B.ZP.unsubscribe(se)}},[]);var z=function(){var U=[void 0,void 0],A=Array.isArray(c)?c:[c,void 0];return A.forEach(function(Q,re){if((0,S.Z)(Q)==="object")for(var ne=0;ne<B.c4.length;ne++){var de=B.c4[ne];if(h[de]&&Q[de]!==void 0){U[re]=Q[de];break}}else U[re]=Q}),U},C=F("row",u),_=z(),l=I()(C,(O={},(0,E.Z)(O,"".concat(C,"-no-wrap"),W===!1),(0,E.Z)(O,"".concat(C,"-").concat(p),p),(0,E.Z)(O,"".concat(C,"-").concat(m),m),(0,E.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,T.Z)(_,2);i.rowGap=ie[1]}else ee&&(i.marginTop=ee,i.marginBottom=ee);var te=(0,T.Z)(_,2),ae=te[0],ce=te[1],fe=M.useMemo(function(){return{gutter:[ae,ce],wrap:W,supportFlexGap:t}},[ae,ce,W,t]);return M.createElement(J.Z.Provider,{value:fe},M.createElement("div",(0,r.Z)({},X,{className:l,style:(0,r.Z)((0,r.Z)({},i),w),ref:P}),V))});D.Z=g},6999:function(R,D,e){"use strict";var r=e(38663),E=e.n(r),S=e(80638),T=e.n(S)},71230:function(R,D,e){"use strict";var r=e(92820);D.Z=r.Z},13062:function(R,D,e){"use strict";var r=e(38663),E=e.n(r),S=e(6999)}}]);
|