|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3991,1322,9464,1981,2869,7013,9719,2383],{32141:function($){$.exports={"welcome-head":"welcome-head___2KkzI","welcome-head-org":"welcome-head-org___1csW8","echarts-card-choose":"echarts-card-choose___3MUZE","my-loading":"my-loading___13xim","device-list":"device-list___2yRMk","my-range-picker":"my-range-picker___3_gNJ","tabs-title":"tabs-title___qUM48"}},10370:function($,W,s){"use strict";s.r(W),s.d(W,{default:function(){return Ee}});var mt=s(66456),M=s(64411),ft=s(49111),A=s(19650),ht=s(58024),V=s(91894),gt=s(13062),he=s(71230),xt=s(57663),U=s(71577),pt=s(43358),K=s(34041),yt=s(89032),N=s(15746),St=s(20228),ge=s(11382),d=s(39428),G=s(3182),f=s(2824),Rt=s(18106),J=s(95562),Dt=s(14965),xe=s(91774),v=s(67294),L=s(90631),pe=s(30381),y=s.n(pe),C=s(48971),j={GetReservationUser:function(o){return(0,C.WY)("/kitchen/api/Reservation/GetReservationUser",{method:"POST",data:o})},GetReservationGoods:function(o){return(0,C.WY)("/kitchen/api/Reservation/GetReservationGoods",{method:"POST",data:o})},GetReservationGoodsDetailed:function(o){return(0,C.WY)("/kitchen/api/Reservation/GetReservationGoodsDetailed",{method:"POST",data:o})},GetReservationUserGoods:function(o){return(0,C.WY)("/kitchen/api/Reservation/GetReservationUserGoods",{method:"POST",data:o})},GetDeparent:function(o){return(0,C.WY)("/kitchen/api/member-tag/member-tag",{method:"POST",data:o})},GetReservationGoodsExcel:function(o){return(0,C.WY)("/kitchen/api/Reservation/GetReservationGoodsExcel",{method:"POST",responseType:"blob",data:o})},GetReservationOrgExcel:function(o){return(0,C.WY)("/kitchen/api/Reservation/GetReservationOrgExcel",{method:"POST",responseType:"blob",data:o})},GetReservationGoodsDetailedExcel:function(o){return(0,C.WY)("/kitchen/api/Reservation/GetReservationGoodsDetailedExcel",{method:"POST",responseType:"blob",data:o})},GetReservationOrg:function(o){return(0,C.WY)("/kitchen/api/Reservation/GetReservationOrg",{method:"POST",data:o})}},ye=s(32141),h=s.n(ye),Se=s(78009),Zt=s(71194),Re=s(50146),De=s(16894),t=s(85893),Ze=function(o){console.log("\u8C03\u8BD51",o);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,p){if(p.mealType==="1")return"\u65E9\u9910";if(p.mealType==="2")return"\u5348\u9910";if(p.mealType==="3")return"\u665A\u9910"}},{title:"\u9884\u5B9A\u6570\u91CF",dataIndex:"qty",sortDirections:["ascend","descend"],sorter:function(w,p){return w.value-p.value}},{title:"\u9884\u5B9A\u65F6\u95F4",dataIndex:"reservationTime"}];return(0,t.jsx)(Re.Z,{title:"\u67E5\u770B\u9884\u5B9A\u8BE6\u60C5",width:640,visible:o.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){o.onCancel()},destroyOnClose:!0,children:(0,t.jsx)(De.ZP,{headerTitle:"\u67E5\u770B\u9884\u5B9A\u8BE6\u60C5",rowKey:"id",search:!1,request:function(){var I=(0,G.Z)((0,d.Z)().mark(function w(p){var x,E;return(0,d.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return x=[],E=0,o.values.id!=null&&(p.UserId=o.values.id,p.beginTime=o.timeRange[0]._i,p.endTime=o.timeRange[1]._i),T.next=5,j.GetReservationUserGoods(p).then(function(R){x=R.data.data,E=R.data.total});case 5:return T.abrupt("return",{data:x,success:!0,total:E});case 6:case"end":return T.stop()}},w)}));return function(w){return I.apply(this,arguments)}}(),columns:S})})},Ge=Ze,je=xe.Z.RangePicker,P=J.Z.TabPane,Ee=function(){var Z=(0,v.useState)(1),o=(0,f.Z)(Z,2),S=o[0],I=o[1],w=(0,v.useState)(1),p=(0,f.Z)(w,2),x=p[0],E=p[1],H=(0,v.useState)(10),T=(0,f.Z)(H,2),R=T[0],F=T[1],Ce=(0,v.useState)(0),Q=(0,f.Z)(Ce,2),k=Q[0],z=Q[1],Te=(0,v.useState)([]),X=(0,f.Z)(Te,2),Be=X[0],we=X[1],Ue=(0,v.useState)([]),q=(0,f.Z)(Ue,2),Ie=q[0],Oe=q[1],Ye=(0,v.useState)([]),_=(0,f.Z)(Ye,2),be=_[0],Fe=_[1],ze=(0,v.useState)([]),ee=(0,f.Z)(ze,2),Me=ee[0],Ae=ee[1],Ne=(0,v.useState)(!1),te=(0,f.Z)(Ne,2),Le=te[0],B=te[1],Pe=(0,v.useState)(!1),ae=(0,f.Z)(Pe,2),ke=ae[0],ne=ae[1],$e=(0,v.useState)(),re=(0,f.Z)($e,2),We=re[0],se=re[1],Ve=(0,v.useState)([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"))]),ie=(0,f.Z)(Ve,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"}],Je=[{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"}],He=[{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,v.useState)([]),le=(0,f.Z)(Xe,2),O=le[0],qe=le[1],_e=(0,v.useState)(),ue=(0,f.Z)(_e,2),Y=ue[0],de=ue[1],et=(0,v.useState)([{value:1,label:"\u65E9\u9910"},{value:2,label:"\u4E2D\u9910"},{value:3,label:"\u665A\u9910"}]),ce=(0,f.Z)(et,2),tt=ce[0],Gt=ce[1],at=(0,v.useState)(),ve=(0,f.Z)(at,2),b=ve[0],me=ve[1],nt=function(){var i=(0,G.Z)((0,d.Z)().mark(function a(){var e,n,c,u;return(0,d.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,j.GetDeparent({current:1,pageSize:9999,platformType:"4"});case 2:e=l.sent,e.statusCode===200&&(u=[],(n=e.data)===null||n===void 0||(c=n.data)===null||c===void 0||c.forEach(function(m){u.push({label:m.name,value:m.id})}),qe(u));case 4:case"end":return l.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),fe=function(){var a=O.find(function(n){return n.value===Y}),e={beginTime:D[0]._i,endTime:D[1]._i,orgName:(a==null?void 0:a.label)||"",mealType:b||"",current:x,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,d.Z)().mark(function a(e){var n,c;return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return B(!0),r.next=3,j.GetReservationGoods(e);case 3:n=r.sent,B(!1),n.succeeded?(c=n.data.data.sort(function(l,m){return m.value-l.value}),z(n.data.total),we(c)):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,d.Z)().mark(function a(e){var n,c;return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return B(!0),r.next=3,j.GetReservationOrg(e);case 3:n=r.sent,B(!1),n.succeeded?(c=n.data.data.sort(function(l,m){return m.value-l.value}),z(n.data.total),Oe(c)):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,d.Z)().mark(function a(e){var n,c;return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return B(!0),r.next=3,j.GetReservationUser(e);case 3:n=r.sent,B(!1),n.succeeded?(c=n.data.data.sort(function(l,m){return m.value-l.value}),z(n.data.total),Fe(c)):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,d.Z)().mark(function a(e){var n,c;return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return B(!0),r.next=3,j.GetReservationGoodsDetailed(e);case 3:n=r.sent,B(!1),n.succeeded?(c=n.data.data.sort(function(l,m){return m.value-l.value}),z(n.data.total),Ae(c)):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)(ge.Z,{className:h()["my-loading"],size:"large"})},ut=function(){var i=(0,G.Z)((0,d.Z)().mark(function a(){var e,n;return(0,d.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=O.find(function(r){return r.value===Y}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:b||"",current:x,pageSize:R},j.GetReservationGoodsExcel(n).then(function(r){var l=URL.createObjectURL(new Blob([r])),m="\u9884\u5B9A\u5546\u54C1\u6C47\u603B.xlsx",g=document.createElement("a");g.href=l,g.download=m,g.click(),URL.revokeObjectURL(l)});case 3:case"end":return u.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),dt=function(){var i=(0,G.Z)((0,d.Z)().mark(function a(){var e,n;return(0,d.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=O.find(function(r){return r.value===Y}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:b||"",current:x,pageSize:R},j.GetReservationUserExcel(n).then(function(r){var l=URL.createObjectURL(new Blob([r])),m="\u83B7\u53D6\u9884\u5B9A\u4EBA\u5458\u660E\u7EC6.xlsx",g=document.createElement("a");g.href=l,g.download=m,g.click(),URL.revokeObjectURL(l)});case 3:case"end":return u.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),ct=function(){var i=(0,G.Z)((0,d.Z)().mark(function a(){var e,n;return(0,d.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=O.find(function(r){return r.value===Y}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:b||"",current:x,pageSize:R},j.GetReservationOrgExcel(n).then(function(r){var l=URL.createObjectURL(new Blob([r])),m="\u9884\u5B9A\u90E8\u95E8\u6C47\u603B.xlsx",g=document.createElement("a");g.href=l,g.download=m,g.click(),URL.revokeObjectURL(l)});case 3:case"end":return u.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),vt=function(){var i=(0,G.Z)((0,d.Z)().mark(function a(){var e,n;return(0,d.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=O.find(function(r){return r.value===Y}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:b||"",current:x,pageSize:R},j.GetReservationGoodsDetailedExcel(n).then(function(r){var l=URL.createObjectURL(new Blob([r])),m="\u9884\u5B9A\u5546\u54C1\u660E\u7EC6.xlsx",g=document.createElement("a");g.href=l,g.download=m,g.click(),URL.revokeObjectURL(l)});case 3:case"end":return u.stop()}},a)}));return function(){return i.apply(this,arguments)}}();return(0,v.useEffect)(function(){nt()},[]),(0,v.useEffect)(function(){fe()},[S,x]),(0,t.jsxs)(Se.ZP,{children:[(0,t.jsxs)("div",{className:h()["welcome-container"],children:[Le?(0,t.jsx)(lt,{}):null,(0,t.jsx)(V.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:h()["echarts-card-choose"],children:[(0,t.jsx)("div",{className:h()["echarts-card-choose-text"],children:"\u8D77\u6B62\u65F6\u95F4\uFF1A"}),(0,t.jsx)(je,{style:{width:"70%"},className:h()["my-range-picker"],value:D,onChange:function(a,e){var n=[y()(y()(new Date(e[0])).format("YYYY-MM-DD 00:00:00")),y()(y()(new Date(e[1])).format("YYYY-MM-DD 23:59:59"))];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:h()["echarts-card-choose"],children:[(0,t.jsx)("div",{className:h()["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:Y,onChange:de,options:O})]})}),(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:h()["echarts-card-choose"],children:[(0,t.jsx)("div",{className:h()["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:b,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)(U.Z,{className:h()["echarts-card-btn"],type:"primary",style:{width:"100px",marginRight:"10px"},onClick:function(){return fe()},children:"\u67E5\u8BE2"}),(0,t.jsx)(U.Z,{className:h()["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(),E(1),F(10)},children:"\u91CD\u7F6E"})]})]})}),(0,t.jsx)(V.Z,{children:(0,t.jsxs)(J.Z,{tabPosition:"left",value:S,onChange:function(a){I(a),z(0),E(1)},children:[(0,t.jsx)(P,{tab:"\u9884\u5B9A\u83DC\u54C1\u6C47\u603B",children:S==1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Z,{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,t.jsx)("div",{className:h()["tabs-title"],children:"\u9884\u5B9A\u83DC\u54C1\u6C47\u603B"}),(0,t.jsx)(U.Z,{type:"primary",icon:(0,t.jsx)(L.Z,{}),size:"middle",onClick:ut,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(M.Z,{columns:Ke,dataSource:Be,pagination:{current:x,pageSize:R,total:k,onChange:E,onShowSizeChange:function(a,e){return F(e)}}})]})},1),(0,t.jsx)(P,{tab:"\u90E8\u95E8\u9884\u5B9A\u6C47\u603B",children:S==3&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Z,{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,t.jsx)("div",{className:h()["tabs-title"],children:"\u90E8\u95E8\u9884\u5B9A\u6C47\u603B"}),(0,t.jsx)(U.Z,{type:"primary",icon:(0,t.jsx)(L.Z,{}),size:"middle",onClick:ct,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(M.Z,{columns:He,dataSource:Ie,pagination:{current:x,pageSize:R,total:k,onChange:E,onShowSizeChange:function(a,e){return F(e)}}})]})},3),(0,t.jsx)(P,{tab:"\u9884\u5B9A\u4EBA\u5458\u660E\u7EC6",children:S==2&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Z,{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,t.jsx)("div",{className:h()["tabs-title"],children:"\u9884\u5B9A\u4EBA\u5458\u660E\u7EC6"}),(0,t.jsx)(U.Z,{type:"primary",icon:(0,t.jsx)(L.Z,{}),size:"middle",onClick:dt,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(M.Z,{columns:Qe,dataSource:be,pagination:{current:x,pageSize:R,onChange:E,onShowSizeChange:function(a,e){return F(e)}}})]})},2)," ",(0,t.jsx)(P,{tab:"\u9884\u5B9A\u5546\u54C1\u660E\u7EC6",children:S==4&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Z,{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,t.jsx)("div",{className:h()["tabs-title"],children:"\u9884\u5B9A\u5546\u54C1\u660E\u7EC6"}),(0,t.jsx)(U.Z,{type:"primary",icon:(0,t.jsx)(L.Z,{}),size:"middle",onClick:vt,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(M.Z,{columns:Je,dataSource:Me,pagination:{current:x,pageSize:R,total:k,onChange:E,onShowSizeChange:function(a,e){return F(e)}}})]})},4)]})})]}),ke&&(0,t.jsx)(Ge,{createModalVisible:!0,values:We||{},timeRange:D,onCancel:function(){ne(!1),se(void 0)}})]})}}}]);
|