|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9487],{56765:function(oe,k,t){"use strict";t.r(k),t.d(k,{default:function(){return _}});var w=t(11849),de=t(47673),G=t(4107),Y=t(93224),le=t(43358),V=t(34041),T=t(2824),m=t(39428),ue=t(34792),D=t(48086),E=t(3182),h=t(67294),$=t(28790),B=t(16894),U=t(53667),H=t.n(U),x=t(48971),y={orderList:function(e){return e.isreport=!0,(0,x.WY)("/groupmealorder/api/Order/PostDetail",{method:"Post",data:e})},srdList:function(e){return(0,x.WY)("/groupmeal/api/shop/alllist",{method:"GET"})},GetOrderDetails:function(e){return(0,x.WY)("/groupmealorder/api/Order/GetFlowExport",{method:"Post",data:e})},srdTypeList:function(e){return(0,x.WY)("/kitchen/api/storetype/list",{method:"Post",data:e})},goodsList:function(e){return(0,x.WY)("/kitchen/api/goodes/list",{method:"Post",data:e})},goodsTypeList:function(e){return(0,x.WY)("/kitchen/api/goodstype/list",{method:"Post",data:e})},StartRefund:function(e){return(0,x.WY)("/kitchen/api/refund/StartOrderRefund",{method:"Post",params:e})},printsmallticket:function(e){return(0,x.WY)("/kitchen/api/printer/print-small-ticket",{method:"Post",data:e})}},se=t(71194),K=t(50146),ie=t(98858),s=t(4914),z=t(12826),r=t(85893),p={},J=function(e){var v,I,g,S,b=e.createModalVisible,L=e.onCancel,j=(0,h.useState)([]),R=(0,T.Z)(j,2),P=R[0],O=R[1];return(0,r.jsxs)(K.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)(z.ZP,{title:"\u8BA2\u5355\u4FE1\u606F",request:(0,E.Z)((0,m.Z)().mark(function l(){return(0,m.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,y.GetOrderDetails({id:e.values.id});case 2:return p=o.sent,O(p),o.abrupt("return",Promise.resolve({success:!0,data:p}));case 5:case"end":return o.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,E.Z)((0,m.Z)().mark(function l(){return(0,m.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,y.GetOrderDetails({id:e.values.id});case 2:return p=o.sent,o.abrupt("return",{data:p.detailList,success:!0});case 4:case"end":return o.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(M,o){return[(0,r.jsx)("a",{onClick:function(){y.printsmallticket({orderId:e.values.id,subOrderId:o.id}).then(function(N){debugger;N.data?D.default.success("\u6253\u5370\u6210\u529F"):D.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:(v=p)===null||v===void 0||(I=v.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||(S=g.goodsCoupons)===null||S===void 0?void 0:S.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=J,X=["defaultRender"],ce=null,q=function(){var e=(0,h.useState)(),v=(0,T.Z)(e,2),I=v[0],g=v[1],S=(0,h.useState)(!1),b=(0,T.Z)(S,2),L=b[0],j=b[1],R=(0,h.useState)([]),P=(0,T.Z)(R,2),O=P[0],l=P[1],M=(0,h.useState)([]),o=(0,T.Z)(M,2),ee=o[0],N=o[1],te=(0,h.useRef)(),re=(0,h.useState)([]),A=(0,T.Z)(re,2),W=A[0],ae=A[1];(0,h.useEffect)(function(){function u(){y.srdList().then(function(a){var n=a.data;n==null||n.forEach(function(d){d.value=d.id,d.label=d.name}),l(n)})}u()},[]);function fe(){y.GetFlowExport(W).then(function(u){var a=URL.createObjectURL(new Blob([u])),n="\u8BA2\u5355\u6D41\u6C34.xlsx",d=document.createElement("a");d.href=a,d.download=n,d.click(),URL.revokeObjectURL(a)})}var ne=[{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)(V.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,d){var C=n.defaultRender,c=(0,Y.Z)(n,X),Z=d.getFieldValue("status");return"".concat(Z)==="0"?!1:"".concat(Z)==="3"?(0,r.jsx)(G.Z,(0,w.Z)((0,w.Z)({},c),{},{placeholder:"\u8BF7\u8F93\u5165\u5F02\u5E38\u539F\u56E0\uFF01"})):C(a)}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(a,n){return[(0,r.jsx)("a",{onClick:function(){g(n),j(!0)},children:"\u67E5\u770B\u8BE6\u60C5"},"config")]}}],me=function(){var u=(0,E.Z)((0,m.Z)().mark(function a(){var n,d,C,c,Z,f;return(0,m.Z)().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.next=2,y.GetFlowExport(W);case 2:n=F.sent,n.isSuccess?(d={},C=new Date,c="\u8BA2\u5355\u6D41\u6C34"+C.toLocaleString().replaceAll("/","-"),d.fileName=c,Z=["storeTypeName","storeName","order_Number","order_OriginalMoney","order_RealMoney","refundOriginalMoney","refundRealMoney","order_Count","order_CreateTime"],d.datas=[{sheetData:n.data,sheetName:c,sheetFilter:Z,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"]}],f=new(H())(d),f.saveExcel()):D.default.error(n.errors||"\u5BFC\u51FA\u5931\u8D25");case 4:case"end":return F.stop()}},a)}));return function(){return u.apply(this,arguments)}}();return(0,r.jsxs)($.ZP,{header:{title:"",breadcrumb:{}},children:[(0,r.jsx)(B.ZP,{headerTitle:"\u8BA2\u5355\u6D41\u6C34",actionRef:te,rowKey:"orderFlowId",search:{labelWidth:120},toolBarRender:function(){return[]},columns:ne,request:function(){var u=(0,E.Z)((0,m.Z)().mark(function a(n,d,C){var c;return(0,m.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return n.storeTypeId!=null&&(n.storeTypeId=srdTypeList[n.storeTypeId].storeTypeId),f.next=3,y.orderList(n);case 3:return c=f.sent,ae(n),N(c.data.data),f.abrupt("return",{data:c.data.data,success:!0,total:c.data.total});case 7:case"end":return f.stop()}},a)}));return function(a,n,d){return u.apply(this,arguments)}}()}),!!I&&(0,r.jsx)(Q,{onCancel:function(){g(void 0),j(!1)},createModalVisible:L,values:I||{}})]})},_=q}}]);
|