|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8849,1322],{56036:function(k,Z,r){"use strict";r.r(Z),r.d(Z,{default:function(){return o}});var T=r(3182),x=r(57663),C=r(71577),h=r(62999),S=r(54680),g=r(2824),P=r(94043),D=r.n(P),_=r(90631),p=r(67294),E=r(78009),R=r(16894),O=r(53667),W=r.n(O),y=r(48971),L={orderSummaryList:function(e){return e.isreport=!0,(0,y.WY)("/kitchen/api/order/order-summary",{method:"Post",data:e})},srdTypeList:function(e){return(0,y.WY)("/kitchen/api/storetype/list",{method:"Post",data:e})},srdList:function(e){return(0,y.WY)("/kitchen/api/store/list",{method:"Post",data:e})},goodsList:function(e){return(0,y.WY)("/kitchen/api/goodes/list",{method:"Post",data:e})},goodsTypeList:function(e){return(0,y.WY)("/kitchen/api/goodstype/list",{method:"Post",data:e})}},b=r(3408),B=r(30381),v=r(85893),n=function(){var e=(0,p.useState)([]),I=(0,g.Z)(e,2),H=I[0],N=I[1],z=(0,p.useState)([]),j=(0,g.Z)(z,2),de=j[0],V=j[1],J=(0,p.useState)([]),K=(0,g.Z)(J,2),le=K[0],Q=K[1],X=(0,p.useState)([]),Y=(0,g.Z)(X,2),ce=Y[0],q=Y[1],ee=(0,p.useState)([]),F=(0,g.Z)(ee,2),$=F[0],te=F[1],re=(0,p.useRef)(),ne=(0,p.useState)([]),G=(0,g.Z)(ne,2),ae=G[0],ie=G[1],ue=(0,p.useState)([]),U=(0,g.Z)(ue,2),he=U[0],se=U[1];(0,p.useEffect)(function(){function f(){(0,b.FM)().then(function(i){a(i.data);function a(u){for(var l in u)u[l].type==2||u[l].type==3?u[l].disabled=!1:u[l].disabled=!0,u[l].children&&a(u[l].children)}ie(i.data);var t={};M(i.data);function M(u){for(var l in u)t[u[l].disabled]=!0,t[u[l].value]={text:u[l].title},u[l].children&&M(u[l].children)}se(t)})}function s(){L.srdTypeList().then(function(i){var a=i.data;a.forEach(function(t){t.storeTypeId=t.id,t.text=t.name}),N(a)})}function d(){L.srdList().then(function(i){var a=i.data;a.forEach(function(t){t.value=t.id,t.label=t.name}),V(a)})}function A(){L.goodsList().then(function(i){var a=i.data;a.forEach(function(t){t.label=t.name,t.value=t.id}),Q(a)})}function m(){L.goodsTypeList().then(function(i){var a=i.data;a.forEach(function(t){t.label=t.name,t.value=t.id}),q(a)})}d(),s(),A(),m(),f()},[]);function oe(){var f=$.ReqDetailList,s={},d=[];w.map(function(m,i){i>2&&d.push(m)}),s.fileName="\u8BA2\u5355\u6C47\u603B",s.datas=[{sheetData:$.map(function(m){var i={};return w.forEach(function(a,t){t>2&&(i[a.dataIndex]=m[a.dataIndex])}),i}),sheetName:"\u8BA2\u5355\u6C47\u603B",sheetFilter:d.map(function(m){return m.dataIndex}),sheetHeader:d.map(function(m){return m.title}),columnWidths:d.map(function(){return 9})}];var A=new(W())(s);A.saveExcel()}var w=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeId",hideInTable:!0,width:120,renderFormItem:function(){return(0,v.jsx)(S.Z,{style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:ae,placeholder:"\u5F52\u5C5E\u95E8\u5E97",treeDefaultExpandAll:!0})}},{title:"\u65E5\u671F\u8303\u56F4",dataIndex:"startTime",valueType:"dateRange",hideInTable:!0,initialValue:[]},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeName",hideInSearch:!0,width:120},{title:"\u603B\u8BA2\u5355",dataIndex:"sumOrder",hideInSearch:!0,width:120},{title:"\u5E94\u6536\u6B3E\u91D1\u989D",dataIndex:"orderOriginalMoney",renderText:function(s){return"".concat(s,"\xA5")},hideInSearch:!0,width:160},{title:"\u6B63\u5E38\u8BA2\u5355",dataIndex:"successfulCount",hideInSearch:!0,width:120},{title:"\u5B9E\u6536\u4ED8\u6B3E\u91D1\u989D",dataIndex:"orderRealMoney",hideInSearch:!0,renderText:function(s){return"".concat(s,"\xA5")},width:160},{title:"\u4F18\u60E0\u91D1\u989D",dataIndex:"discountMoney",hideInSearch:!0,renderText:function(s){return"".concat(s,"\xA5")},width:120},{title:"\u672A\u652F\u4ED8\u8BA2\u5355",dataIndex:"noPayRealCount",hideInSearch:!0,width:120},{title:"\u672A\u652F\u4ED8\u91D1\u989D",dataIndex:"noPayRealMoney",hideInSearch:!0,renderText:function(s){return"".concat(s,"\xA5")},width:120},{title:"\u9000\u6B3E\u8BA2\u5355",dataIndex:"refundCount",hideInSearch:!0,width:120},{title:"\u9000\u6B3E\u91D1\u989D",dataIndex:"refundRealMoney",hideInSearch:!0,renderText:function(s){return"".concat(s,"\xA5")},width:120}];return(0,v.jsx)(E.ZP,{children:(0,v.jsx)(R.ZP,{headerTitle:"\u8BA2\u5355\u6C47\u603B\u67E5\u8BE2",actionRef:re,rowKey:"id",scroll:{x:1300},search:{labelWidth:120},toolBarRender:function(){return[(0,v.jsxs)(C.Z,{type:"primary",onClick:function(){return oe()},children:[(0,v.jsx)(_.Z,{})," \u5BFC\u51FA"]},"create")]},columns:w,request:function(){var f=(0,T.Z)(D().mark(function s(d,A,m){var i,a,t;return D().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=[],a=0,d.storeTypeId!=null&&(d.storeTypeId=H[d.storeTypeId].storeTypeId),t={current:d.current,pageSize:d.pageSize,storeId:[d.storeId],Order_CreateTime:d.startTime[0],Order_EndTime:d.startTime[1]},u.next=6,L.orderSummaryList(t).then(function(l){i=l.data.data,a=l.data.total,te(l.data.data)});case 6:return u.abrupt("return",{data:i,success:!0,total:a});case 7:case"end":return u.stop()}},s)}));return function(s,d,A){return f.apply(this,arguments)}}()})})},o=n},3408:function(k,Z,r){"use strict";r.d(Z,{lM:function(){return g},IH:function(){return D},mm:function(){return R},eP:function(){return W},FM:function(){return B}});var T=r(11849),x=r(3182),C=r(94043),h=r.n(C),S=r(48971);function g(n,o){return P.apply(this,arguments)}function P(){return P=(0,x.Z)(h().mark(function n(o,c){return h().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.abrupt("return",(0,S.WY)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,T.Z)({},o)}));case 1:case"end":return I.stop()}},n)})),P.apply(this,arguments)}function D(n){return _.apply(this,arguments)}function _(){return _=(0,x.Z)(h().mark(function n(o){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,S.WY)("/kitchen/api/sysOrg/add",{method:"POST",data:(0,T.Z)({},o)}));case 1:case"end":return e.stop()}},n)})),_.apply(this,arguments)}function p(n){return E.apply(this,arguments)}function E(){return E=_asyncToGenerator(_regeneratorRuntime.mark(function n(o){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("\u200B/kitchen/api\u200B/sysOrg\u200B/list",{method:"POST",data:_objectSpread({},o)}));case 1:case"end":return e.stop()}},n)})),E.apply(this,arguments)}function R(n){return O.apply(this,arguments)}function O(){return O=(0,x.Z)(h().mark(function n(o){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,S.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/delete",{method:"POST",data:(0,T.Z)({},o)}));case 1:case"end":return e.stop()}},n)})),O.apply(this,arguments)}function W(n){return y.apply(this,arguments)}function y(){return y=(0,x.Z)(h().mark(function n(o){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,S.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/edit",{method:"POST",data:(0,T.Z)({},o)}));case 1:case"end":return e.stop()}},n)})),y.apply(this,arguments)}function L(n){return b.apply(this,arguments)}function b(){return b=_asyncToGenerator(_regeneratorRuntime.mark(function n(o){return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen\u200B/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},o)}));case 1:case"end":return e.stop()}},n)})),b.apply(this,arguments)}function B(n){return v.apply(this,arguments)}function v(){return v=(0,x.Z)(h().mark(function n(o){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,S.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,T.Z)({},o)}));case 1:case"end":return e.stop()}},n)})),v.apply(this,arguments)}}}]);
|