Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

p__order__order-flow-manage.450f4e5b.async.js 8.7 KiB

1 år sedan
1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6287],{16450:function(de,M,t){"use strict";t.r(M),t.d(M,{default:function(){return J}});var ie=t(57663),j=t(71577),L=t(11849),le=t(47673),w=t(4107),N=t(93224),se=t(43358),G=t(34041),x=t(2824),m=t(39428),ue=t(34792),I=t(48086),Z=t(3182),W=t(90631),y=t(67294),A=t(78009),P=t(16894),B=t(53667),Y=t.n(B),u=t(48971),h={orderList:function(e){return e.isreport=!0,(0,u.WY)("/kitchen/api/order/order-detail-flow",{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/GetFlowExport",{method:"Post",data:e})},printsmallticket:function(e){return(0,u.WY)("/kitchen/api/printer/print-small-ticket",{method:"Post",data:e})}},ce=t(71194),V=t(50146),$=t(12826),i=t(85893),R={},U=function(e){var T=e.createModalVisible,g=e.onCancel;return(0,i.jsxs)(V.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,i.jsx)($.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,h.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,i.jsx)(P.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,h.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(S,n){return[(0,i.jsx)("a",{onClick:function(){h.printsmallticket({orderId:e.values.id,subOrderId:n.id}).then(function(F){debugger;F.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})]})},H=U,K=["defaultRender"],fe=null,z=function(){var e=(0,y.useState)(),T=(0,x.Z)(e,2),g=T[0],c=T[1],S=(0,y.useState)(!1),n=(0,x.Z)(S,2),k=n[0],F=n[1],Q=(0,y.useState)([]),E=(0,x.Z)(Q,2),X=E[0],q=E[1],_=(0,y.useState)([]),O=(0,x.Z)(_,2),me=O[0],ee=O[1],te=(0,y.useRef)(),re=(0,y.useState)([]),b=(0,x.Z)(re,2),D=b[0],ae=b[1];(0,y.useEffect)(function(){function d(){h.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(){h.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:"dateRange",hideInTable:!0,search:{transform:function(r){return{order_CreateTime:r[0],order_EndTime:r[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,i.jsx)(G.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 v=a.defaultRender,s=(0,N.Z)(a,K),p=o.getFieldValue("status");return"".concat(p)==="0"?!1:"".concat(p)==="3"?(0,i.jsx)(w.Z,(0,L.Z)((0,L.Z)({},s),{},{placeholder:"\u8BF7\u8F93\u5165\u5F02\u5E38\u539F\u56E0\uFF01"})):v(r)}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(r,a){return[(0,i.jsx)("a",{onClick:function(){c(a),F(!0)},children:"\u67E5\u770B\u8BE6\u60C5"},"config"),(0,i.jsx)("a",{onClick:function(){h.printsmallticket({orderId:a.id}).then(function(v){v.data?I.default.success("\u6253\u5370\u6210\u529F"):I.default.error("\u6253\u5370\u5931\u8D25")})},children:"\u6253\u5370\u5C0F\u7968"},"config")]}}],oe=function(){var d=(0,Z.Z)((0,m.Z)().mark(function r(){var a,o,v,s,p,f;return(0,m.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,h.GetFlowExport(D);case 2:a=C.sent,a.isSuccess?(o={},v=new Date,s="\u8BA2\u5355\u6D41\u6C34"+v.toLocaleString().replaceAll("/","-"),o.fileName=s,p=["storeTypeName","storeName","order_Number","order_OriginalMoney","order_RealMoney","refundOriginalMoney","refundRealMoney","order_Count","order_CreateTime"],o.datas=[{sheetData:a.data,sheetName:s,sheetFilter:p,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(Y())(o),f.saveExcel()):I.default.error(a.errors||"\u5BFC\u51FA\u5931\u8D25");case 4:case"end":return C.stop()}},r)}));return function(){return d.apply(this,arguments)}}();return(0,i.jsxs)(A.ZP,{children:[(0,i.jsx)(P.ZP,{headerTitle:"\u8BA2\u5355\u6D41\u6C34",actionRef:te,rowKey:"orderFlowId",search:{labelWidth:120},toolBarRender:function(){return[(0,i.jsxs)(j.Z,{type:"primary",onClick:oe,children:[(0,i.jsx)(W.Z,{})," \u5BFC\u51FA"]},"create")]},columns:ne,request:function(){var d=(0,Z.Z)((0,m.Z)().mark(function r(a,o,v){var s;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,h.orderList(a);case 3:return s=f.sent,ae(a),ee(s.data.data),f.abrupt("return",{data:s.data.data,success:!0,total:s.data.total});case 7:case"end":return f.stop()}},r)}));return function(r,a,o){return d.apply(this,arguments)}}()}),!!g&&(0,i.jsx)(H,{onCancel:function(){c(void 0),F(!1)},createModalVisible:k,values:g||{}})]})},J=z}}]);