包含后厨 团餐 门店分支
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
10 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9487],{56765:function(ue,N,t){"use strict";t.r(N),t.d(N,{default:function(){return te}});var ie=t(57663),W=t(71577),w=t(11849),se=t(47673),Y=t(4107),V=t(93224),ce=t(43358),$=t(34041),S=t(2824),h=t(39428),fe=t(34792),F=t(48086),j=t(3182),U=t(90631),x=t(67294),H=t(28790),B=t(16894),K=t(53667),z=t.n(K),f=t(48971),v={orderList:function(e){return e.isreport=!0,(0,f.WY)("/kitchen/api/order/order-detail-flow",{method:"Post",data:e})},srdTypeList:function(e){return(0,f.WY)("/kitchen/api/storetype/list",{method:"Post",data:e})},srdList:function(e){return(0,f.WY)("/kitchen/api/store/list",{method:"Post",data:e})},goodsList:function(e){return(0,f.WY)("/kitchen/api/goodes/list",{method:"Post",data:e})},goodsTypeList:function(e){return(0,f.WY)("/kitchen/api/goodstype/list",{method:"Post",data:e})},StartRefund:function(e){return(0,f.WY)("/kitchen/api/refund/StartOrderRefund",{method:"Post",params:e})},GetOrderDetails:function(e){return(0,f.WY)("/kitchen/api/Order/GetOrderDetails",{method:"Post",params:e})},GetFlowExport:function(e){return(0,f.WY)("/kitchen/api/Order/GetFlowExport",{method:"Post",data:e})},printsmallticket:function(e){return(0,f.WY)("/kitchen/api/printer/print-small-ticket",{method:"Post",data:e})}},me=t(71194),J=t(50146),he=t(98858),s=t(4914),Q=t(12826),r=t(85893),p={},X=function(e){var y,I,g,Z,R=e.createModalVisible,L=e.onCancel,b=(0,x.useState)([]),M=(0,S.Z)(b,2),P=M[0],O=M[1];return(0,r.jsxs)(J.Z,{title:"\u8BA2\u5355\u8BE6\u60C5",width:1e3,visible:e.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,destroyOnClose:!0,onCancel:function(){return L()},maskClosable:!1,children:[(0,r.jsx)(Q.ZP,{title:"\u8BA2\u5355\u4FE1\u606F",request:(0,j.Z)((0,h.Z)().mark(function l(){return(0,h.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,v.GetOrderDetails({id:e.values.id});case 2:return p=d.sent,O(p),d.abrupt("return",Promise.resolve({success:!0,data:p}));case 5:case"end":return d.stop()}},l)})),columns:[{title:"\u4F1A\u5458\u59D3\u540D",key:"customer_Name",dataIndex:"customer_Name"},{title:"\u624B\u673A\u53F7",key:"customer_Tel",dataIndex:"customer_Tel"},{title:"\u8BA2\u5355\u6D41\u6C34",key:"order_Number",dataIndex:"order_Number"},{title:"\u8BA2\u5355\u53F7",key:"transaction_ID",dataIndex:"transaction_ID"},{title:"\u4EA4\u6613\u5355\u53F7",key:"trade_no",dataIndex:"trade_no"},{title:"\u6392\u961F\u53F7",key:"order_SortID",dataIndex:"order_SortID"},{title:"\u6298\u6263",key:"discount",dataIndex:"discount"},{title:"\u5B9E\u4ED8\u91D1\u989D",dataIndex:"order_RealMoney",valueType:"money",fieldProps:{moneySymbol:"\xA5"}},{title:"\u5E94\u4ED8\u91D1\u989D",dataIndex:"order_OriginalMoney",valueType:"money",fieldProps:{moneySymbol:"\xA5"}},{title:"\u5B9E\u4ED8\u91D1\u989D(\u9000)",dataIndex:"refundRealMoney",valueType:"money",fieldProps:{moneySymbol:"\xA5"}},{title:"\u5E94\u4ED8\u91D1\u989D(\u9000)",dataIndex:"refundOriginalMoney",valueType:"money",fieldProps:{moneySymbol:"\xA5"}},{title:"\u6570\u91CF",dataIndex:"order_Count",hideInSearch:!0},{title:"\u652F\u4ED8\u65B9\u5F0F",dataIndex:"payMode",key:"payMode"},{title:"\u8BA2\u5355\u72B6\u6001",dataIndex:"order_Status",key:"order_Status"},{title:"\u6D88\u8D39\u91D1\u989D",dataIndex:"recharge",key:"recharge"},{title:"\u6D88\u8D39\u8D60\u9001\u91D1\u989D",dataIndex:"rechargeBalance",key:"rechargeBalance"}]}),(0,r.jsx)("h3",{style:{fontWeight:"bold",fontSize:16,marginTop:30},children:"\u5546\u54C1\u5217\u8868"}),(0,r.jsx)(B.ZP,{rowKey:"id",request:(0,j.Z)((0,h.Z)().mark(function l(){return(0,h.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,v.GetOrderDetails({id:e.values.id});case 2:return p=d.sent,d.abrupt("return",{data:p.detailList,success:!0});case 4:case"end":return d.stop()}},l)})),columns:[{title:"\u5546\u54C1\u5206\u7C7B",key:"goodsTypeName",dataIndex:"goodsTypeName"},{title:"\u5546\u54C1\u540D\u79F0",key:"goodsName",dataIndex:"goodsName"},{title:"\u5E94\u4ED8\u91D1\u989D",key:"originalMoney",dataIndex:"originalMoney",valueType:"money",fieldProps:{moneySymbol:"\xA5"}},{title:"\u5B9E\u4ED8\u91D1\u989D",dataIndex:"realMoney",valueType:"money",fieldProps:{moneySymbol:"\xA5"}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(D,d){return[(0,r.jsx)("a",{onClick:function(){v.printsmallticket({orderId:e.values.id,subOrderId:d.id}).then(function(k){debugger;k.data?F.default.success("\u6253\u5370\u6210\u529F"):F.default.error("\u6253\u5370\u5931\u8D25")})},children:"\u6253\u5370\u5C0F\u7968"},"config")]}}],toolBarRender:!1,search:!1}),(0,r.jsx)(s.Z,{title:"\u4F18\u60E0\u5238",children:(y=p)===null||y===void 0||(I=y.paperCoupons)===null||I===void 0?void 0:I.map(function(l){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z.Item,{label:"\u5E73\u53F0",children:l.platformName}),(0,r.jsx)(s.Z.Item,{label:"\u4F18\u60E0\u5238",children:l.name}),(0,r.jsx)(s.Z.Item,{label:"\u4F18\u60E0\u91D1\u989D",children:l.amount})]})})}),(0,r.jsx)(s.Z,{column:5,title:"\u62B5\u6263\u5238",children:(g=p)===null||g===void 0||(Z=g.goodsCoupons)===null||Z===void 0?void 0:Z.map(function(l){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z.Item,{label:"\u5E73\u53F0",children:l.platformName}),(0,r.jsx)(s.Z.Item,{label:"\u62B5\u6263\u5238",children:l.name}),(0,r.jsx)(s.Z.Item,{label:"\u5546\u54C1",children:l.goodsName}),(0,r.jsx)(s.Z.Item,{label:"\u5546\u54C1\u539F\u4EF7",children:l.goodsAmount}),(0,r.jsx)(s.Z.Item,{label:"\u5E73\u53F0\u552E\u4EF7",children:l.platformAmount})]})})})]})},q=X,_=["defaultRender"],xe=null,ee=function(){var e=(0,x.useState)(),y=(0,S.Z)(e,2),I=y[0],g=y[1],Z=(0,x.useState)(!1),R=(0,S.Z)(Z,2),L=R[0],b=R[1],M=(0,x.useState)([]),P=(0,S.Z)(M,2),O=P[0],l=P[1],D=(0,x.useState)([]),d=(0,S.Z)(D,2),re=d[0],k=d[1],ae=(0,x.useRef)(),ne=(0,x.useState)([]),A=(0,S.Z)(ne,2),G=A[0],oe=A[1];(0,x.useEffect)(function(){function u(){v.srdList().then(function(a){var n=a.data;n==null||n.forEach(function(o){o.value=o.id,o.label=o.name}),l(n)})}u()},[]);function ve(){v.GetFlowExport(G).then(function(u){var a=URL.createObjectURL(new Blob([u])),n="\u8BA2\u5355\u6D41\u6C34.xlsx",o=document.createElement("a");o.href=a,o.download=n,o.click(),URL.revokeObjectURL(a)})}var de=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u8BA2\u5355\u65F6\u95F4",dataIndex:"order_CreateTime",valueType:"dateRange",hideInTable:!0,search:{transform:function(a){return{order_CreateTime:a[0],order_EndTime:a[1]}}}},{title:"\u624B\u673A\u53F7",dataIndex:"Customer_Tel",hideInTable:!0},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeId",hideInTable:!0,valueType:"select",renderFormItem:function(){return(0,r.jsx)($.Z,{mode:"multiple",showArrow:!0,optionFilterProp:"label",placeholder:"\u8BF7\u9009\u62E9\u5E97\u94FA",style:{width:"100%"},options:O})}},{title:"\u4EA4\u6613\u5355\u53F7",dataIndex:"order_Number",hideInSearch:!0},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeName",hideInSearch:!0},{title:"\u5E94\u4ED8\u91D1\u989D",dataIndex:"order_OriginalMoney",renderText:function(a){return"".concat(a,"\xA5")},hideInSearch:!0},{title:"\u5B9E\u4ED8\u91D1\u989D",dataIndex:"order_RealMoney",hideInSearch:!0,renderText:function(a){return"".concat(a,"\xA5")}},{title:"\u5E94\u4ED8\u91D1\u989D(\u9000)",dataIndex:"refundOriginalMoney",renderText:function(a){return"".concat(a,"\xA5")},hideInSearch:!0},{title:"\u5B9E\u4ED8\u91D1\u989D(\u9000)",dataIndex:"refundRealMoney",hideInSearch:!0,renderText:function(a){return"".concat(a,"\xA5")}},{title:"\u6570\u91CF",dataIndex:"order_Count",hideInSearch:!0},{title:"\u652F\u4ED8\u7C7B\u578B",dataIndex:"payMode",valueEnum:{0:{text:"\u5FAE\u4FE1\u652F\u4ED8"},1:{text:"\u652F\u4ED8\u5B9D"},2:{text:"\u4F59\u989D"},3:{text:"\u94F6\u8054"},4:{text:"\u73B0\u91D1"}}},{title:"\u521B\u5EFA\u65F6\u95F4",sorter:!0,dataIndex:"order_CreateTime",valueType:"dateTime",hideInSearch:!0,renderFormItem:function(a,n,o){var T=n.defaultRender,c=(0,V.Z)(n,_),C=o.getFieldValue("status");return"".concat(C)==="0"?!1:"".concat(C)==="3"?(0,r.jsx)(Y.Z,(0,w.Z)((0,w.Z)({},c),{},{placeholder:"\u8BF7\u8F93\u5165\u5F02\u5E38\u539F\u56E0\uFF01"})):T(a)}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(a,n){return[(0,r.jsx)("a",{onClick:function(){g(n),b(!0)},children:"\u67E5\u770B\u8BE6\u60C5"},"config"),(0,r.jsx)("a",{onClick:function(){v.printsmallticket({orderId:n.id}).then(function(T){T.data?F.default.success("\u6253\u5370\u6210\u529F"):F.default.error("\u6253\u5370\u5931\u8D25")})},children:"\u6253\u5370\u5C0F\u7968"},"config")]}}],le=function(){var u=(0,j.Z)((0,h.Z)().mark(function a(){var n,o,T,c,C,m;return(0,h.Z)().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,v.GetFlowExport(G);case 2:n=E.sent,n.isSuccess?(o={},T=new Date,c="\u8BA2\u5355\u6D41\u6C34"+T.toLocaleString().replaceAll("/","-"),o.fileName=c,C=["storeTypeName","storeName","order_Number","order_OriginalMoney","order_RealMoney","refundOriginalMoney","refundRealMoney","order_Count","order_CreateTime"],o.datas=[{sheetData:n.data,sheetName:c,sheetFilter:C,sheetHeader:["\u5E97\u94FA\u5206\u7C7B","\u5E97\u94FA\u540D\u79F0","\u4EA4\u6613\u5355\u53F7","\u5E94\u4ED8\u91D1\u989D","\u5B9E\u4ED8\u91D1\u989D","\u5E94\u4ED8\u91D1\u989D(\u9000)","\u5B9E\u4ED8\u91D1\u989D(\u9000)","\u5B50\u8BA2\u5355\u6570\u91CF","\u521B\u5EFA\u65F6\u95F4"]}],m=new(z())(o),m.saveExcel()):F.default.error(n.errors||"\u5BFC\u51FA\u5931\u8D25");case 4:case"end":return E.stop()}},a)}));return function(){return u.apply(this,arguments)}}();return(0,r.jsxs)(H.ZP,{children:[(0,r.jsx)(B.ZP,{headerTitle:"\u8BA2\u5355\u6D41\u6C34",actionRef:ae,rowKey:"orderFlowId",search:{labelWidth:120},toolBarRender:function(){return[(0,r.jsxs)(W.Z,{type:"primary",onClick:le,children:[(0,r.jsx)(U.Z,{})," \u5BFC\u51FA"]},"create")]},columns:de,request:function(){var u=(0,j.Z)((0,h.Z)().mark(function a(n,o,T){var c;return(0,h.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return n.storeTypeId!=null&&(n.storeTypeId=srdTypeList[n.storeTypeId].storeTypeId),m.next=3,v.orderList(n);case 3:return c=m.sent,oe(n),k(c.data.data),m.abrupt("return",{data:c.data.data,success:!0,total:c.data.total});case 7:case"end":return m.stop()}},a)}));return function(a,n,o){return u.apply(this,arguments)}}()}),!!I&&(0,r.jsx)(q,{onCancel:function(){g(void 0),b(!1)},createModalVisible:L,values:I||{}})]})},te=ee}}]);