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.
 
 
 

2 lines
5.8 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8849,7975,1322],{56036:function(q,v,a){"use strict";a.r(v),a.d(v,{default:function(){return M}});var T=a(39428),B=a(3182),_=a(57663),A=a(71577),tt=a(43358),m=a(34041),l=a(2824),N=a(90631),u=a(67294),R=a(78009),P=a(53779),j=a(53667),W=a.n(j),h=a(48971),c={orderSummaryList:function(n){return n.isreport=!0,(0,h.WY)("/kitchen/api/order/order-summary",{method:"Post",data:n})},srdTypeList:function(n){return(0,h.WY)("/kitchen/api/storetype/list",{method:"Post",data:n})},srdList:function(n){return(0,h.WY)("/kitchen/api/store/list",{method:"Post",data:n})},goodsList:function(n){return(0,h.WY)("/kitchen/api/goodes/list",{method:"Post",data:n})},goodsTypeList:function(n){return(0,h.WY)("/kitchen/api/goodstype/list",{method:"Post",data:n})}},s=a(85893),D=function(){var n=(0,u.useState)([]),S=(0,l.Z)(n,2),L=S[0],Y=S[1],b=(0,u.useState)([]),g=(0,l.Z)(b,2),O=g[0],G=g[1],H=(0,u.useState)([]),w=(0,l.Z)(H,2),K=w[0],$=w[1],z=(0,u.useState)([]),E=(0,l.Z)(z,2),J=E[0],Q=E[1],U=(0,u.useState)([]),Z=(0,l.Z)(U,2),F=Z[0],V=Z[1],X=(0,u.useRef)();(0,u.useEffect)(function(){function i(){c.srdTypeList().then(function(d){var e=d.data;e.forEach(function(t){t.storeTypeId=t.id,t.text=t.name}),Y(e)})}function r(){c.srdList().then(function(d){var e=d.data;e.forEach(function(t){t.value=t.id,t.label=t.name}),G(e)})}function o(){c.goodsList().then(function(d){var e=d.data;e.forEach(function(t){t.label=t.name,t.value=t.id}),$(e)})}function x(){c.goodsTypeList().then(function(d){var e=d.data;e.forEach(function(t){t.label=t.name,t.value=t.id}),Q(e)})}r(),i(),o(),x()},[]);function k(){var i=F.ReqDetailList,r={},o=[];y.map(function(d,e){e>5&&o.push(d)}),r.fileName="\u8BA2\u5355\u6C47\u603B",r.datas=[{sheetData:F.map(function(d){var e={};return y.forEach(function(t,C){C>5&&(e[t.dataIndex]=d[t.dataIndex])}),e}),sheetName:"\u8BA2\u5355\u6C47\u603B",sheetFilter:o.map(function(d){return d.dataIndex}),sheetHeader:o.map(function(d){return d.title}),columnWidths:o.map(function(){return 10})}];var x=new(W())(r);x.saveExcel()}var y=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u5E97\u94FA\u5206\u7C7B",dataIndex:"storeTypeId",hideInTable:!0,valueType:"select",valueEnum:L,fixed:"left",width:120},{title:"\u8BA2\u5355\u65F6\u95F4",dataIndex:"order_CreateTime",valueType:"dateRange",width:120,hideInTable:!0,search:{transform:function(r){return{order_CreateTime:r[0],order_EndTime:r[1]}}}},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeId",hideInTable:!0,fixed:"left",width:120,renderFormItem:function(){return(0,s.jsx)(m.Z,{mode:"multiple",showArrow:!0,placeholder:"\u8BF7\u9009\u62E9\u5E97\u94FA",style:{width:"100%"},options:O})}},{title:"\u5546\u54C1\u7C7B\u578B",dataIndex:"goodsTypeId",hideInTable:!0,valueType:"select",fixed:"left",width:120,renderFormItem:function(){return(0,s.jsx)(m.Z,{mode:"multiple",showArrow:!0,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u7C7B\u578B",style:{width:"100%"},options:J})}},{title:"\u5546\u54C1\u540D\u79F0",dataIndex:"goodsId",hideInTable:!0,valueType:"select",fixed:"left",width:120,renderFormItem:function(){return(0,s.jsx)(m.Z,{mode:"multiple",showArrow:!0,optionFilterProp:"label",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1",style:{width:"100%"},options:K})}},{title:"\u5E97\u94FA\u5206\u7C7B",dataIndex:"storeTypeName",hideInSearch:!0,fixed:"left",width:120},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeName",hideInSearch:!0,fixed:"left",width:120},{title:"\u5546\u54C1\u7C7B\u578B",dataIndex:"goodsTypeName",hideInSearch:!0,fixed:"left",width:120},{title:"\u5546\u54C1\u540D\u79F0",dataIndex:"goodsName",hideInSearch:!0,fixed:"left",width:120},{title:"\u5E94\u4ED8\u6B3E\u91D1\u989D",dataIndex:"order_OriginalMoney",renderText:function(r){return"".concat(r,"\xA5")},hideInSearch:!0,fixed:"left",width:160},{title:"\u5B9E\u9645\u4ED8\u6B3E\u91D1\u989D",dataIndex:"order_RealMoney",hideInSearch:!0,renderText:function(r){return"".concat(r,"\xA5")},fixed:"left",width:160},{title:"\u9000\u6B3E\u91D1\u989D",dataIndex:"refundMoney",hideInSearch:!0,renderText:function(r){return"".concat(r,"\xA5")},fixed:"left",width:120},{title:"\u603B\u8BA2\u5355",dataIndex:"sumOrder",hideInSearch:!0,fixed:"left",width:120},{title:"\u4E0B\u5355\u603B\u7897\u6570(\u7897)",dataIndex:"countDetail",hideInSearch:!0,fixed:"left",width:160},{title:"\u9000\u6B3E\u8BA2\u5355",dataIndex:"refund",hideInSearch:!0,fixed:"left",width:120},{title:"\u9000\u6B3E\u7897\u6570(\u7897)",dataIndex:"refundNum",hideInSearch:!0,fixed:"left",width:120},{title:"\u6B63\u5E38\u8BA2\u5355(\u7897)",dataIndex:"orderNum",hideInSearch:!0,width:120},{title:"\u76F2\u76D2\u8BA2\u5355(\u7897)",dataIndex:"boxNum",hideInSearch:!0,width:120},{title:"\u7ACB\u5373\u5403\u9762\u8BA2\u5355(\u7897)",dataIndex:"nowNum",hideInSearch:!0,width:160},{title:"\u5E9F\u5F03\u8BA2\u5355(\u7897)",dataIndex:"abandoned",hideInSearch:!0,width:120},{title:"\u4E0B\u5355\u603B\u4EBA\u6570",dataIndex:"customer",hideInSearch:!0,width:120}];return(0,s.jsx)(R.ZP,{children:(0,s.jsx)(P.ZP,{headerTitle:"\u8BA2\u5355\u6C47\u603B\u67E5\u8BE2",actionRef:X,rowKey:"id",scroll:{x:1300},search:{labelWidth:120},toolBarRender:function(){return[(0,s.jsxs)(A.Z,{type:"primary",onClick:function(){return k()},children:[(0,s.jsx)(N.Z,{})," \u5BFC\u51FA"]},"create")]},columns:y,request:function(){var i=(0,B.Z)((0,T.Z)().mark(function r(o,x,d){var e,t;return(0,T.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return e=[],t=0,o.storeTypeId!=null&&(o.storeTypeId=L[o.storeTypeId].storeTypeId),I.next=5,c.orderSummaryList(o).then(function(p){e=p.data.data,t=p.data.total,V(p.data.data)});case 5:return I.abrupt("return",{data:e,success:!0,total:t});case 6:case"end":return I.stop()}},r)}));return function(r,o,x){return i.apply(this,arguments)}}()})})},M=D}}]);