|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6684],{45245:function(V){V.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(V,k,s){"use strict";s.r(k),s.d(k,{default:function(){return Ce}});var ft=s(66456),M=s(10363),ht=s(49111),N=s(19650),pt=s(58024),K=s(91894),gt=s(13062),pe=s(71230),xt=s(57663),b=s(71577),yt=s(43358),H=s(34041),St=s(89032),L=s(15746),Rt=s(20228),ge=s(11382),c=s(39428),G=s(3182),h=s(2824),Dt=s(18106),J=s(25499),Zt=s(14965),xe=s(34895),m=s(67294),$=s(90631),ye=s(30381),y=s.n(ye),C=s(48971),O=s(96690),E={GetDeparent:function(l){return(0,C.WY)((0,O.zr)()+"/api/MemberInfoService/GetMemberTag",{method:"POST",data:l})},GetReservationGoods:function(l){return(0,C.WY)((0,O.zr)()+"/api/Reservation/GetReservationGoods",{method:"POST",data:l})},GetReservationOrg:function(l){return(0,C.WY)((0,O.zr)()+"/api/Reservation/GetReservationOrg",{method:"POST",data:l})},GetReservationUser:function(l){return(0,C.WY)((0,O.zr)()+"/api/Reservation/GetReservationUser",{method:"POST",data:l})},GetReservationGoodsDetailed:function(l){return(0,C.WY)((0,O.zr)()+"/api/Reservation/GetReservationGoodsDetailed",{method:"POST",data:l})},GetReservationGoodsExcel:function(l){return(0,C.WY)((0,O.zr)()+"/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})}},Se=s(45245),p=s.n(Se),Re=s(28790),Gt=s(71194),De=s(50146),Ze=s(16894),t=s(85893),Ge=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)(De.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)(Ze.ZP,{headerTitle:"\u67E5\u770B\u9884\u5B9A\u8BE6\u60C5",rowKey:"id",search:!1,request:function(){var Y=(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 Y.apply(this,arguments)}}(),columns:S})})},Ee=Ge,je=xe.Z.RangePicker,P=J.Z.TabPane,Ce=function(){var Z=(0,m.useState)(1),l=(0,h.Z)(Z,2),S=l[0],Y=l[1],w=(0,m.useState)(1),x=(0,h.Z)(w,2),g=x[0],j=x[1],Q=(0,m.useState)(10),T=(0,h.Z)(Q,2),R=T[0],F=T[1],Te=(0,m.useState)(0),X=(0,h.Z)(Te,2),W=X[0],A=X[1],Be=(0,m.useState)([]),q=(0,h.Z)(Be,2),we=q[0],be=q[1],Oe=(0,m.useState)([]),_=(0,h.Z)(Oe,2),Ye=_[0],Ie=_[1],Ue=(0,m.useState)([]),ee=(0,h.Z)(Ue,2),ze=ee[0],Fe=ee[1],Ae=(0,m.useState)([]),te=(0,h.Z)(Ae,2),Me=te[0],Ne=te[1],Le=(0,m.useState)(!1),ae=(0,h.Z)(Le,2),$e=ae[0],B=ae[1],Pe=(0,m.useState)(!1),ne=(0,h.Z)(Pe,2),We=ne[0],re=ne[1],Ve=(0,m.useState)(),se=(0,h.Z)(Ve,2),ke=se[0],ie=se[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"))]),oe=(0,h.Z)(Ke,2),D=oe[0],le=oe[1],He=[{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"}],Qe=[{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}}],Xe=[{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(){re(!0),ie(e)},children:"\u67E5\u770B\u8BE6\u60C5"})})}}],qe=(0,m.useState)([]),ue=(0,h.Z)(qe,2),I=ue[0],_e=ue[1],et=(0,m.useState)(),de=(0,h.Z)(et,2),U=de[0],ce=de[1],tt=(0,m.useState)([{value:1,label:"\u65E9\u9910"},{value:2,label:"\u4E2D\u9910"},{value:3,label:"\u665A\u9910"}]),ve=(0,h.Z)(tt,2),at=ve[0],Et=ve[1],nt=(0,m.useState)(),me=(0,h.Z)(nt,2),z=me[0],fe=me[1],rt=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})}),_e(o));case 4:case"end":return r.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),he=function(){var a=I.find(function(n){return n.value===U}),e={beginTime:D[0]._i,endTime:D[1]._i,orgName:(a==null?void 0:a.label)||"",mealType:z||"",current:g,pageSize:R};S==1?st(e):S==2?ot(e):S==3?it(e):S==4&<(e)},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.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}),A(n.data.total),be(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.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}),A(n.data.total),Ie(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)}}(),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.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}),A(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)}}(),lt=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}),A(n.data.total),Ne(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)}}(),ut=function(){return(0,t.jsx)(ge.Z,{className:p()["my-loading"],size:"large"})},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=I.find(function(v){return v.value===U}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:z||"",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)}}(),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=I.find(function(v){return v.value===U}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:z||"",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)}}(),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=I.find(function(v){return v.value===U}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:z||"",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)}}(),mt=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=I.find(function(v){return v.value===U}),n={beginTime:D[0]._i,endTime:D[1]._i,orgName:(e==null?void 0:e.label)||"",mealType:z||"",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(){rt()},[]),(0,m.useEffect)(function(){he()},[S,g]),(0,t.jsxs)(Re.ZP,{header:{title:"",breadcrumb:{}},children:[(0,t.jsxs)("div",{className:p()["welcome-container"],children:[$e?(0,t.jsx)(ut,{}):null,(0,t.jsx)(K.Z,{style:{marginBottom:"30px"},children:(0,t.jsxs)(pe.Z,{children:[(0,t.jsx)(L.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)(je,{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"))];le(n)}})]})}),(0,t.jsx)(L.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)(H.Z,{placeholder:"\u8BF7\u9009\u62E9\u90E8\u95E8\uFF01",style:{width:"70%"},value:U,onChange:ce,options:I})]})}),(0,t.jsx)(L.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)(H.Z,{placeholder:"\u8BF7\u9009\u62E9\u7528\u9910\u65F6\u6BB5\uFF01",style:{width:"70%"},value:z,onChange:fe,options:at})]})}),(0,t.jsxs)(L.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 he()},children:"\u67E5\u8BE2"}),(0,t.jsx)(b.Z,{className:p()["echarts-card-btn"],style:{width:"100px"},onClick:function(){le([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"))]),ce(),fe(),j(1),F(10)},children:"\u91CD\u7F6E"})]})]})}),(0,t.jsx)(K.Z,{children:(0,t.jsxs)(J.Z,{tabPosition:"left",value:S,onChange:function(a){Y(a),A(0),j(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)(N.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)($.Z,{}),size:"middle",onClick:dt,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(M.Z,{columns:He,dataSource:we,pagination:{current:g,pageSize:R,total:W,onChange:j,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)(N.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)($.Z,{}),size:"middle",onClick:vt,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(M.Z,{columns:Qe,dataSource:Ye,pagination:{current:g,pageSize:R,total:W,onChange:j,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)(N.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)($.Z,{}),size:"middle",onClick:ct,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(M.Z,{columns:Xe,dataSource:ze,pagination:{current:g,pageSize:R,onChange:j,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)(N.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)($.Z,{}),size:"middle",onClick:mt,children:"\u62A5\u8868\u4E0B\u8F7D"})]}),(0,t.jsx)(M.Z,{columns:Je,dataSource:Me,pagination:{current:g,pageSize:R,total:W,onChange:j,onShowSizeChange:function(a,e){return F(e)}}})]})},4)]})})]}),We&&(0,t.jsx)(Ee,{createModalVisible:!0,values:ke||{},timeRange:D,onCancel:function(){re(!1),ie(void 0)}})]})}}}]);
|