|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9487],{56765:function(oe,w,e){"use strict";e.r(w),e.d(w,{default:function(){return ee}});var B=e(11849),le=e(47673),Y=e(4107),V=e(93224),ue=e(43358),$=e(34041),T=e(2824),m=e(39428),se=e(34792),D=e(48086),E=e(3182),h=e(67294),U=e(28790),A=e(16894),z=e(53667),H=e.n(z),v=e(48971),L=e(96690),y={orderList:function(t){return t.isreport=!0,(0,v.WY)((0,L.vp)()+"/api/Order/PostDetail",{method:"Post",data:t})},srdList:function(t){return(0,v.WY)((0,L.zr)()+"/api/shop/alllist",{method:"GET"})},GetOrderDetails:function(t){return(0,v.WY)((0,L.vp)()+"/api/Order/GetFlowExport",{method:"Post",data:t})},srdTypeList:function(t){return(0,v.WY)("/kitchen/api/storetype/list",{method:"Post",data:t})},goodsList:function(t){return(0,v.WY)("/kitchen/api/goodes/list",{method:"Post",data:t})},goodsTypeList:function(t){return(0,v.WY)("/kitchen/api/goodstype/list",{method:"Post",data:t})},StartRefund:function(t){return(0,v.WY)("/kitchen/api/refund/StartOrderRefund",{method:"Post",params:t})},printsmallticket:function(t){return(0,v.WY)("/kitchen/api/printer/print-small-ticket",{method:"Post",data:t})}},ie=e(71194),K=e(50146),ce=e(98858),s=e(4914),J=e(12826),r=e(85893),p={},Q=function(t){var x,I,g,S,b=t.createModalVisible,P=t.onCancel,j=(0,h.useState)([]),R=(0,T.Z)(j,2),O=R[0],N=R[1];return(0,r.jsxs)(K.Z,{title:"\u8BA2\u5355\u8BE6\u60C5",width:1e3,visible:t.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,destroyOnClose:!0,onCancel:function(){return P()},maskClosable:!1,children:[(0,r.jsx)(J.ZP,{title:"\u8BA2\u5355\u4FE1\u606F",request:(0,E.Z)((0,m.Z)().mark(function l(){return(0,m.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,y.GetOrderDetails({id:t.values.id});case 2:return p=d.sent,N(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)(A.ZP,{rowKey:"id",request:(0,E.Z)((0,m.Z)().mark(function l(){return(0,m.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,y.GetOrderDetails({id:t.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(M,d){return[(0,r.jsx)("a",{onClick:function(){y.printsmallticket({orderId:t.values.id,subOrderId:d.id}).then(function(k){debugger;k.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:(x=p)===null||x===void 0||(I=x.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})]})})})]})},X=Q,q=["defaultRender"],fe=null,_=function(){var t=(0,h.useState)(),x=(0,T.Z)(t,2),I=x[0],g=x[1],S=(0,h.useState)(!1),b=(0,T.Z)(S,2),P=b[0],j=b[1],R=(0,h.useState)([]),O=(0,T.Z)(R,2),N=O[0],l=O[1],M=(0,h.useState)([]),d=(0,T.Z)(M,2),te=d[0],k=d[1],re=(0,h.useRef)(),ae=(0,h.useState)([]),W=(0,T.Z)(ae,2),G=W[0],ne=W[1];(0,h.useEffect)(function(){function u(){y.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 me(){y.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:N})}},{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 C=n.defaultRender,c=(0,V.Z)(n,q),Z=o.getFieldValue("status");return"".concat(Z)==="0"?!1:"".concat(Z)==="3"?(0,r.jsx)(Y.Z,(0,B.Z)((0,B.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")]}}],he=function(){var u=(0,E.Z)((0,m.Z)().mark(function a(){var n,o,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(G);case 2:n=F.sent,n.isSuccess?(o={},C=new Date,c="\u8BA2\u5355\u6D41\u6C34"+C.toLocaleString().replaceAll("/","-"),o.fileName=c,Z=["storeTypeName","storeName","order_Number","order_OriginalMoney","order_RealMoney","refundOriginalMoney","refundRealMoney","order_Count","order_CreateTime"],o.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())(o),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)(U.ZP,{header:{title:"",breadcrumb:{}},children:[(0,r.jsx)(A.ZP,{headerTitle:"\u8BA2\u5355\u6D41\u6C34",actionRef:re,rowKey:"orderFlowId",search:{labelWidth:120},toolBarRender:function(){return[]},columns:de,request:function(){var u=(0,E.Z)((0,m.Z)().mark(function a(n,o,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,ne(n),k(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,o){return u.apply(this,arguments)}}()}),!!I&&(0,r.jsx)(X,{onCancel:function(){g(void 0),j(!1)},createModalVisible:P,values:I||{}})]})},ee=_}}]);
|