選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

2 行
7.6 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2522,7975,1322,1793,7005,3042,3721,607,8863,1587,4001],{59314:function(P){P.exports={"welcome-head":"welcome-head___sqI6D","welcome-head-org":"welcome-head-org___2svCy","echarts-card-choose":"echarts-card-choose___1Ygxt","my-loading":"my-loading___1lMfA","device-list":"device-list___3WSGp","my-range-picker":"my-range-picker___1EI6E","tabs-title":"tabs-title___1-qjz"}},73397:function(P,R,e){"use strict";e.r(R),e.d(R,{default:function(){return fe}});var Ve=e(66456),ee=e(15711),We=e(49111),te=e(19650),we=e(58024),E=e(91894),Ke=e(13062),ae=e(71230),He=e(57663),N=e(71577),Je=e(89032),z=e(15746),Qe=e(20228),ne=e(11382),g=e(39428),T=e(3182),o=e(2824),Ue=e(18106),B=e(60561),Xe=e(14965),re=e(91774),s=e(67294),se=e(30381),u=e.n(se),M=e(48971),G={GetDayConsumeInfo:function(i){return(0,M.WY)("/kitchen/api/Reservation/GetDayConsumeInfo",{method:"POST",data:i})},GetDayConsumeDetailed:function(i){return(0,M.WY)("/kitchen/api/Reservation/GetDayConsumeDetailed",{method:"POST",data:i})},GetDeparent:function(i){return(0,M.WY)("/kitchen/api/member-tag/member-tag",{method:"POST",data:i})}},ie=e(59314),c=e.n(ie),le=e(78009),be=e(71194),oe=e(50146),ue=e(16894),t=e(85893),de=function(i){var D=[{title:"\u7528\u9910\u90E8\u95E8",dataIndex:"mname"},{title:"\u7528\u9910\u4EBA\u5458",dataIndex:"nickName"},{title:"\u7528\u9910\u65F6\u6BB5",dataIndex:"timeInterval",render:function(p,d){if(d.timeInterval==="1")return"\u65E9\u9910";if(d.timeInterval==="2")return"\u5348\u9910";if(d.timeInterval==="3")return"\u665A\u9910"}},{title:"\u7528\u9910\u65F6\u95F4",dataIndex:"createAt"}];return(0,t.jsx)(oe.Z,{title:"\u67E5\u770B\u7528\u9910\u8BE6\u60C5",width:640,visible:i.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){i.onCancel()},destroyOnClose:!0,children:(0,t.jsx)(ue.ZP,{headerTitle:"\u67E5\u770B\u7528\u9910\u8BE6\u60C5",rowKey:"id",pag:!0,search:!1,request:function(){var C=(0,T.Z)((0,g.Z)().mark(function p(d){var v,f;return(0,g.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return v=[],f=0,d.startTime=i.timeRange[0]._i,d.endTime=i.timeRange[1]._i,d.orgName=i.values.mname,d.timeInterval=i.values.timeInterval,m.next=8,G.GetDayConsumeDetailed(d).then(function(Z){v=Z.data.data,f=Z.data.total});case 8:return m.abrupt("return",{data:v,success:!0,total:f});case 9:case"end":return m.stop()}},p)}));return function(p){return C.apply(this,arguments)}}(),columns:D,pagination:{defaultPageSize:9e3,showSizeChanger:!0}})})},ce=de,me=re.Z.RangePicker,ve=B.Z.TabPane,fe=function(){var x=(0,s.useState)(1),i=(0,o.Z)(x,2),D=i[0],C=i[1],p=(0,s.useState)(1),d=(0,o.Z)(p,2),v=d[0],f=d[1],F=(0,s.useState)(50),m=(0,o.Z)(F,2),Z=m[0],L=m[1],he=(0,s.useState)(0),$=(0,o.Z)(he,2),ge=$[0],A=$[1],De=(0,s.useState)([]),O=(0,o.Z)(De,2),ye=O[0],Se=O[1],xe=(0,s.useState)(!1),V=(0,o.Z)(xe,2),Ce=V[0],W=V[1],pe=(0,s.useState)(),w=(0,o.Z)(pe,2),Ze=w[0],K=w[1],Ie=(0,s.useState)(!1),H=(0,o.Z)(Ie,2),je=H[0],J=H[1],Ye=(0,s.useState)([u()(u()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 00:00:00")),u()(u()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 23:59:59"))]),Q=(0,o.Z)(Ye,2),I=Q[0],U=Q[1],Te=[{title:"\u7528\u9910\u90E8\u95E8",dataIndex:"mname"},{title:"\u7528\u9910\u65F6\u6BB5",dataIndex:"timeInterval",render:function(n,a){if(a.timeInterval==="1")return"\u65E9\u9910";if(a.timeInterval==="2")return"\u5348\u9910";if(a.timeInterval==="3")return"\u665A\u9910"}},{title:"\u7528\u9910\u6570\u91CF",dataIndex:"sumqty",sortDirections:["ascend","descend"],sorter:function(n,a){return n.value-a.value}},{title:"\u9884\u5B9A\u90E8\u95E8",dataIndex:"orgName"},{title:"\u9884\u5B9A\u4EBA\u5458",dataIndex:"nickName"},{title:"\u9884\u5B9A\u7528\u9910\u65F6\u6BB5",dataIndex:"mealType",render:function(n,a){if(a.mealType==="1")return"\u65E9\u9910";if(a.mealType==="2")return"\u5348\u9910";if(a.mealType==="3")return"\u665A\u9910"}},{title:"\u9884\u5B9A\u6570\u91CF",dataIndex:"rqty",sortDirections:["ascend","descend"],sorter:function(n,a){return n.value-a.value}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(n,a){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("a",{onClick:function(){J(!0),K(a)},children:"\u67E5\u770B\u8BE6\u60C5"})})}}];(0,s.useEffect)(function(){X()},[D,v]);var X=function(){var n=Pe.find(function(l){return l.value===Ne}),a={startTime:I[0]._i,endTime:I[1]._i,orgName:(n==null?void 0:n.label)||"",mealType:Le||"",current:v,pageSize:Z};D==1&&Me(a)},Me=function(){var r=(0,T.Z)((0,g.Z)().mark(function n(a){var l,y;return(0,g.Z)().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return W(!0),S.next=3,G.GetDayConsumeInfo(a);case 3:l=S.sent,W(!1),l.succeeded?(y=l.data.data.sort(function(h,Y){return Y.value-h.value}),A(l.data.total),Se(y)):console.log("Message:",l.msg||"\u83B7\u53D6\u9884\u5B9A\u5546\u54C1\u5931\u8D25");case 6:case"end":return S.stop()}},n)}));return function(a){return r.apply(this,arguments)}}(),Ge=(0,s.useState)([]),b=(0,o.Z)(Ge,2),Pe=b[0],Re=b[1],Ee=(0,s.useState)(),k=(0,o.Z)(Ee,2),Ne=k[0],ze=k[1],Be=(0,s.useState)([{value:1,label:"\u65E9\u9910"},{value:2,label:"\u4E2D\u9910"},{value:3,label:"\u665A\u9910"}]),q=(0,o.Z)(Be,2),ke=q[0],qe=q[1],Fe=(0,s.useState)(),_=(0,o.Z)(Fe,2),Le=_[0],$e=_[1],Ae=function(){var r=(0,T.Z)((0,g.Z)().mark(function n(){var a,l,y,j;return(0,g.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,G.GetDeparent({current:1,pageSize:9999,platformType:"4"});case 2:a=h.sent,a.statusCode===200&&(j=[],(l=a.data)===null||l===void 0||(y=l.data)===null||y===void 0||y.forEach(function(Y){j.push({label:Y.name,value:Y.id})}),Re(j));case 4:case"end":return h.stop()}},n)}));return function(){return r.apply(this,arguments)}}(),Oe=function(){return(0,t.jsx)(ne.Z,{className:c()["my-loading"],size:"large"})};return(0,s.useEffect)(function(){Ae()},[]),(0,t.jsxs)(le.ZP,{children:[(0,t.jsxs)("div",{className:c()["welcome-container"],children:[Ce?(0,t.jsx)(Oe,{}):null,(0,t.jsx)(E.Z,{style:{marginBottom:"30px"},children:(0,t.jsxs)(ae.Z,{children:[(0,t.jsx)(z.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:(0,t.jsxs)("div",{className:c()["echarts-card-choose"],children:[(0,t.jsx)("div",{className:c()["echarts-card-choose-text"],children:"\u8D77\u6B62\u65F6\u95F4\uFF1A"}),(0,t.jsx)(me,{style:{width:"70%"},className:c()["my-range-picker"],value:I,onChange:function(n,a){var l=[u()(u()(new Date(a[0])).format("YYYY-MM-DD 00:00:00")),u()(u()(new Date(a[1])).format("YYYY-MM-DD 23:59:59"))];U(l)}})]})}),(0,t.jsxs)(z.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:[(0,t.jsx)(N.Z,{className:c()["echarts-card-btn"],type:"primary",style:{width:"100px",marginRight:"10px"},onClick:function(){return X()},children:"\u67E5\u8BE2"}),(0,t.jsx)(N.Z,{className:c()["echarts-card-btn"],style:{width:"100px"},onClick:function(){U([u()(u()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 00:00:00")),u()(u()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 23:59:59"))]),ze(),$e(),f(1),L(10)},children:"\u91CD\u7F6E"})]})]})}),(0,t.jsx)(E.Z,{children:(0,t.jsx)(B.Z,{tabPosition:"left",value:D,onChange:function(n){C(n),A(0),f(1)},children:(0,t.jsx)(ve,{tab:"\u7528\u9910\u60C5\u51B5",children:D==1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(te.Z,{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:(0,t.jsx)("div",{className:c()["tabs-title"],children:"\u7528\u9910\u60C5\u51B5"})}),(0,t.jsx)(ee.Z,{columns:Te,dataSource:ye,pagination:{current:v,pageSize:Z,total:ge,onChange:f,onShowSizeChange:function(n,a){return L(a)}}})]})},1)})})]}),je&&(0,t.jsx)(ce,{createModalVisible:!0,values:Ze||{},timeRange:I,onCancel:function(){J(!1),K(void 0)}})]})}}}]);