包含后厨 团餐 门店分支
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
16 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6684],{45245:function(W){W.exports={"welcome-head":"welcome-head___3iSF2","welcome-head-org":"welcome-head-org___3icYY","echarts-card-choose":"echarts-card-choose___2h7qo","my-loading":"my-loading___16VOn","device-list":"device-list___307TC","my-range-picker":"my-range-picker___2FSuN","tabs-title":"tabs-title___t5-lr"}},97205:function(W,V,s){"use strict";s.r(V),s.d(V,{default:function(){return je}});var mt=s(66456),A=s(10363),ft=s(49111),M=s(19650),ht=s(58024),k=s(91894),pt=s(13062),he=s(71230),gt=s(57663),b=s(71577),xt=s(43358),K=s(34041),yt=s(89032),N=s(15746),St=s(20228),pe=s(11382),c=s(39428),G=s(3182),h=s(2824),Rt=s(18106),H=s(25499),Dt=s(14965),ge=s(34895),m=s(67294),L=s(90631),xe=s(30381),y=s.n(xe),C=s(48971),E={GetDeparent:function(l){return(0,C.WY)("/groupmeal/api/MemberInfoService/GetMemberTag",{method:"POST",data:l})},GetReservationGoods:function(l){return(0,C.WY)("/groupmeal/api/Reservation/GetReservationGoods",{method:"POST",data:l})},GetReservationOrg:function(l){return(0,C.WY)("/groupmeal/api/Reservation/GetReservationOrg",{method:"POST",data:l})},GetReservationUser:function(l){return(0,C.WY)("/groupmeal/api/Reservation/GetReservationUser",{method:"POST",data:l})},GetReservationGoodsDetailed:function(l){return(0,C.WY)("/groupmeal/api/Reservation/GetReservationGoodsDetailed",{method:"POST",data:l})},GetReservationGoodsExcel:function(l){return(0,C.WY)("/groupmeal/api/Reservation/GetReservationGoodsExcel",{method:"POST",responseType:"blob",data:l})},GetReservationOrgExcel:function(l){return(0,C.WY)("/groupmeal/api/Reservation/GetReservationOrgExcel",{method:"POST",responseType:"blob",data:l})},GetReservationUserExcel:function(l){return(0,C.WY)("/groupmeal/api/Reservation/GetReservationUserExcel",{method:"POST",responseType:"blob",data:l})},GetReservationGoodsDetailedExcel:function(l){return(0,C.WY)("/groupmeal/api/Reservation/GetReservationGoodsDetailedExcel",{method:"POST",responseType:"blob",data:l})}},ye=s(45245),p=s.n(ye),Se=s(28790),Zt=s(71194),Re=s(50146),De=s(16894),t=s(85893),Ze=function(l){console.log("\u8C03\u8BD51",l);var S=[{title:"\u4E3B\u952E",dataIndex:"id",hideInTable:!0,hideInSearch:!0},{title:"\u5546\u54C1",dataIndex:"name"},{title:"\u7528\u9910\u65F6\u6BB5",dataIndex:"mealType",render:function(w,x){if(x.mealType==="1")return"\u65E9\u9910";if(x.mealType==="2")return"\u5348\u9910";if(x.mealType==="3")return"\u665A\u9910"}},{title:"\u9884\u5B9A\u6570\u91CF",dataIndex:"qty",sortDirections:["ascend","descend"],sorter:function(w,x){return w.value-x.value}},{title:"\u9884\u5B9A\u65F6\u95F4",dataIndex:"reservationTime"}];return(0,t.jsx)(Re.Z,{title:"\u67E5\u770B\u9884\u5B9A\u8BE6\u60C5",width:640,visible:l.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){l.onCancel()},destroyOnClose:!0,children:(0,t.jsx)(De.ZP,{headerTitle:"\u67E5\u770B\u9884\u5B9A\u8BE6\u60C5",rowKey:"id",search:!1,request:function(){var O=(0,G.Z)((0,c.Z)().mark(function w(x){var g,j;return(0,c.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return g=[],j=0,l.values.id!=null&&(x.UserId=l.values.id,x.beginTime=l.timeRange[0]._i,x.endTime=l.timeRange[1]._i),T.next=5,E.GetReservationUserGoods(x).then(function(R){g=R.data.data,j=R.data.total});case 5:return T.abrupt("return",{data:g,success:!0,total:j});case 6:case"end":return T.stop()}},w)}));return function(w){return O.apply(this,arguments)}}(),columns:S})})},Ge=Ze,Ee=ge.Z.RangePicker,$=H.Z.TabPane,je=function(){var Z=(0,m.useState)(1),l=(0,h.Z)(Z,2),S=l[0],O=l[1],w=(0,m.useState)(1),x=(0,h.Z)(w,2),g=x[0],j=x[1],J=(0,m.useState)(10),T=(0,h.Z)(J,2),R=T[0],F=T[1],Ce=(0,m.useState)(0),Q=(0,h.Z)(Ce,2),P=Q[0],z=Q[1],Te=(0,m.useState)([]),X=(0,h.Z)(Te,2),Be=X[0],we=X[1],be=(0,m.useState)([]),q=(0,h.Z)(be,2),Oe=q[0],Ye=q[1],Ie=(0,m.useState)([]),_=(0,h.Z)(Ie,2),Ue=_[0],Fe=_[1],ze=(0,m.useState)([]),ee=(0,h.Z)(ze,2),Ae=ee[0],Me=ee[1],Ne=(0,m.useState)(!1),te=(0,h.Z)(Ne,2),Le=te[0],B=te[1],$e=(0,m.useState)(!1),ae=(0,h.Z)($e,2),Pe=ae[0],ne=ae[1],We=(0,m.useState)(),re=(0,h.Z)(We,2),Ve=re[0],se=re[1],ke=(0,m.useState)([y()(y()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD")),y()(y()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD"))]),ie=(0,h.Z)(ke,2),D=ie[0],oe=ie[1],Ke=[{title:"\u5546\u54C1",dataIndex:"name"},{title:"\u7528\u9910\u65F6\u6BB5",dataIndex:"mealType",render:function(a,e){if(e.mealType==="1")return"\u65E9\u9910";if(e.mealType==="2")return"\u5348\u9910";if(e.mealType==="3")return"\u665A\u9910"}},{title:"\u9884\u5B9A\u6570\u91CF",dataIndex:"qty",sortDirections:["ascend","descend"],sorter:function(a,e){return a.value-e.value}},{title:"\u9884\u5B9A\u65F6\u95F4",dataIndex:"createAt"}],He=[{title:"\u5546\u54C1",dataIndex:"name"},{title:"\u9884\u5B9A\u90E8\u95E8",dataIndex:"orgName"},{title:"\u9884\u5B9A\u4EBA\u59D3\u540D",dataIndex:"realName"},{title:"\u7528\u9910\u65F6\u6BB5",dataIndex:"mealType",render:function(a,e){if(e.mealType==="1")return"\u65E9\u9910";if(e.mealType==="2")return"\u5348\u9910";if(e.mealType==="3")return"\u665A\u9910"}},{title:"\u9884\u5B9A\u6570\u91CF",dataIndex:"qty",sortDirections:["ascend","descend"],sorter:function(a,e){return a.value-e.value}},{title:"\u662F\u5426\u7EDF\u4E00\u9884\u5B9A",dataIndex:"qty",render:function(a,e){return e.qty>1?"\u662F":"\u5426"}},{title:"\u9884\u5B9A\u65F6\u95F4",dataIndex:"createAt"}],Je=[{title:"\u90E8\u95E8\u540D\u79F0",dataIndex:"orgName"},{title:"\u7528\u9910\u65F6\u6BB5",dataIndex:"mealType",render:function(a,e){if(e.mealType==="1")return"\u65E9\u9910";if(e.mealType==="2")return"\u5348\u9910";if(e.mealType==="3")return"\u665A\u9910"}},{title:"\u9884\u5B9A\u6570\u91CF",dataIndex:"qty",sortDirections:["ascend","descend"],sorter:function(a,e){return a.value-e.value}}],Qe=[{title:"\u9884\u5B9A\u4EBA\u5458\u540D\u79F0",dataIndex:"name"},{title:"\u90E8\u95E8",dataIndex:"orgName"},{title:"\u9884\u5B9A\u6570\u91CF",dataIndex:"qty",sortDirections:["ascend","descend"],sorter:function(a,e){return a.value-e.value}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(a,e){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("a",{onClick:function(){ne(!0),se(e)},children:"\u67E5\u770B\u8BE6\u60C5"})})}}],Xe=(0,m.useState)([]),le=(0,h.Z)(Xe,2),Y=le[0],qe=le[1],_e=(0,m.useState)(),ue=(0,h.Z)(_e,2),I=ue[0],de=ue[1],et=(0,m.useState)([{value:1,label:"\u65E9\u9910"},{value:2,label:"\u4E2D\u9910"},{value:3,label:"\u665A\u9910"}]),ce=(0,h.Z)(et,2),tt=ce[0],Gt=ce[1],at=(0,m.useState)(),ve=(0,h.Z)(at,2),U=ve[0],me=ve[1],nt=function(){var i=(0,G.Z)((0,c.Z)().mark(function a(){var e,n,u,o;return(0,c.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,E.GetDeparent({current:1,pageSize:9999,platformType:"4"});case 2:e=r.sent,e.statusCode===200&&(o=[],(n=e.data)===null||n===void 0||(u=n.data)===null||u===void 0||u.forEach(function(f){o.push({label:f.name,value:f.id})}),qe(o));case 4:case"end":return r.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),fe=function(){var a=Y.find(function(n){return n.value===I}),e={beginTime:D[0]._i,endTime:D[1]._i,orgName:(a==null?void 0:a.label)||"",mealType:U||"",current:g,pageSize:R};S==1?rt(e):S==2?it(e):S==3?st(e):S==4&&ot(e)},rt=function(){var i=(0,G.Z)((0,c.Z)().mark(function a(e){var n,u,o;return(0,c.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return B(!0),r.next=3,E.GetReservationGoods(e);case 3:n=r.sent,B(!1),n.succeeded?(o=(u=n.data.data)===null||u===void 0?void 0:u.sort(function(f,d){return d.value-f.value}),z(n.data.total),we(o)):console.log("Message:",n.msg||"\u83B7\u53D6\u9884\u5B9A\u5546\u54C1\u5931\u8D25");case 6:case"end":return r.stop()}},a)}));return function(e){return i.apply(this,arguments)}}(),st=function(){var i=(0,G.Z)((0,c.Z)().mark(function a(e){var n,u,o;return(0,c.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return B(!0),r.next=3,E.GetReservationOrg(e);case 3:n=r.sent,B(!1),n.succeeded?(o=(u=n.data.data)===null||u===void 0?void 0:u.sort(function(f,d){return d.value-f.value}),z(n.data.total),Ye(o)):console.log("Message:",n.msg||"\u83B7\u53D6\u9884\u5B9A\u5546\u54C1\u5931\u8D25");case 6:case"end":return r.stop()}},a)}));return function(e){return i.apply(this,arguments)}}(),it=function(){var i=(0,G.Z)((0,c.Z)().mark(function a(e){var n,u,o;return(0,c.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return B(!0),r.next=3,E.GetReservationUser(e);case 3:n=r.sent,B(!1),n.succeeded?(o=(u=n.data.data)===null||u===void 0?void 0:u.sort(function(f,d){return d.value-f.value}),z(n.data.total),Fe(o)):console.log("Message:",n.msg||"\u83B7\u53D6\u9884\u5B9A\u4EBA\u5458\u5931\u8D25");case 6:case"end":return r.stop()}},a)}));return function(e){return i.apply(this,arguments)}}(),ot=function(){var i=(0,G.Z)((0,c.Z)().mark(function a(e){var n,u,o;return(0,c.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return B(!0),r.next=3,E.GetReservationGoodsDetailed(e);case 3:n=r.sent,B(!1),n.succeeded?(o=(u=n.data.data)===null||u===void 0?void 0:u.sort(function(f,d){return d.value-f.value}),z(n.data.total),Me(o)):console.log("Message:",n.msg||"\u83B7\u53D6\u9884\u5B9A\u4EBA\u5458\u5931\u8D25");case 6:case"end":return r.stop()}},a)}));return function(e){return i.apply(this,arguments)}}(),lt=function(){return(0,t.jsx)(pe.Z,{className:p()["my-loading"],size:"large"})},ut=function(){var i=(0,G.Z)((0,c.Z)().mark(function a(){var e,n;return(0,c.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:e=Y.find(function(v){return v.value===I}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:U||"",current:g,pageSize:R},E.GetReservationGoodsExcel(n).then(function(v){var r=URL.createObjectURL(new Blob([v])),f="\u9884\u5B9A\u5546\u54C1\u6C47\u603B.xlsx",d=document.createElement("a");d.href=r,d.download=f,d.click(),URL.revokeObjectURL(r)});case 3:case"end":return o.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),dt=function(){var i=(0,G.Z)((0,c.Z)().mark(function a(){var e,n;return(0,c.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:e=Y.find(function(v){return v.value===I}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:U||"",current:g,pageSize:R},E.GetReservationUserExcel(n).then(function(v){var r=URL.createObjectURL(new Blob([v])),f="\u83B7\u53D6\u9884\u5B9A\u4EBA\u5458\u660E\u7EC6.xlsx",d=document.createElement("a");d.href=r,d.download=f,d.click(),URL.revokeObjectURL(r)});case 3:case"end":return o.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),ct=function(){var i=(0,G.Z)((0,c.Z)().mark(function a(){var e,n;return(0,c.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:e=Y.find(function(v){return v.value===I}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:U||"",current:g,pageSize:R},E.GetReservationOrgExcel(n).then(function(v){var r=URL.createObjectURL(new Blob([v])),f="\u9884\u5B9A\u90E8\u95E8\u6C47\u603B.xlsx",d=document.createElement("a");d.href=r,d.download=f,d.click(),URL.revokeObjectURL(r)});case 3:case"end":return o.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),vt=function(){var i=(0,G.Z)((0,c.Z)().mark(function a(){var e,n;return(0,c.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:e=Y.find(function(v){return v.value===I}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:U||"",current:g,pageSize:R},E.GetReservationGoodsDetailedExcel(n).then(function(v){var r=URL.createObjectURL(new Blob([v])),f="\u9884\u5B9A\u5546\u54C1\u660E\u7EC6.xlsx",d=document.createElement("a");d.href=r,d.download=f,d.click(),URL.revokeObjectURL(r)});case 3:case"end":return o.stop()}},a)}));return function(){return i.apply(this,arguments)}}();return(0,m.useEffect)(function(){nt()},[]),(0,m.useEffect)(function(){fe()},[S,g]),(0,t.jsxs)(Se.ZP,{header:{title:"",breadcrumb:{}},children:[(0,t.jsxs)("div",{className:p()["welcome-container"],children:[Le?(0,t.jsx)(lt,{}):null,(0,t.jsx)(k.Z,{style:{marginBottom:"30px"},children:(0,t.jsxs)(he.Z,{children:[(0,t.jsx)(N.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:(0,t.jsxs)("div",{className:p()["echarts-card-choose"],children:[(0,t.jsx)("div",{className:p()["echarts-card-choose-text"],children:"\u8D77\u6B62\u65F6\u95F4\uFF1A"}),(0,t.jsx)(Ee,{allowClear:!1,style:{width:"70%"},className:p()["my-range-picker"],value:D,onChange:function(a,e){var n=[y()(y()(new Date(e[0])).format("YYYY-MM-DD")),y()(y()(new Date(e[1])).format("YYYY-MM-DD"))];oe(n)}})]})}),(0,t.jsx)(N.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:(0,t.jsxs)("div",{className:p()["echarts-card-choose"],children:[(0,t.jsx)("div",{className:p()["echarts-card-choose-text"],children:"\u6240\u5C5E\u90E8\u95E8\uFF1A"}),(0,t.jsx)(K.Z,{placeholder:"\u8BF7\u9009\u62E9\u90E8\u95E8\uFF01",style:{width:"70%"},value:I,onChange:de,options:Y})]})}),(0,t.jsx)(N.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:(0,t.jsxs)("div",{className:p()["echarts-card-choose"],children:[(0,t.jsx)("div",{className:p()["echarts-card-choose-text"],children:"\u7528\u9910\u65F6\u6BB5\uFF1A"}),(0,t.jsx)(K.Z,{placeholder:"\u8BF7\u9009\u62E9\u7528\u9910\u65F6\u6BB5\uFF01",style:{width:"70%"},value:U,onChange:me,options:tt})]})}),(0,t.jsxs)(N.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:[(0,t.jsx)(b.Z,{className:p()["echarts-card-btn"],type:"primary",style:{width:"100px",marginRight:"10px"},onClick:function(){return fe()},children:"\u67E5\u8BE2"}),(0,t.jsx)(b.Z,{className:p()["echarts-card-btn"],style:{width:"100px"},onClick:function(){oe([y()(y()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 00:00:00")),y()(y()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 23:59:59"))]),de(),me(),j(1),F(10)},children:"\u91CD\u7F6E"})]})]})}),(0,t.jsx)(k.Z,{children:(0,t.jsxs)(H.Z,{tabPosition:"left",value:S,onChange:function(a){O(a),z(0),j(1)},children:[(0,t.jsx)($,{tab:"\u9884\u5B9A\u83DC\u54C1\u6C47\u603B",children:S==1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.Z,{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,t.jsx)("div",{className:p()["tabs-title"],children:"\u9884\u5B9A\u83DC\u54C1\u6C47\u603B"}),(0,t.jsx)(b.Z,{type:"primary",icon:(0,t.jsx)(L.Z,{}),size:"middle",onClick:ut,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(A.Z,{columns:Ke,dataSource:Be,pagination:{current:g,pageSize:R,total:P,onChange:j,onShowSizeChange:function(a,e){return F(e)}}})]})},1),(0,t.jsx)($,{tab:"\u90E8\u95E8\u9884\u5B9A\u6C47\u603B",children:S==3&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.Z,{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,t.jsx)("div",{className:p()["tabs-title"],children:"\u90E8\u95E8\u9884\u5B9A\u6C47\u603B"}),(0,t.jsx)(b.Z,{type:"primary",icon:(0,t.jsx)(L.Z,{}),size:"middle",onClick:ct,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(A.Z,{columns:Je,dataSource:Oe,pagination:{current:g,pageSize:R,total:P,onChange:j,onShowSizeChange:function(a,e){return F(e)}}})]})},3),(0,t.jsx)($,{tab:"\u9884\u5B9A\u4EBA\u5458\u660E\u7EC6",children:S==2&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.Z,{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,t.jsx)("div",{className:p()["tabs-title"],children:"\u9884\u5B9A\u4EBA\u5458\u660E\u7EC6"}),(0,t.jsx)(b.Z,{type:"primary",icon:(0,t.jsx)(L.Z,{}),size:"middle",onClick:dt,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(A.Z,{columns:Qe,dataSource:Ue,pagination:{current:g,pageSize:R,onChange:j,onShowSizeChange:function(a,e){return F(e)}}})]})},2)," ",(0,t.jsx)($,{tab:"\u9884\u5B9A\u5546\u54C1\u660E\u7EC6",children:S==4&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.Z,{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,t.jsx)("div",{className:p()["tabs-title"],children:"\u9884\u5B9A\u5546\u54C1\u660E\u7EC6"}),(0,t.jsx)(b.Z,{type:"primary",icon:(0,t.jsx)(L.Z,{}),size:"middle",onClick:vt,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(A.Z,{columns:He,dataSource:Ae,pagination:{current:g,pageSize:R,total:P,onChange:j,onShowSizeChange:function(a,e){return F(e)}}})]})},4)]})})]}),Pe&&(0,t.jsx)(Ge,{createModalVisible:!0,values:Ve||{},timeRange:D,onCancel:function(){ne(!1),se(void 0)}})]})}}}]);