Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

2 rader
12 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8387,7975,1322,5284,1915,9130,5081],{21151:function(I){I.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(I,y,e){"use strict";e.r(y),e.d(y,{default:function(){return N}});var n=e(14781),m=e(36138),O=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),h=e(54680),Z=e(93224),t=e(39428),p=e(34792),D=e(48086),d=e(3182),l=e(2824),b=e(20228),w=e(11382),V=e(14965),M=e(71356),u=e(67294),T=e(78009),se=e(21151),c=e.n(se),re=e(11849),U=e(48971),_={getReportSalescost:function(P){return(0,U.WY)("/kitchen/api/report/salescost",{method:"Post",data:P})},goodsList:function(P){return(0,U.WY)("/kitchen/api/goodes/list",{method:"Post",data:P})},goodsTypeList:function(P){return(0,U.WY)("/kitchen/api/goodstype/list",{method:"Post",data:P})},gettree:function(P){return(0,U.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,re.Z)({},P)})}},F=e(30381),g=e.n(F),S=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)(w.Z,{size:"large"})})};function N(){var Y=(0,u.useState)([]),P=(0,l.Z)(Y,2),_e=P[0],me=P[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),he=oe[0],ge=oe[1],z=(0,u.useState)(!1),B=(0,l.Z)(z,2),q=B[0],A=B[1],le=(0,u.useState)([g()(g()(new Date(Date.now()-24*60*60*1e3*7)).format("YYYY-MM-DD 00:00:00")),g()(g()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))]),ee=(0,l.Z)(le,2),Ee=ee[0],pe=ee[1],Le=(0,u.useState)(""),xe=(0,l.Z)(Le,2),De=xe[0],Pe=xe[1],Te=(0,u.useState)([]),Oe=(0,l.Z)(Te,2),Be=Oe[0],We=Oe[1],Ke=(0,u.useState)([]),Ze=(0,l.Z)(Ke,2),Ue=Ze[0],Ne=Ze[1],Ye=(0,u.useState)([]),Se=(0,l.Z)(Ye,2),Ce=Se[0],Me=Se[1],Ge=(0,u.useState)([]),Re=(0,l.Z)(Ge,2),ye=Re[0],be=Re[1],we=(0,u.useState)([]),Ae=(0,l.Z)(we,2),Fe=Ae[0],$e=Ae[1],ze=(0,u.useState)([]),Ie=(0,l.Z)(ze,2),tt=Ie[0],Qe=Ie[1],Je=function(o,s){$(o),fe(s)},He=[{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=ye.find(function(E){return E.id===o});return console.log(">>>>",ye,o,s),s?(0,a.jsx)("span",{children:s.name}):(0,a.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"}],je=function(){var v=(0,d.Z)((0,t.Z)().mark(function o(){var s,E;return(0,t.Z)().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return s={storeId:De,goodsId:Ce[0],goodsTypeId:Fe[0],begintime:Ee[0],endtime:Ee[1],current:de,pageSize:ie},A(!0),X.next=4,_.getReportSalescost(s);case 4:E=X.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 X.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,_.gettree();case 3:s=i.sent,A(!1),s.statusCode===200?(We(s.data),Ne(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)}}(),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,_.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(){Me([]),Pe([]),$e([]),pe([g()(g()(new Date(Date.now()-24*60*60*1e3*7)).format("YYYY-MM-DD 00:00:00")),g()(g()(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,X=(0,Z.Z)(E,J);s.push(X),i&&i.length>0&&v(i,s)}),s};return(0,u.useEffect)(function(){je(),Xe(),Ve(),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)(h.Z,{className:c()["data-search-sufixx"],value:De,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:Be,placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",treeDefaultExpandAll:!0,onChange:function(o){return Pe(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:Ce,onChange:function(o){return Me(o)},filterOption:function(o,s){return s.children.toLowerCase().includes(o.toLowerCase())},children:ye.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=[g()(g()(new Date(s[0])).format("YYYY-MM-DD 00:00:00")),g()(g()(new Date(s[1])).format("YYYY-MM-DD 23:59:59"))];pe(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)(S.Z,{}),size:"middle",children:"\u4E0B\u8F7D"})}),(0,a.jsx)(j.Z,{dataSource:_e,columns:He,pagination:!1}),(0,a.jsx)("div",{className:c()["table-page"],children:(0,a.jsx)(m.Z,{current:de,pageSize:ie,total:he,onChange:Je})})]})]})}},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),O=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),O=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 h in r)Object.prototype.hasOwnProperty.call(r,h)&&K.indexOf(h)<0&&(G[h]=r[h]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,h=Object.getOwnPropertySymbols(r);Z<h.length;Z++)K.indexOf(h[Z])<0&&Object.prototype.propertyIsEnumerable.call(r,h[Z])&&(G[h[Z]]=r[h[Z]]);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_),h=G.getPrefixCls,Z=G.direction,t=W.useContext(Q.Z),p=t.gutter,D=t.wrap,d=t.supportFlexGap,l=r.prefixCls,b=r.span,w=r.order,V=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"]),_=h("col",l),F={};te.forEach(function(C){var f={},N=r[C];typeof N=="number"?f.span=N:(0,O.Z)(N)==="object"&&(f=N||{}),delete U[C],F=(0,m.Z)((0,m.Z)({},F),(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"),Z==="rtl"))});var g=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(w),w),"".concat(_,"-offset-").concat(V),V),"".concat(_,"-push-").concat(M),M),"".concat(_,"-pull-").concat(u),u),T,F),S={};if(p&&p[0]>0){var a=p[0]/2;S.paddingLeft=a,S.paddingRight=a}if(p&&p[1]>0&&!d){var J=p[1]/2;S.paddingTop=J,S.paddingBottom=J}return c&&(S.flex=L(c),D===!1&&!S.minWidth&&(S.minWidth=0)),W.createElement("div",(0,m.Z)({},U,{style:(0,m.Z)((0,m.Z)({},S),re),className:g,ref:K}),se)});y.Z=ae},92820:function(I,y,e){"use strict";var n=e(22122),m=e(96156),O=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 h(t,p){var D=x.useState(typeof t=="string"?t:""),d=(0,j.Z)(D,2),l=d[0],b=d[1],w=function(){if(typeof t=="string"&&b(t),(0,O.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(){w()},[JSON.stringify(t),p]),l}var Z=x.forwardRef(function(t,p){var D=t.prefixCls,d=t.justify,l=t.align,b=t.className,w=t.style,V=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}),F=(0,j.Z)(_,2),g=F[0],S=F[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],N=h(l,C),Y=h(d,C),P=(0,ce.Z)(),_e=x.useRef(u);x.useEffect(function(){var ge=L.ZP.subscribe(function(z){f(z);var B=_e.current||0;(!Array.isArray(B)&&(0,O.Z)(B)==="object"||Array.isArray(B)&&((0,O.Z)(B[0])==="object"||(0,O.Z)(B[1])==="object"))&&S(z)});return function(){return L.ZP.unsubscribe(ge)}},[]);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,O.Z)(q)==="object")for(var le=0;le<L.c4.length;le++){var ee=L.c4[le];if(g[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(Y),Y),"".concat(H,"-").concat(N),N),"".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),P){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],he=x.useMemo(function(){return{gutter:[ve,oe],wrap:T,supportFlexGap:P}},[ve,oe,T,P]);return x.createElement(ae.Z.Provider,{value:he},x.createElement("div",(0,n.Z)({},se,{className:de,style:(0,n.Z)((0,n.Z)({},$),w),ref:p}),V))});y.Z=Z},6999:function(I,y,e){"use strict";var n=e(38663),m=e.n(n),O=e(80638),j=e.n(O)},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),O=e(6999)}}]);