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