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 rivejä
16 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3991,7975,1322,6353,104,3591,1278,6469,8920,8698,6653],{32141:function(k){k.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(k,$,s){"use strict";s.r($),s.d($,{default:function(){return je}});var mt=s(66456),z=s(15711),ft=s(49111),M=s(19650),ht=s(58024),W=s(91894),xt=s(13062),he=s(71230),gt=s(57663),w=s(71577),pt=s(43358),V=s(34041),yt=s(89032),A=s(15746),St=s(20228),xe=s(11382),d=s(39428),Z=s(3182),f=s(2824),Rt=s(18106),K=s(60561),Dt=s(14965),ge=s(91774),v=s(67294),N=s(90631),pe=s(30381),y=s.n(pe),E=s(48971),j={GetReservationUser:function(o){return(0,E.WY)("/kitchen/api/Reservation/GetReservationUser",{method:"POST",data:o})},GetReservationGoods:function(o){return(0,E.WY)("/kitchen/api/Reservation/GetReservationGoods",{method:"POST",data:o})},GetReservationGoodsDetailed:function(o){return(0,E.WY)("/kitchen/api/Reservation/GetReservationGoodsDetailed",{method:"POST",data:o})},GetReservationUserGoods:function(o){return(0,E.WY)("/kitchen/api/Reservation/GetReservationUserGoods",{method:"POST",data:o})},GetDeparent:function(o){return(0,E.WY)("/kitchen/api/member-tag/member-tag",{method:"POST",data:o})},GetReservationGoodsExcel:function(o){return(0,E.WY)("/kitchen/api/Reservation/GetReservationGoodsExcel",{method:"POST",responseType:"blob",data:o})},GetReservationUserExcel:function(o){return(0,E.WY)("/kitchen/api/Reservation/GetReservationUserExcel",{method:"POST",responseType:"blob",data:o})},GetReservationOrgExcel:function(o){return(0,E.WY)("/kitchen/api/Reservation/GetReservationOrgExcel",{method:"POST",responseType:"blob",data:o})},GetReservationGoodsDetailedExcel:function(o){return(0,E.WY)("/kitchen/api/Reservation/GetReservationGoodsDetailedExcel",{method:"POST",responseType:"blob",data:o})},GetReservationOrg:function(o){return(0,E.WY)("/kitchen/api/Reservation/GetReservationOrg",{method:"POST",data:o})}},ye=s(32141),h=s.n(ye),Se=s(78009),Gt=s(71194),Re=s(50146),De=s(16894),t=s(85893),Ge=function(o){console.log("\u8C03\u8BD51",o);var R=[{title:"\u4E3B\u952E",dataIndex:"id",hideInTable:!0,hideInSearch:!0},{title:"\u5546\u54C1",dataIndex:"name"},{title:"\u7528\u9910\u65F6\u6BB5",dataIndex:"mealType",render:function(U,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(U,p){return U.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 O=(0,Z.Z)((0,d.Z)().mark(function U(p){var g,T;return(0,d.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return g=[],T=0,o.values.id!=null&&(p.UserId=o.values.id,p.beginTime=o.timeRange[0]._i,p.endTime=o.timeRange[1]._i),C.next=5,j.GetReservationUserGoods(p).then(function(D){g=D.data.data,T=D.data.total});case 5:return C.abrupt("return",{data:g,success:!0,total:T});case 6:case"end":return C.stop()}},U)}));return function(U){return O.apply(this,arguments)}}(),columns:R})})},Ze=Ge,Ee=ge.Z.RangePicker,L=K.Z.TabPane,je=function(){var S=(0,v.useState)(1),o=(0,f.Z)(S,2),R=o[0],O=o[1],U=(0,v.useState)(1),p=(0,f.Z)(U,2),g=p[0],T=p[1],J=(0,v.useState)(10),C=(0,f.Z)(J,2),D=C[0],F=C[1],Te=(0,v.useState)(0),H=(0,f.Z)(Te,2),P=H[0],Q=H[1],Ce=(0,v.useState)([]),X=(0,f.Z)(Ce,2),Be=X[0],Ue=X[1],we=(0,v.useState)([]),q=(0,f.Z)(we,2),Oe=q[0],Ie=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),G=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>2?"\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),I=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],Zt=ce[1],at=(0,v.useState)(),ve=(0,f.Z)(at,2),b=ve[0],me=ve[1],nt=function(){var i=(0,Z.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=I.find(function(n){return n.value===Y}),e={beginTime:G[0]._i,endTime:G[1]._i,orgName:(a==null?void 0:a.label)||"",mealType:b||"",current:g,pageSize:D};R==1?rt(e):R==2?it(e):R==3?st(e):R==4&&ot(e)},rt=function(){var i=(0,Z.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}),Ue(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,Z.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}),Ie(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,Z.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}),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,Z.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}),Q(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)(xe.Z,{className:h()["my-loading"],size:"large"})},ut=function(){var i=(0,Z.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=I.find(function(r){return r.value===Y}),n={beginTime:G[0]._i,endTime:G[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:b||"",current:g,pageSize:D},j.GetReservationGoodsExcel(n).then(function(r){var l=URL.createObjectURL(new Blob([r])),m="\u9884\u5B9A\u5546\u54C1\u6C47\u603B.xlsx",x=document.createElement("a");x.href=l,x.download=m,x.click(),URL.revokeObjectURL(l)});case 3:case"end":return u.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),dt=function(){var i=(0,Z.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=I.find(function(r){return r.value===Y}),n={beginTime:G[0]._i,endTime:G[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:b||"",current:g,pageSize:D},j.GetReservationUserExcel(n).then(function(r){var l=URL.createObjectURL(new Blob([r])),m="\u83B7\u53D6\u9884\u5B9A\u4EBA\u5458\u660E\u7EC6.xlsx",x=document.createElement("a");x.href=l,x.download=m,x.click(),URL.revokeObjectURL(l)});case 3:case"end":return u.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),ct=function(){var i=(0,Z.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=I.find(function(r){return r.value===Y}),n={beginTime:G[0]._i,endTime:G[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:b||"",current:g,pageSize:D},j.GetReservationOrgExcel(n).then(function(r){var l=URL.createObjectURL(new Blob([r])),m="\u9884\u5B9A\u90E8\u95E8\u6C47\u603B.xlsx",x=document.createElement("a");x.href=l,x.download=m,x.click(),URL.revokeObjectURL(l)});case 3:case"end":return u.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),vt=function(){var i=(0,Z.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=I.find(function(r){return r.value===Y}),n={beginTime:G[0]._i,endTime:G[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:b||"",current:g,pageSize:D},j.GetReservationGoodsDetailedExcel(n).then(function(r){var l=URL.createObjectURL(new Blob([r])),m="\u9884\u5B9A\u5546\u54C1\u660E\u7EC6.xlsx",x=document.createElement("a");x.href=l,x.download=m,x.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()},[R,g]),(0,t.jsxs)(Se.ZP,{children:[(0,t.jsxs)("div",{className:h()["welcome-container"],children:[Le?(0,t.jsx)(lt,{}):null,(0,t.jsx)(W.Z,{style:{marginBottom:"30px"},children:(0,t.jsxs)(he.Z,{children:[(0,t.jsx)(A.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)(Ee,{style:{width:"70%"},className:h()["my-range-picker"],value:G,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)(A.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)(V.Z,{placeholder:"\u8BF7\u9009\u62E9\u90E8\u95E8\uFF01",style:{width:"70%"},value:Y,onChange:de,options:I})]})}),(0,t.jsx)(A.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)(V.Z,{placeholder:"\u8BF7\u9009\u62E9\u7528\u9910\u65F6\u6BB5\uFF01",style:{width:"70%"},value:b,onChange:me,options:tt})]})}),(0,t.jsxs)(A.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:[(0,t.jsx)(w.Z,{className:h()["echarts-card-btn"],type:"primary",style:{width:"100px",marginRight:"10px"},onClick:function(){return fe()},children:"\u67E5\u8BE2"}),(0,t.jsx)(w.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(),T(1),F(10)},children:"\u91CD\u7F6E"})]})]})}),(0,t.jsx)(W.Z,{children:(0,t.jsxs)(K.Z,{tabPosition:"left",value:R,onChange:function(a){O(a),Q(0),T(1)},children:[(0,t.jsx)(L,{tab:"\u9884\u5B9A\u83DC\u54C1\u6C47\u603B",children:R==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:h()["tabs-title"],children:"\u9884\u5B9A\u83DC\u54C1\u6C47\u603B"}),(0,t.jsx)(w.Z,{type:"primary",icon:(0,t.jsx)(N.Z,{}),size:"middle",onClick:ut,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(z.Z,{columns:Ke,dataSource:Be,pagination:{current:g,pageSize:D,total:P,onChange:T,onShowSizeChange:function(a,e){return F(e)}}})]})},1),(0,t.jsx)(L,{tab:"\u90E8\u95E8\u9884\u5B9A\u6C47\u603B",children:R==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:h()["tabs-title"],children:"\u90E8\u95E8\u9884\u5B9A\u6C47\u603B"}),(0,t.jsx)(w.Z,{type:"primary",icon:(0,t.jsx)(N.Z,{}),size:"middle",onClick:ct,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(z.Z,{columns:He,dataSource:Oe,pagination:{current:g,pageSize:D,total:P,onChange:T,onShowSizeChange:function(a,e){return F(e)}}})]})},3),(0,t.jsx)(L,{tab:"\u9884\u5B9A\u4EBA\u5458\u660E\u7EC6",children:R==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:h()["tabs-title"],children:"\u9884\u5B9A\u4EBA\u5458\u660E\u7EC6"}),(0,t.jsx)(w.Z,{type:"primary",icon:(0,t.jsx)(N.Z,{}),size:"middle",onClick:dt,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(z.Z,{columns:Qe,dataSource:be,pagination:{current:g,pageSize:D,onChange:T,onShowSizeChange:function(a,e){return F(e)}}})]})},2)," ",(0,t.jsx)(L,{tab:"\u9884\u5B9A\u5546\u54C1\u660E\u7EC6",children:R==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:h()["tabs-title"],children:"\u9884\u5B9A\u5546\u54C1\u660E\u7EC6"}),(0,t.jsx)(w.Z,{type:"primary",icon:(0,t.jsx)(N.Z,{}),size:"middle",onClick:vt,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(z.Z,{columns:Je,dataSource:Me,pagination:{current:g,pageSize:D,total:P,onChange:T,onShowSizeChange:function(a,e){return F(e)}}})]})},4)]})})]}),ke&&(0,t.jsx)(Ze,{createModalVisible:!0,values:We||{},timeRange:G,onCancel:function(){ne(!1),se(void 0)}})]})}}}]);