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 regels
7.1 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[1510,1322],{65892:function(tt,m,r){"use strict";r.r(m),r.d(m,{default:function(){return Y}});var y=r(39428),C=r(3182),et=r(57663),Z=r(71577),T=r(11849),rt=r(47673),A=r(4107),D=r(93224),at=r(43358),v=r(34041),h=r(2824),O=r(90631),l=r(67294),R=r(78009),P=r(16894),M=r(53667),W=r.n(M),p=r(48971),f={orderList:function(i){return i.isreport=!0,(0,p.WY)("/kitchen/api/order/order-flow",{method:"Post",data:i})},srdTypeList:function(i){return(0,p.WY)("/kitchen/api/storetype/list",{method:"Post",data:i})},srdList:function(i){return(0,p.WY)("/kitchen/api/store/list",{method:"Post",data:i})},goodsList:function(i){return(0,p.WY)("/kitchen/api/goodes/list",{method:"Post",data:i})},goodsTypeList:function(i){return(0,p.WY)("/kitchen/api/goodstype/list",{method:"Post",data:i})}},a=r(85893),N=["defaultRender"],w=function(){var i=(0,l.useState)([]),g=(0,h.Z)(i,2),F=g[0],b=g[1],G=(0,l.useState)([]),E=(0,h.Z)(G,2),H=E[0],K=E[1],V=(0,l.useState)([]),S=(0,h.Z)(V,2),$=S[0],z=S[1],J=(0,l.useState)([]),L=(0,h.Z)(J,2),Q=L[0],U=L[1],X=(0,l.useState)([]),j=(0,h.Z)(X,2),B=j[0],k=j[1],q=(0,l.useRef)();(0,l.useEffect)(function(){function d(){f.srdTypeList().then(function(u){var e=u.data;e.forEach(function(t){t.storeTypeId=t.id,t.text=t.name}),b(e)})}function n(){f.srdList().then(function(u){var e=u.data;e.forEach(function(t){t.value=t.id,t.label=t.name}),K(e)})}function s(){f.goodsList().then(function(u){var e=u.data;e.forEach(function(t){t.label=t.name,t.value=t.id}),z(e)})}function c(){f.goodsTypeList().then(function(u){var e=u.data;e.forEach(function(t){t.label=t.name,t.value=t.id}),U(e)})}n(),d(),s(),c()},[]);function _(){var d=B.ReqDetailList,n={},s=[];I.map(function(u,e){e>6&&s.push(u)}),n.fileName="\u8BA2\u5355\u660E\u7EC6",n.datas=[{sheetData:B.map(function(u){var e={};return I.forEach(function(t,o){o>6&&(e[t.dataIndex]=u[t.dataIndex])}),e}),sheetName:"\u8BA2\u5355\u660E\u7EC6",sheetFilter:s.map(function(u){return u.dataIndex}),sheetHeader:s.map(function(u){return u.title}),columnWidths:s.map(function(){return 10})}];var c=new(W())(n);c.saveExcel()}var I=[{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:F},{title:"\u8BA2\u5355\u65F6\u95F4",dataIndex:"order_CreateTime",valueType:"dateRange",hideInTable:!0,search:{transform:function(n){return{order_CreateTime:n[0],order_EndTime:n[1]}}}},{title:"\u5546\u54C1\u540D\u79F0",dataIndex:"goodsId",hideInTable:!0,valueType:"select",renderFormItem:function(){return(0,a.jsx)(v.Z,{mode:"multiple",showArrow:!0,optionFilterProp:"label",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1",style:{width:"100%"},options:$})}},{title:"\u8BA2\u5355\u72B6\u6001",dataIndex:"status",hideInTable:!0,valueType:"select",renderFormItem:function(){return(0,a.jsxs)(v.Z,{mode:"multiple",showArrow:!0,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1",style:{width:"100%"},children:[(0,a.jsx)(Option,{children:"\u652F\u4ED8\u6210\u529F"},2),(0,a.jsx)(Option,{children:"\u7B49\u5F85\u5236\u4F5C"},3),(0,a.jsx)(Option,{children:"\u5236\u4F5C\u4E2D"},4),(0,a.jsx)(Option,{children:"\u5236\u4F5C\u5B8C\u6210\u5F85\u53D6\u9910"},5),(0,a.jsx)(Option,{children:"\u53D6\u9910\u5B8C\u6210"},6),(0,a.jsx)(Option,{children:"\u53D7\u4FDD\u62A4\u8BA2\u5355"},7),(0,a.jsx)(Option,{children:"\u65E0\u4E3B\u72B6\u6001"},8),(0,a.jsx)(Option,{children:"\u7ACB\u5373\u5403\u9762"},9),(0,a.jsx)(Option,{children:"\u65E0\u6548\u8BA2\u5355"},10),(0,a.jsx)(Option,{children:"\u5E9F\u5F03\u8BA2\u5355"},11),(0,a.jsx)(Option,{children:"\u9000\u6B3E\u8BA2\u5355"},20),(0,a.jsx)(Option,{children:"\u8BA2\u5355\u4E0D\u53EF\u505A"},21)]})}},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeId",hideInTable:!0,valueType:"select",renderFormItem:function(){return(0,a.jsx)(v.Z,{mode:"multiple",showArrow:!0,placeholder:"\u8BF7\u9009\u62E9\u5E97\u94FA",style:{width:"100%"},options:H})}},{title:"\u5546\u54C1\u7C7B\u578B",dataIndex:"goodsTypeId",hideInTable:!0,valueType:"select",renderFormItem:function(){return(0,a.jsx)(v.Z,{mode:"multiple",showArrow:!0,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u7C7B\u578B",style:{width:"100%"},options:Q})}},{title:"\u5E97\u94FA\u5206\u7C7B",dataIndex:"storeTypeName",hideInSearch:!0},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeName",hideInSearch:!0},{title:"\u5546\u54C1\u7C7B\u578B",dataIndex:"goodsTypeName",hideInSearch:!0},{title:"\u5546\u54C1\u540D\u79F0",dataIndex:"goodsName",hideInSearch:!0},{title:"\u8BA2\u5355\u5E94\u4ED8\u91D1\u989D",dataIndex:"order_OriginalMoney",renderText:function(n){return"".concat(n,"\xA5")},hideInSearch:!0},{title:"\u8BA2\u5355\u5B9E\u4ED8\u91D1\u989D",dataIndex:"order_RealMoney",hideInSearch:!0,renderText:function(n){return"".concat(n,"\xA5")}},{title:"\u8BA2\u5355\u53F7",dataIndex:"order_Number",hideInSearch:!0},{title:"\u652F\u4ED8\u65B9\u5F0F",dataIndex:"payMode",key:"payMode",hideInSearch:!0,valueEnum:{0:{text:"\u5FAE\u4FE1\u652F\u4ED8",status:"Processing"}}},{title:"\u8BA2\u5355\u72B6\u6001",dataIndex:"order_Status",key:"order_Status",hideInSearch:!0,valueEnum:{1:{text:"\u5F85\u652F\u4ED8"},2:{text:"\u652F\u4ED8\u6210\u529F"},3:{text:"\u7B49\u5F85\u5236\u4F5C",status:"processing"},4:{text:"\u5236\u4F5C\u4E2D",status:"processing"},5:{text:"\u5236\u4F5C\u5B8C\u6210\uFF0C\u5F85\u53D6\u9910",status:"processing"},6:{text:"\u53D6\u9910\u5B8C\u6210",status:"Success"},7:{text:"\u53D7\u4FDD\u62A4\u8BA2\u5355",status:"processing"},8:{text:"\u65E0\u4E3B\u72B6\u6001",status:"warning"},9:{text:"\u7ACB\u5373\u5403\u9762",status:"Success"},10:{text:"\u65E0\u6548\u8BA2\u5355",status:"warning"},11:{text:"\u5E9F\u5F03\u8BA2\u5355",status:"warning"},20:{text:"\u9000\u6B3E\u8BA2\u5355",status:"warning"},21:{text:"\u8BA2\u5355\u4E0D\u53EF\u505A",status:"warning"}}},{title:"\u4E0B\u5355\u7C7B\u578B",dataIndex:"placeMode",key:"placeMode",hideInSearch:!0,valueEnum:{0:{text:"\u6B63\u5E38\u8BA2\u5355",status:"Success"},1:{text:"\u7ACB\u5373\u5403\u9762",status:"Processing"},2:{text:"\u76F2\u76D2\u4E0B\u5355",status:"Default"}}},{title:"\u521B\u5EFA\u65F6\u95F4",sorter:!0,dataIndex:"order_CreateTime",valueType:"dateTime",hideInSearch:!0,renderFormItem:function(n,s,c){var u=s.defaultRender,e=(0,D.Z)(s,N),t=c.getFieldValue("status");return"".concat(t)==="0"?!1:"".concat(t)==="3"?(0,a.jsx)(A.Z,(0,T.Z)((0,T.Z)({},e),{},{placeholder:"\u8BF7\u8F93\u5165\u5F02\u5E38\u539F\u56E0\uFF01"})):u(n)}}];return(0,a.jsx)(R.ZP,{children:(0,a.jsx)(P.ZP,{headerTitle:"\u8BA2\u5355\u660E\u7EC6",actionRef:q,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,a.jsxs)(Z.Z,{type:"primary",onClick:function(){return _()},children:[(0,a.jsx)(O.Z,{})," \u5BFC\u51FA"]},"create")]},columns:I,request:function(){var d=(0,C.Z)((0,y.Z)().mark(function n(s,c,u){var e;return(0,y.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return s.storeTypeId!=null&&(s.storeTypeId=F[s.storeTypeId].storeTypeId),o.next=3,f.orderList(s);case 3:return e=o.sent,k(e.data.data),o.abrupt("return",{data:e.data.data,success:!0,total:e.data.total});case 6:case"end":return o.stop()}},n)}));return function(n,s,c){return d.apply(this,arguments)}}()})})},Y=w}}]);