25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

2 satır
7.5 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2522,1322,8821,3416,3729,2320,2359,858],{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,E,e){"use strict";e.r(E),e.d(E,{default:function(){return he}});var We=e(66456),ee=e(61128),we=e(49111),te=e(19650),Ke=e(58024),N=e(91894),He=e(13062),ae=e(71230),Je=e(57663),R=e(71577),Qe=e(89032),z=e(15746),Ue=e(20228),ne=e(11382),T=e(3182),o=e(2824),Xe=e(18106),B=e(51752),be=e(14965),re=e(91774),se=e(94043),g=e.n(se),s=e(67294),le=e(30381),u=e.n(le),M=e(48971),G={GetDayConsumeInfo:function(l){return(0,M.WY)("/kitchen/api/Reservation/GetDayConsumeInfo",{method:"POST",data:l})},GetDayConsumeDetailed:function(l){return(0,M.WY)("/kitchen/api/Reservation/GetDayConsumeDetailed",{method:"POST",data:l})},GetDeparent:function(l){return(0,M.WY)("/kitchen/api/member-tag/member-tag",{method:"POST",data:l})}},ie=e(59314),c=e.n(ie),oe=e(78009),ke=e(71194),ue=e(50146),de=e(16894),t=e(85893),ce=function(l){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)(ue.Z,{title:"\u67E5\u770B\u7528\u9910\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\u7528\u9910\u8BE6\u60C5",rowKey:"id",pag:!0,search:!1,request:function(){var C=(0,T.Z)(g().mark(function p(d){var v,f;return g().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return v=[],f=0,d.startTime=l.timeRange[0]._i,d.endTime=l.timeRange[1]._i,d.orgName=l.values.mname,d.timeInterval=l.values.timeInterval,m.next=8,G.GetDayConsumeDetailed(d).then(function(I){v=I.data.data,f=I.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}})})},me=ce,ve=re.Z.RangePicker,fe=B.Z.TabPane,he=function(){var x=(0,s.useState)(1),l=(0,o.Z)(x,2),D=l[0],C=l[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),I=m[0],L=m[1],ge=(0,s.useState)(0),$=(0,o.Z)(ge,2),De=$[0],A=$[1],ye=(0,s.useState)([]),O=(0,o.Z)(ye,2),Se=O[0],xe=O[1],Ce=(0,s.useState)(!1),V=(0,o.Z)(Ce,2),pe=V[0],W=V[1],Ie=(0,s.useState)(),w=(0,o.Z)(Ie,2),Ze=w[0],K=w[1],je=(0,s.useState)(!1),H=(0,o.Z)(je,2),Ye=H[0],J=H[1],Te=(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)(Te,2),Z=Q[0],U=Q[1],Me=[{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=Ee.find(function(i){return i.value===ze}),a={startTime:Z[0]._i,endTime:Z[1]._i,orgName:(n==null?void 0:n.label)||"",mealType:$e||"",current:v,pageSize:I};D==1&&Ge(a)},Ge=function(){var r=(0,T.Z)(g().mark(function n(a){var i,y;return g().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return W(!0),S.next=3,G.GetDayConsumeInfo(a);case 3:i=S.sent,W(!1),i.succeeded?(y=i.data.data.sort(function(h,Y){return Y.value-h.value}),A(i.data.total),xe(y)):console.log("Message:",i.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)}}(),Pe=(0,s.useState)([]),b=(0,o.Z)(Pe,2),Ee=b[0],Ne=b[1],Re=(0,s.useState)(),k=(0,o.Z)(Re,2),ze=k[0],Be=k[1],Fe=(0,s.useState)([{value:1,label:"\u65E9\u9910"},{value:2,label:"\u4E2D\u9910"},{value:3,label:"\u665A\u9910"}]),q=(0,o.Z)(Fe,2),qe=q[0],_e=q[1],Le=(0,s.useState)(),_=(0,o.Z)(Le,2),$e=_[0],Ae=_[1],Oe=function(){var r=(0,T.Z)(g().mark(function n(){var a,i,y,j;return g().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=[],(i=a.data)===null||i===void 0||(y=i.data)===null||y===void 0||y.forEach(function(Y){j.push({label:Y.name,value:Y.id})}),Ne(j));case 4:case"end":return h.stop()}},n)}));return function(){return r.apply(this,arguments)}}(),Ve=function(){return(0,t.jsx)(ne.Z,{className:c()["my-loading"],size:"large"})};return(0,s.useEffect)(function(){Oe()},[]),(0,t.jsxs)(oe.ZP,{children:[(0,t.jsxs)("div",{className:c()["welcome-container"],children:[pe?(0,t.jsx)(Ve,{}):null,(0,t.jsx)(N.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)(ve,{style:{width:"70%"},className:c()["my-range-picker"],value:Z,onChange:function(n,a){var i=[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(i)}})]})}),(0,t.jsxs)(z.Z,{xs:24,sm:12,md:12,lg:12,xl:6,style:{margin:"10px 0"},children:[(0,t.jsx)(R.Z,{className:c()["echarts-card-btn"],type:"primary",style:{width:"100px",marginRight:"10px"},onClick:function(){return X()},children:"\u67E5\u8BE2"}),(0,t.jsx)(R.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"))]),Be(),Ae(),f(1),L(10)},children:"\u91CD\u7F6E"})]})]})}),(0,t.jsx)(N.Z,{children:(0,t.jsx)(B.Z,{tabPosition:"left",value:D,onChange:function(n){C(n),A(0),f(1)},children:(0,t.jsx)(fe,{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:Me,dataSource:Se,pagination:{current:v,pageSize:I,total:De,onChange:f,onShowSizeChange:function(n,a){return L(a)}}})]})},1)})})]}),Ye&&(0,t.jsx)(me,{createModalVisible:!0,values:Ze||{},timeRange:Z,onCancel:function(){J(!1),K(void 0)}})]})}}}]);