包含后厨 团餐 门店分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
5.8 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9487],{56765:function(re,b,t){"use strict";t.r(b),t.d(b,{default:function(){return H}});var C=t(11849),ne=t(47673),D=t(4107),G=t(93224),v=t(2824),S=t(39428),oe=t(34792),M=t(48086),F=t(3182),f=t(67294),W=t(28790),k=t(16894),Y=t(53667),B=t.n(Y),i=t(48971),R={orderList:function(e){return e.isreport=!0,(0,i.WY)("/kitchorder/api/Order/GetOrderPageList",{method:"Post",data:e})},srdList:function(e){return(0,i.WY)("/kitchbase/api/store/getstorelist",{method:"GET"})},GetFlowExport:function(e){return(0,i.WY)("/kitchorder/api/Order/GetFlowExport",{method:"Post",data:e})},srdTypeList:function(e){return(0,i.WY)("/kitchen/api/storetype/list",{method:"Post",data:e})},goodsList:function(e){return(0,i.WY)("/kitchen/api/goodes/list",{method:"Post",data:e})},goodsTypeList:function(e){return(0,i.WY)("/kitchen/api/goodstype/list",{method:"Post",data:e})},StartRefund:function(e){return(0,i.WY)("/kitchen/api/refund/StartOrderRefund",{method:"Post",params:e})},GetOrderDetails:function(e){return(0,i.WY)("/kitchen/api/Order/GetOrderDetails",{method:"Post",params:e})},printsmallticket:function(e){return(0,i.WY)("/kitchen/api/printer/print-small-ticket",{method:"Post",data:e})}},de=t(71194),V=t(50146),se=t(66456),N=t(64411),l=t(85893),ie={},A=function(e){var m=e.createModalVisible,p=e.onCancel,x=(0,f.useState)([]),g=(0,v.Z)(x,2),I=g[0],O=g[1];return(0,l.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 p()},maskClosable:!1,children:[(0,l.jsx)("h3",{style:{fontWeight:"bold",fontSize:16,marginTop:30},children:"\u5546\u54C1\u5217\u8868"}),(0,l.jsx)(N.Z,{rowKey:"id",dataSource:e.values.orderdetail,expandable:{expandedRowRender:function(E){return(0,l.jsx)(N.Z,{columns:[{title:"\u5C5E\u6027\u540D\u79F0",key:"attributeName",dataIndex:"attributeName"},{title:"\u6570\u91CF",key:"count",dataIndex:"count"},{title:"\u4EF7\u683C",key:"price",dataIndex:"price"}],dataSource:E.goodsAttr,pagination:!1})},defaultExpandedRowKeys:["0"]},columns:[{title:"\u5546\u54C1\u540D\u79F0",key:"goodsName",dataIndex:"goodsName"},{title:"\u5546\u54C1\u7F16\u53F7",key:"goodsNumber",dataIndex:"goodsNumber"}],toolBarRender:!1,search:!1,pagination:!1})]})},U=A,$=["defaultRender"],le=null,K=function(){var e=(0,f.useState)(),m=(0,v.Z)(e,2),p=m[0],x=m[1],g=(0,f.useState)(!1),I=(0,v.Z)(g,2),O=I[0],L=I[1],E=(0,f.useState)([]),T=(0,v.Z)(E,2),z=T[0],J=T[1],Q=(0,f.useState)([]),j=(0,v.Z)(Q,2),ue=j[0],X=j[1],q=(0,f.useRef)(),_=(0,f.useState)([]),w=(0,v.Z)(_,2),P=w[0],ee=w[1];(0,f.useEffect)(function(){function s(){R.srdList().then(function(n){var a=n.data;a==null||a.forEach(function(r){r.value=r.id,r.label=r.name}),J(a)})}s()},[]);function ce(){R.GetFlowExport(P).then(function(s){var n=URL.createObjectURL(new Blob([s])),a="\u8BA2\u5355\u6D41\u6C34.xlsx",r=document.createElement("a");r.href=n,r.download=a,r.click(),URL.revokeObjectURL(n)})}var te=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u4EA4\u6613\u8BA2\u5355\u53F7",dataIndex:"tradeNo"},{title:"\u5E73\u53F0\u8BA2\u5355\u53F7",dataIndex:"orderNumber"},{title:"\u8BA2\u5355\u6807\u9898",dataIndex:"subject"},{title:"\u8BA2\u5355\u603B\u91D1\u989D",dataIndex:"totalAmount",hideInSearch:!0},{title:"\u8BA2\u5355\u6570\u91CF",dataIndex:"orderCount",hideInSearch:!0},{title:"\u6240\u5C5E\u573A\u666F",dataIndex:"storeName"},{title:"\u521B\u5EFA\u65F6\u95F4",sorter:!0,dataIndex:"createdAt",valueType:"dateTime",renderFormItem:function(n,a,r){var y=a.defaultRender,o=(0,G.Z)(a,$),h=r.getFieldValue("status");return"".concat(h)==="0"?!1:"".concat(h)==="3"?(0,l.jsx)(D.Z,(0,C.Z)((0,C.Z)({},o),{},{placeholder:"\u8BF7\u8F93\u5165\u5F02\u5E38\u539F\u56E0\uFF01"})):y(n)}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(n,a){return[(0,l.jsx)("a",{onClick:function(){x(a),L(!0)},children:"\u67E5\u770B\u8BE6\u60C5"},"config")]}}],fe=function(){var s=(0,F.Z)((0,S.Z)().mark(function n(){var a,r,y,o,h,u;return(0,S.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,R.GetFlowExport(P);case 2:a=c.sent,a.isSuccess?(r={},y=new Date,o="\u8BA2\u5355\u6D41\u6C34"+y.toLocaleString().replaceAll("/","-"),r.fileName=o,h=["storeTypeName","storeName","order_Number","order_OriginalMoney","order_RealMoney","refundOriginalMoney","refundRealMoney","order_Count","order_CreateTime"],r.datas=[{sheetData:a.data,sheetName:o,sheetFilter:h,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"]}],u=new(B())(r),u.saveExcel()):M.default.error(a.errors||"\u5BFC\u51FA\u5931\u8D25");case 4:case"end":return c.stop()}},n)}));return function(){return s.apply(this,arguments)}}();return(0,l.jsxs)(W.ZP,{header:{title:"",breadcrumb:{}},children:[(0,l.jsx)(k.ZP,{headerTitle:"\u8BA2\u5355\u6D41\u6C34",actionRef:q,rowKey:"orderFlowId",search:{labelWidth:120},toolBarRender:function(){return[]},columns:te,request:function(){var s=(0,F.Z)((0,S.Z)().mark(function n(a,r,y){var o;return(0,S.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,R.orderList(a);case 2:return o=u.sent,o.data.data&&o.data.data.forEach(function(Z){var c;Z.storeName=(c=z.find(function(ae){return ae.value==Z.storeId}))===null||c===void 0?void 0:c.label}),ee(a),X(o.data.data),u.abrupt("return",{data:o.data.data,success:!0,total:o.data.total});case 7:case"end":return u.stop()}},n)}));return function(n,a,r){return s.apply(this,arguments)}}()}),!!p&&(0,l.jsx)(U,{onCancel:function(){x(void 0),L(!1)},createModalVisible:O,values:p||{}})]})},H=K}}]);