You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

p__order__cost-of-sales.de68d12b.async.js 12 KiB

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