|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6287],{16450:function(le,O,r){"use strict";r.r(O),r.d(O,{default:function(){return X}});var ce=r(57663),w=r(71577),j=r(11849),fe=r(47673),A=r(4107),G=r(93224),he=r(43358),Z=r(34041),v=r(2824),p=r(39428),me=r(34792),I=r(48086),F=r(3182),W=r(90631),x=r(67294),Y=r(78009),D=r(53779),V=r(53667),$=r.n(V),h=r(48971),c={orderList:function(e){return e.isreport=!0,(0,h.WY)("/kitchen/api/order/order-detail-flow",{method:"Post",data:e})},srdTypeList:function(e){return(0,h.WY)("/kitchen/api/storetype/list",{method:"Post",data:e})},srdList:function(e){return(0,h.WY)("/kitchen/api/store/list",{method:"Post",data:e})},goodsList:function(e){return(0,h.WY)("/kitchen/api/goodes/list",{method:"Post",data:e})},goodsTypeList:function(e){return(0,h.WY)("/kitchen/api/goodstype/list",{method:"Post",data:e})},StartRefund:function(e){return(0,h.WY)("/kitchen/api/refund/StartOrderRefund",{method:"Post",params:e})},GetOrderDetails:function(e){return(0,h.WY)("/kitchen/api/Order/GetOrderDetails",{method:"Post",params:e})},GetFlowExport:function(e){return(0,h.WY)("/kitchen/api/Order/GetFlowExport",{method:"Post",data:e})},printsmallticket:function(e){return(0,h.WY)("/kitchen/api/printer/print-small-ticket",{method:"Post",data:e})}},ye=r(71194),U=r(50146),H=r(12826),a=r(85893),E={},K=function(e){var T=e.createModalVisible,g=e.onCancel;return(0,a.jsxs)(U.Z,{title:"\u8BA2\u5355\u8BE6\u60C5",width:1e3,visible:e.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,destroyOnClose:!0,onCancel:function(){return g()},maskClosable:!1,children:[(0,a.jsx)(H.ZP,{request:(0,F.Z)((0,p.Z)().mark(function m(){return(0,p.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,c.GetOrderDetails({id:e.values.id});case 2:return E=u.sent,u.abrupt("return",Promise.resolve({success:!0,data:E}));case 4:case"end":return u.stop()}},m)})),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"}]}),(0,a.jsx)(D.ZP,{rowKey:"id",request:(0,F.Z)((0,p.Z)().mark(function m(){return(0,p.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,c.GetOrderDetails({id:e.values.id});case 2:return E=u.sent,u.abrupt("return",{data:E.detailList,success:!0});case 4:case"end":return u.stop()}},m)})),columns:[{title:"\u5E97\u94FA\u5206\u7C7B",key:"storeTypeName",dataIndex:"storeTypeName"},{title:"\u5E97\u94FA\u540D\u79F0",key:"storeName",dataIndex:"storeName"},{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:"\u5B50\u8BA2\u5355\u72B6\u6001",dataIndex:"cookingStatus",key:"cookingStatus",hideInSearch:!0,valueEnum:{0:{text:"\u7B49\u5F85\u5236\u4F5C",status:"Success"},1:{text:"\u5236\u4F5C\u4E2D",status:"Success"},2:{text:"\u7B49\u5F85\u53D6\u9910",status:"Success"},3:{text:"\u53D6\u9910\u5B8C\u6210",status:"Processing"},99998:{text:"\u6B63\u5E38\u8BA2\u5355",status:"Default"},99999:{text:"\u5F02\u5E38\u8BA2\u5355",status:"Default"}}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(S,u){return[(0,a.jsx)("a",{onClick:function(){c.printsmallticket({orderId:e.values.id,subOrderId:u.id}).then(function(L){debugger;L.data?I.default.success("\u6253\u5370\u6210\u529F"):I.default.error("\u6253\u5370\u5931\u8D25")})},children:"\u6253\u5370\u5C0F\u7968"},"config")]}}],toolBarRender:!1,search:!1})]})},z=K,J=["defaultRender"],pe=null,Q=function(){var e=(0,x.useState)(),T=(0,v.Z)(e,2),g=T[0],m=T[1],S=(0,x.useState)(!1),u=(0,v.Z)(S,2),R=u[0],L=u[1],q=(0,x.useState)([]),k=(0,v.Z)(q,2),M=k[0],_=k[1],ee=(0,x.useState)([]),B=(0,v.Z)(ee,2),te=B[0],re=B[1],ae=(0,x.useState)([]),P=(0,v.Z)(ae,2),xe=P[0],ne=P[1],oe=(0,x.useRef)(),de=(0,x.useState)([]),b=(0,v.Z)(de,2),N=b[0],ue=b[1];(0,x.useEffect)(function(){function i(){c.srdTypeList().then(function(l){var t=l.data;t==null||t.forEach(function(n){n.storeTypeId=n.id,n.text=n.name}),_(t)})}function o(){c.srdList().then(function(l){var t=l.data;t==null||t.forEach(function(n){n.value=n.id,n.label=n.name}),re(t)})}function d(){c.goodsList().then(function(l){var t=l.data;t.forEach(function(n){n.label=n.name,n.value=n.id}),console.log("\u83B7\u53D6\u4E0B\u62C9\u6570\u636E",t),setgoodList(t)})}function s(){c.goodsTypeList().then(function(l){var t=l.data;t.forEach(function(n){n.label=n.name,n.value=n.id}),setgoodsTypeList(t)})}o(),i()},[]);function ve(){c.GetFlowExport(N).then(function(i){var o=URL.createObjectURL(new Blob([i])),d="\u8BA2\u5355\u6D41\u6C34.xlsx",s=document.createElement("a");s.href=o,s.download=d,s.click(),URL.revokeObjectURL(o)})}var ie=[{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(o){return{order_CreateTime:o[0],order_EndTime:o[1]}}}},{title:"\u624B\u673A\u53F7",dataIndex:"Customer_Tel",hideInTable:!0},{title:"\u5E97\u94FA\u5206\u7C7B",dataIndex:"storeTypeId",hideInTable:!0,valueType:"select",valueEnum:M},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeId",hideInTable:!0,valueType:"select",renderFormItem:function(){return(0,a.jsx)(Z.Z,{mode:"multiple",showArrow:!0,optionFilterProp:"label",placeholder:"\u8BF7\u9009\u62E9\u5E97\u94FA",style:{width:"100%"},options:te})}},{title:"\u8BA2\u5355\u72B6\u6001",dataIndex:"status",hideInTable:!0,valueType:"select",renderFormItem:function(){return(0,a.jsxs)(Z.Z,{mode:"multiple",showArrow:!0,placeholder:"\u8BA2\u5355\u72B6\u6001",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:"\u4EA4\u6613\u5355\u53F7",dataIndex:"order_Number",hideInSearch:!0},{title:"\u5E97\u94FA\u5206\u7C7B",dataIndex:"storeTypeName",hideInSearch:!0},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"storeName",hideInSearch:!0},{title:"\u5E94\u4ED8\u91D1\u989D",dataIndex:"order_OriginalMoney",renderText:function(o){return"".concat(o,"\xA5")},hideInSearch:!0},{title:"\u5B9E\u4ED8\u91D1\u989D",dataIndex:"order_RealMoney",hideInSearch:!0,renderText:function(o){return"".concat(o,"\xA5")}},{title:"\u5E94\u4ED8\u91D1\u989D(\u9000)",dataIndex:"refundOriginalMoney",renderText:function(o){return"".concat(o,"\xA5")},hideInSearch:!0},{title:"\u5B9E\u4ED8\u91D1\u989D(\u9000)",dataIndex:"refundRealMoney",hideInSearch:!0,renderText:function(o){return"".concat(o,"\xA5")}},{title:"\u6570\u91CF",dataIndex:"order_Count",hideInSearch:!0},{title:"\u521B\u5EFA\u65F6\u95F4",sorter:!0,dataIndex:"order_CreateTime",valueType:"dateTime",hideInSearch:!0,renderFormItem:function(o,d,s){var l=d.defaultRender,t=(0,G.Z)(d,J),n=s.getFieldValue("status");return"".concat(n)==="0"?!1:"".concat(n)==="3"?(0,a.jsx)(A.Z,(0,j.Z)((0,j.Z)({},t),{},{placeholder:"\u8BF7\u8F93\u5165\u5F02\u5E38\u539F\u56E0\uFF01"})):l(o)}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(o,d){return[(0,a.jsx)("a",{onClick:function(){m(d),L(!0)},children:"\u67E5\u770B\u8BE6\u60C5"},"config"),(0,a.jsx)("a",{onClick:function(){c.printsmallticket({orderId:d.id}).then(function(l){l.data?I.default.success("\u6253\u5370\u6210\u529F"):I.default.error("\u6253\u5370\u5931\u8D25")})},children:"\u6253\u5370\u5C0F\u7968"},"config")]}}],se=function(){var i=(0,F.Z)((0,p.Z)().mark(function o(){var d,s,l,t,n,y;return(0,p.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,c.GetFlowExport(N);case 2:d=C.sent,d.isSuccess?(s={},l=new Date,t="\u8BA2\u5355\u6D41\u6C34"+l.toLocaleString().replaceAll("/","-"),s.fileName=t,n=["storeTypeName","storeName","order_Number","order_OriginalMoney","order_RealMoney","refundOriginalMoney","refundRealMoney","order_Count","order_CreateTime"],s.datas=[{sheetData:d.data,sheetName:t,sheetFilter:n,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"]}],y=new($())(s),y.saveExcel()):I.default.error(d.errors||"\u5BFC\u51FA\u5931\u8D25");case 4:case"end":return C.stop()}},o)}));return function(){return i.apply(this,arguments)}}();return(0,a.jsxs)(Y.ZP,{children:[(0,a.jsx)(D.ZP,{headerTitle:"\u8BA2\u5355\u6D41\u6C34",actionRef:oe,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,a.jsxs)(w.Z,{type:"primary",onClick:se,children:[(0,a.jsx)(W.Z,{})," \u5BFC\u51FA"]},"create")]},columns:ie,request:function(){var i=(0,F.Z)((0,p.Z)().mark(function o(d,s,l){var t;return(0,p.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return d.storeTypeId!=null&&(d.storeTypeId=M[d.storeTypeId].storeTypeId),y.next=3,c.orderList(d);case 3:return t=y.sent,ue(d),ne(t.data.data),y.abrupt("return",{data:t.data.data,success:!0,total:t.data.total});case 7:case"end":return y.stop()}},o)}));return function(o,d,s){return i.apply(this,arguments)}}()}),!!g&&(0,a.jsx)(z,{onCancel:function(){m(void 0),L(!1)},createModalVisible:R,values:g||{}})]})},X=Q}}]);
|