|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2369],{26177:function(Y,T,e){"use strict";var h=e(71194),m=e(50146),r=e(98858),p=e(4914),R=e(34792),O=e(48086),j=e(3182),Z=e(2824),B=e(94043),C=e.n(B),b=e(67294),x=e(16894),A=e(12826),_=e(46389),a=e(85893),l={},K=function(P){var M,c,I,L,v=P.createModalVisible,k=P.onCancel,U=(0,b.useState)([]),f=(0,Z.Z)(U,2),n=f[0],W=f[1];return(0,a.jsxs)(m.Z,{title:"\u8BA2\u5355\u8BE6\u60C5",width:1e3,visible:P.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,destroyOnClose:!0,onCancel:function(){return k()},maskClosable:!1,children:[(0,a.jsx)(A.ZP,{title:"\u8BA2\u5355\u4FE1\u606F",request:(0,j.Z)(C().mark(function d(){return C().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,_.Z.GetOrderDetails({id:P.values.id});case 2:return l=i.sent,W(l),i.abrupt("return",Promise.resolve({success:!0,data:l}));case 5:case"end":return i.stop()}},d)})),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)("h3",{style:{fontWeight:"bold",fontSize:16,marginTop:30},children:"\u5546\u54C1\u5217\u8868"}),(0,a.jsx)(x.ZP,{rowKey:"id",request:(0,j.Z)(C().mark(function d(){return C().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,_.Z.GetOrderDetails({id:P.values.id});case 2:return l=i.sent,i.abrupt("return",{data:l.detailList,success:!0});case 4:case"end":return i.stop()}},d)})),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,i){return[(0,a.jsx)("a",{onClick:function(){_.Z.printsmallticket({orderId:P.values.id,subOrderId:i.id}).then(function(G){debugger;G.data?O.default.success("\u6253\u5370\u6210\u529F"):O.default.error("\u6253\u5370\u5931\u8D25")})},children:"\u6253\u5370\u5C0F\u7968"},"config")]}}],toolBarRender:!1,search:!1}),(0,a.jsx)(p.Z,{title:"\u4F18\u60E0\u5238",children:(M=l)===null||M===void 0||(c=M.paperCoupons)===null||c===void 0?void 0:c.map(function(d){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Z.Item,{label:"\u5E73\u53F0",children:d.platformName}),(0,a.jsx)(p.Z.Item,{label:"\u4F18\u60E0\u5238",children:d.name}),(0,a.jsx)(p.Z.Item,{label:"\u4F18\u60E0\u91D1\u989D",children:d.amount})]})})}),(0,a.jsx)(p.Z,{column:5,title:"\u62B5\u6263\u5238",children:(I=l)===null||I===void 0||(L=I.goodsCoupons)===null||L===void 0?void 0:L.map(function(d){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Z.Item,{label:"\u5E73\u53F0",children:d.platformName}),(0,a.jsx)(p.Z.Item,{label:"\u62B5\u6263\u5238",children:d.name}),(0,a.jsx)(p.Z.Item,{label:"\u5546\u54C1",children:d.goodsName}),(0,a.jsx)(p.Z.Item,{label:"\u5546\u54C1\u539F\u4EF7",children:d.goodsAmount}),(0,a.jsx)(p.Z.Item,{label:"\u5E73\u53F0\u552E\u4EF7",children:d.platformAmount})]})})})]})};T.Z=K},46389:function(Y,T,e){"use strict";var h=e(48971);T.Z={orderList:function(r){return r.isreport=!0,(0,h.WY)("/kitchen/api/order/order-detail-flow",{method:"Post",data:r})},srdTypeList:function(r){return(0,h.WY)("/kitchen/api/storetype/list",{method:"Post",data:r})},srdList:function(r){return(0,h.WY)("/kitchen/api/store/list",{method:"Post",data:r})},goodsList:function(r){return(0,h.WY)("/kitchen/api/goodes/list",{method:"Post",data:r})},goodsTypeList:function(r){return(0,h.WY)("/kitchen/api/goodstype/list",{method:"Post",data:r})},StartRefund:function(r){return(0,h.WY)("/kitchen/api/refund/StartOrderRefund",{method:"Post",params:r})},GetOrderDetails:function(r){return(0,h.WY)("/kitchen/api/Order/GetOrderDetails",{method:"Post",params:r})},GetFlowExport:function(r){return(0,h.WY)("/kitchen/api/Order/GetFlowExport",{method:"Post",data:r})},printsmallticket:function(r){return(0,h.WY)("/kitchen/api/printer/print-small-ticket",{method:"Post",data:r})}}},65585:function(Y,T,e){"use strict";e.r(T),e.d(T,{default:function(){return U}});var h=e(57663),m=e(71577),r=e(3182),p=e(34792),R=e(48086),O=e(11849),j=e(47673),Z=e(4107),B=e(93224),C=e(43358),b=e(34041),x=e(2824),A=e(94043),_=e.n(A),a=e(90631),l=e(67294),K=e(78009),V=e(16894),P=e(53667),M=e.n(P),c=e(48971),I={orderList:function(n){return n.isreport=!0,(0,c.WY)("/kitchen/api/order/psot-unpaid-order",{method:"Post",data:n})},srdTypeList:function(n){return(0,c.WY)("/kitchen/api/storetype/list",{method:"Post",data:n})},srdList:function(n){return(0,c.WY)("/kitchen/api/store/list",{method:"Post",data:n})},goodsList:function(n){return(0,c.WY)("/kitchen/api/goodes/list",{method:"Post",data:n})},goodsTypeList:function(n){return(0,c.WY)("/kitchen/api/goodstype/list",{method:"Post",data:n})},StartRefund:function(n){return(0,c.WY)("/kitchen/api/refund/StartOrderRefund",{method:"Post",params:n})},GetOrderDetails:function(n){return(0,c.WY)("/kitchen/api/Order/GetOrderDetails",{method:"Post",params:n})},GetFlowExport:function(n){return(0,c.WY)("/kitchen/api/Order/GetFlowExport",{method:"Post",data:n})},printsmallticket:function(n){return(0,c.WY)("/kitchen/api/printer/print-small-ticket",{method:"Post",data:n})}},L=e(26177),v=e(85893),k=function(){var n=(0,l.useState)(),W=(0,x.Z)(n,2),d=W[0],S=W[1],i=(0,l.useState)(!1),N=(0,x.Z)(i,2),G=N[0],w=N[1],Q=(0,l.useState)([]),$=(0,x.Z)(Q,2),X=$[0],q=$[1],ee=(0,l.useState)([]),H=(0,x.Z)(ee,2),se=H[0],te=H[1],re=(0,l.useRef)(),ae=(0,l.useState)([]),z=(0,x.Z)(ae,2),J=z[0],ne=z[1];(0,l.useEffect)(function(){function u(){I.srdList().then(function(s){var t=s.data;console.log(t),t==null||t.forEach(function(o){o.value=o.id,o.label=o.name}),q(t)})}u()},[]);function ie(){I.GetFlowExport(J).then(function(u){var s=URL.createObjectURL(new Blob([u])),t="\u8BA2\u5355\u6D41\u6C34.xlsx",o=document.createElement("a");o.href=s,o.download=t,o.click(),URL.revokeObjectURL(s)})}var oe=[{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(s){return{order_CreateTime:s[0],order_EndTime:s[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,v.jsx)(b.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(s){return"".concat(s,"\xA5")},hideInSearch:!0},{title:"\u6570\u91CF",dataIndex:"order_Count",hideInSearch:!0},{title:"\u521B\u5EFA\u65F6\u95F4",sorter:!0,dataIndex:"order_CreateTime",valueType:"dateTime",hideInSearch:!0,renderFormItem:function(s,t,o){var D=t.defaultRender,y=(0,B.Z)(t,["defaultRender"]),g=o.getFieldValue("status");return"".concat(g)==="0"?!1:"".concat(g)==="3"?(0,v.jsx)(Z.Z,(0,O.Z)((0,O.Z)({},y),{},{placeholder:"\u8BF7\u8F93\u5165\u5F02\u5E38\u539F\u56E0\uFF01"})):D(s)}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(s,t){return[(0,v.jsx)("a",{onClick:function(){S(t),w(!0)},children:"\u67E5\u770B\u8BE6\u60C5"},"config"),(0,v.jsx)("a",{onClick:function(){I.printsmallticket({orderId:t.id}).then(function(D){D.data?R.default.success("\u6253\u5370\u6210\u529F"):R.default.error("\u6253\u5370\u5931\u8D25")})},children:"\u6253\u5370\u5C0F\u7968"},"config")]}}],de=function(){var u=(0,r.Z)(_().mark(function s(){var t,o,D,y,g,E;return _().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.next=2,I.GetFlowExport(J);case 2:t=F.sent,t.isSuccess?(o={},D=new Date,y="\u8BA2\u5355\u6D41\u6C34"+D.toLocaleString().replaceAll("/","-"),o.fileName=y,g=["storeTypeName","storeName","order_Number","order_OriginalMoney","order_RealMoney","refundOriginalMoney","refundRealMoney","order_Count","order_CreateTime"],o.datas=[{sheetData:t.data,sheetName:y,sheetFilter:g,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"]}],E=new(M())(o),E.saveExcel()):R.default.error(t.errors||"\u5BFC\u51FA\u5931\u8D25");case 4:case"end":return F.stop()}},s)}));return function(){return u.apply(this,arguments)}}();return(0,v.jsxs)(K.ZP,{children:[(0,v.jsx)(V.ZP,{headerTitle:"\u8BA2\u5355\u6D41\u6C34",actionRef:re,rowKey:"orderFlowId",search:{labelWidth:120},toolBarRender:function(){return[(0,v.jsxs)(m.Z,{type:"primary",onClick:de,children:[(0,v.jsx)(a.Z,{})," \u5BFC\u51FA"]},"create")]},columns:oe,request:function(){var u=(0,r.Z)(_().mark(function s(t,o,D){var y;return _().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return t.storeTypeId!=null&&(t.storeTypeId=srdTypeList[t.storeTypeId].storeTypeId),t.orderStatus=0,E.next=4,I.orderList(t);case 4:return y=E.sent,ne(t),te(y.data.data),E.abrupt("return",{data:y.data.data,success:!0,total:y.data.total});case 8:case"end":return E.stop()}},s)}));return function(s,t,o){return u.apply(this,arguments)}}()}),!!d&&(0,v.jsx)(L.Z,{onCancel:function(){S(void 0),w(!1)},createModalVisible:G,values:d||{}})]})},U=k}}]);
|