Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

2 lignes
15 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[510,7975,1322],{7701:function(Q,P,i){"use strict";i.r(P),i.d(P,{default:function(){return E}});var H=i(2824),p=i(39428),W=i(34792),x=i(48086),l=i(3182),T=i(67294),O=i(78009),I=i(16894),te=i(71194),A=i(50146),N=i(57663),X=i(71577),ie=i(39002),q=i(68351),ue=i(63185),J=i(9676),oe=i(77883),U=i(85986),B=i(9715),j=i(71257),k=i(47673),y=i(4107),d=i(43358),V=i(34041),ne=i(14965),u=i(91774),n=i(33852),e=i(85893),a=u.Z.RangePicker,t=function(m){console.log("props",m);var Y=V.Z.Option,v=V.Z.OptGroup;return(0,e.jsx)(A.Z,{title:"\u8BBE\u7F6E\u53EF\u9884\u8BA2\u6570\u91CF",width:640,visible:m.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){m.onCancel()},destroyOnClose:!0,children:(0,e.jsxs)(j.Z,{labelCol:{span:4},layout:"horizontal",preserve:!1,initialValues:m.values,onFinish:m.onFinish,children:[(0,e.jsx)(j.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(y.Z,{})}),(0,e.jsx)(j.Z.Item,{name:"qty",label:"\u53EF\u9884\u8BA2\u6570\u91CF",rules:[{required:!0}],children:(0,e.jsx)(U.Z,{min:0,placeholder:"\u53EF\u9884\u8BA2\u6570\u91CF"})}),(0,e.jsx)(j.Z.Item,{name:"mealType",label:"\u53EF\u9884\u5B9A\u65F6\u6BB5",rules:[{required:!0}],children:(0,e.jsx)(J.Z.Group,{options:[{label:"\u65E9\u9910",value:"1"},{label:"\u5348\u9910",value:"2"},{label:"\u665A\u9910",value:"3"}]})}),(0,e.jsx)(j.Z.Item,{name:"startReserveTime",label:"\u5F00\u59CB\u65F6\u95F4",children:(0,e.jsx)(q.Z,{})}),(0,e.jsx)(j.Z.Item,{name:"endReserveTime",label:"\u7ED3\u675F\u65F6\u95F4",children:(0,e.jsx)(q.Z,{})}),(0,e.jsx)(j.Z.Item,{children:(0,e.jsx)(X.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},s=t,r=i(48971);function o(D){return c.apply(this,arguments)}function c(){return c=(0,l.Z)((0,p.Z)().mark(function D(m){return(0,p.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.abrupt("return",(0,r.WY)("/kitchen/api/Reservation/GetPage",{method:"Post",data:m}));case 1:case"end":return v.stop()}},D)})),c.apply(this,arguments)}function h(D){return g.apply(this,arguments)}function g(){return g=(0,l.Z)((0,p.Z)().mark(function D(m){return(0,p.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.abrupt("return",(0,r.WY)("/kitchen/api/Reservation/add",{method:"POST",data:m}));case 1:case"end":return v.stop()}},D)})),g.apply(this,arguments)}function b(D){return w.apply(this,arguments)}function w(){return w=(0,l.Z)((0,p.Z)().mark(function D(m){return(0,p.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.abrupt("return",(0,r.WY)("/kitchen/api/goods-type/goods-types",{method:"POST",data:m}));case 1:case"end":return v.stop()}},D)})),w.apply(this,arguments)}var z=i(30381),C=i.n(z),G=function(){var D=(0,l.Z)((0,p.Z)().mark(function m(Y){var v;return(0,p.Z)().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return console.log("fields",Y),v=x.default.loading("\u6B63\u5728\u8BBE\u7F6E\u53EF\u9884\u8BA2\u6570\u91CF"),R.prev=2,R.next=5,h({goodsId:Y.id,qty:Y.qty,mealType:Y.mealType,startReserveTime:Y.startReserveTime,endReserveTime:Y.endReserveTime}).then(function(_){_.data?x.default.success("\u8BBE\u7F6E\u53EF\u9884\u8BA2\u6570\u91CF\u6210\u529F"):x.default.error("\u8BBE\u7F6E\u53EF\u9884\u8BA2\u6570\u91CF\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")});case 5:return R.abrupt("return",!0);case 8:return R.prev=8,R.t0=R.catch(2),v(),R.abrupt("return",!1);case 12:case"end":return R.stop()}},m,null,[[2,8]])}));return function(Y){return D.apply(this,arguments)}}(),S=function(){var m=(0,T.useState)([]),Y=(0,H.Z)(m,2),v=Y[0],re=Y[1],R=(0,T.useState)(!1),_=(0,H.Z)(R,2),he=_[0],ae=_[1],ee=(0,T.useRef)(),fe=(0,T.useState)(),de=(0,H.Z)(fe,2),me=de[0],se=de[1],ve=(0,T.useState)([]),le=(0,H.Z)(ve,2),ge=le[0],pe=le[1];(0,T.useEffect)(function(){function L(){b({current:1,pageSize:1e3}).then(function(Z){var f=Z.data.data;f.forEach(function(M){M.text=M.goodsType_Name,M.goodsTypeId=M.id}),re(f)})}L()},[]);var ye=[{title:"\u4E3B\u952E",dataIndex:"id",hideInTable:!0,hideInSearch:!0},{title:"\u56FE\u7247\u5730\u5740",dataIndex:"imgUrl",hideInTable:!0,hideInSearch:!0},{title:"\u7F16\u7801",dataIndex:"code",valueType:"textarea"},{title:"\u540D\u79F0",dataIndex:"name",valueType:"textarea"},{title:"\u57FA\u7840\u4EF7\u683C",dataIndex:"price",hideInForm:!0,renderText:function(Z){return"".concat(Z,"\xA5")},hideInSearch:!0},{title:"\u4F1A\u5458\u4EF7",dataIndex:"vipPrice",hideInForm:!0,renderText:function(Z){return"".concat(Z,"\xA5")},hideInSearch:!0},{title:"\u5546\u54C1\u5C0F\u7C7B",dataIndex:"goodsTypeName",hideInForm:!0,hideInSearch:!0},{title:"\u5546\u54C1\u7C7B\u578B",dataIndex:"goodsTypeId",hideInForm:!0,hideInTable:!0,valueEnum:v},{title:"\u53EF\u9884\u8BA2\u6570\u91CF",dataIndex:"qty"},{title:"\u53EF\u9884\u5B9A\u65F6\u6BB5",dataIndex:"mealType",render:function(Z,f){var M="";if(f.mealType)for(var $=f.mealType.split(","),F=0;F<$.length;F++)$[F]==="1"&&(M+="[\u65E9\u9910]"),$[F]==="2"&&(M+="[\u5348\u9910]"),$[F]==="3"&&(M+="[\u665A\u9910]");return M}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(Z,f){return[(0,e.jsx)("a",{type:"primary",onClick:function(){ae(!0);var $=JSON.parse(JSON.stringify(f));$.startReserveTime?$.startReserveTime=$.startReserveTime=C()($.startReserveTime):$.startReserveTime=C()(C()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 00:00:00")),$.endReserveTime?$.endReserveTime=C()($.endReserveTime):$.endReserveTime=C()(C()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 23:59:59")),se($)},children:"\u8BBE\u7F6E\u53EF\u9884\u5B9A\u6570\u91CF"},"primary")]}}];return(0,e.jsxs)(O.ZP,{children:[(0,e.jsx)(I.ZP,{headerTitle:"\u67E5\u8BE2\u8868\u683C",actionRef:ee,rowKey:"id",search:{labelWidth:120},request:function(){var L=(0,l.Z)((0,p.Z)().mark(function Z(f){var M,$;return(0,p.Z)().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return M=[],f.goodsTypeId!=null&&(f.goodsTypeId=v[f.goodsTypeId].goodsTypeId),$=0,K.next=5,o(f).then(function(ce){M=ce.data.data,$=ce.data.total});case 5:return K.abrupt("return",{data:M,success:!0,total:$});case 6:case"end":return K.stop()}},Z)}));return function(Z){return L.apply(this,arguments)}}(),columns:ye,rowSelection:{onChange:function(Z,f){pe(f)}}}),(0,e.jsx)(s,{onFinish:function(){var L=(0,l.Z)((0,p.Z)().mark(function Z(f){var M;return(0,p.Z)().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return M=!1,typeof f.mealType=="object"&&(f.mealType=f.mealType.join()),console.log("\u8C03\u8BD5",f),f.startReserveTime=new Date(f.startReserveTime).toLocaleString(),f.endReserveTime=new Date(f.endReserveTime).toLocaleString(),F.next=7,G(f);case 7:M=F.sent,M&&(ae(!1),se(void 0),ee.current&&ee.current.reload()),ee.current.reload();case 10:case"end":return F.stop()}},Z)}));return function(Z){return L.apply(this,arguments)}}(),onCancel:function(){ae(!1),se(void 0)},createModalVisible:he,values:me||{}})]})},E=S},27484:function(Q){(function(P,i){Q.exports=i()})(this,function(){"use strict";var P=1e3,i=6e4,H=36e5,p="millisecond",W="second",x="minute",l="hour",T="day",O="week",I="month",te="quarter",A="year",N="date",X="Invalid Date",ie=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,q=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ue={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},J=function(u,n,e){var a=String(u);return!a||a.length>=n?u:""+Array(n+1-a.length).join(e)+u},oe={s:J,z:function(u){var n=-u.utcOffset(),e=Math.abs(n),a=Math.floor(e/60),t=e%60;return(n<=0?"+":"-")+J(a,2,"0")+":"+J(t,2,"0")},m:function u(n,e){if(n.date()<e.date())return-u(e,n);var a=12*(e.year()-n.year())+(e.month()-n.month()),t=n.clone().add(a,I),s=e-t<0,r=n.clone().add(a+(s?-1:1),I);return+(-(a+(e-t)/(s?t-r:r-t))||0)},a:function(u){return u<0?Math.ceil(u)||0:Math.floor(u)},p:function(u){return{M:I,y:A,w:O,d:T,D:N,h:l,m:x,s:W,ms:p,Q:te}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(u){return u===void 0}},U="en",B={};B[U]=ue;var j=function(u){return u instanceof V},k=function u(n,e,a){var t;if(!n)return U;if(typeof n=="string"){var s=n.toLowerCase();B[s]&&(t=s),e&&(B[s]=e,t=s);var r=n.split("-");if(!t&&r.length>1)return u(r[0])}else{var o=n.name;B[o]=n,t=o}return!a&&t&&(U=t),t||!a&&U},y=function(u,n){if(j(u))return u.clone();var e=typeof n=="object"?n:{};return e.date=u,e.args=arguments,new V(e)},d=oe;d.l=k,d.i=j,d.w=function(u,n){return y(u,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var V=function(){function u(e){this.$L=k(e.locale,null,!0),this.parse(e)}var n=u.prototype;return n.parse=function(e){this.$d=function(a){var t=a.date,s=a.utc;if(t===null)return new Date(NaN);if(d.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t=="string"&&!/Z$/i.test(t)){var r=t.match(ie);if(r){var o=r[2]-1||0,c=(r[7]||"0").substring(0,3);return s?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,c)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,c)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},n.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},n.$utils=function(){return d},n.isValid=function(){return this.$d.toString()!==X},n.isSame=function(e,a){var t=y(e);return this.startOf(a)<=t&&t<=this.endOf(a)},n.isAfter=function(e,a){return y(e)<this.startOf(a)},n.isBefore=function(e,a){return this.endOf(a)<y(e)},n.$g=function(e,a,t){return d.u(e)?this[a]:this.set(t,e)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(e,a){var t=this,s=!!d.u(a)||a,r=d.p(e),o=function(G,S){var E=d.w(t.$u?Date.UTC(t.$y,S,G):new Date(t.$y,S,G),t);return s?E:E.endOf(T)},c=function(G,S){return d.w(t.toDate()[G].apply(t.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(S)),t)},h=this.$W,g=this.$M,b=this.$D,w="set"+(this.$u?"UTC":"");switch(r){case A:return s?o(1,0):o(31,11);case I:return s?o(1,g):o(0,g+1);case O:var z=this.$locale().weekStart||0,C=(h<z?h+7:h)-z;return o(s?b-C:b+(6-C),g);case T:case N:return c(w+"Hours",0);case l:return c(w+"Minutes",1);case x:return c(w+"Seconds",2);case W:return c(w+"Milliseconds",3);default:return this.clone()}},n.endOf=function(e){return this.startOf(e,!1)},n.$set=function(e,a){var t,s=d.p(e),r="set"+(this.$u?"UTC":""),o=(t={},t[T]=r+"Date",t[N]=r+"Date",t[I]=r+"Month",t[A]=r+"FullYear",t[l]=r+"Hours",t[x]=r+"Minutes",t[W]=r+"Seconds",t[p]=r+"Milliseconds",t)[s],c=s===T?this.$D+(a-this.$W):a;if(s===I||s===A){var h=this.clone().set(N,1);h.$d[o](c),h.init(),this.$d=h.set(N,Math.min(this.$D,h.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},n.set=function(e,a){return this.clone().$set(e,a)},n.get=function(e){return this[d.p(e)]()},n.add=function(e,a){var t,s=this;e=Number(e);var r=d.p(a),o=function(g){var b=y(s);return d.w(b.date(b.date()+Math.round(g*e)),s)};if(r===I)return this.set(I,this.$M+e);if(r===A)return this.set(A,this.$y+e);if(r===T)return o(1);if(r===O)return o(7);var c=(t={},t[x]=i,t[l]=H,t[W]=P,t)[r]||1,h=this.$d.getTime()+e*c;return d.w(h,this)},n.subtract=function(e,a){return this.add(-1*e,a)},n.format=function(e){var a=this,t=this.$locale();if(!this.isValid())return t.invalidDate||X;var s=e||"YYYY-MM-DDTHH:mm:ssZ",r=d.z(this),o=this.$H,c=this.$m,h=this.$M,g=t.weekdays,b=t.months,w=function(S,E,D,m){return S&&(S[E]||S(a,s))||D[E].slice(0,m)},z=function(S){return d.s(o%12||12,S,"0")},C=t.meridiem||function(S,E,D){var m=S<12?"AM":"PM";return D?m.toLowerCase():m},G={YY:String(this.$y).slice(-2),YYYY:this.$y,M:h+1,MM:d.s(h+1,2,"0"),MMM:w(t.monthsShort,h,b,3),MMMM:w(b,h),D:this.$D,DD:d.s(this.$D,2,"0"),d:String(this.$W),dd:w(t.weekdaysMin,this.$W,g,2),ddd:w(t.weekdaysShort,this.$W,g,3),dddd:g[this.$W],H:String(o),HH:d.s(o,2,"0"),h:z(1),hh:z(2),a:C(o,c,!0),A:C(o,c,!1),m:String(c),mm:d.s(c,2,"0"),s:String(this.$s),ss:d.s(this.$s,2,"0"),SSS:d.s(this.$ms,3,"0"),Z:r};return s.replace(q,function(S,E){return E||G[S]||r.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(e,a,t){var s,r=d.p(a),o=y(e),c=(o.utcOffset()-this.utcOffset())*i,h=this-o,g=d.m(this,o);return g=(s={},s[A]=g/12,s[I]=g,s[te]=g/3,s[O]=(h-c)/6048e5,s[T]=(h-c)/864e5,s[l]=h/H,s[x]=h/i,s[W]=h/P,s)[r]||h,t?g:d.a(g)},n.daysInMonth=function(){return this.endOf(I).$D},n.$locale=function(){return B[this.$L]},n.locale=function(e,a){if(!e)return this.$L;var t=this.clone(),s=k(e,a,!0);return s&&(t.$L=s),t},n.clone=function(){return d.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},u}(),ne=V.prototype;return y.prototype=ne,[["$ms",p],["$s",W],["$m",x],["$H",l],["$W",T],["$M",I],["$y",A],["$D",N]].forEach(function(u){ne[u[1]]=function(n){return this.$g(n,u[0],u[1])}}),y.extend=function(u,n){return u.$i||(u(n,V,y),u.$i=!0),y},y.locale=k,y.isDayjs=j,y.unix=function(u){return y(1e3*u)},y.en=B[U],y.Ls=B,y.p={},y})},33852:function(Q,P,i){(function(H,p){Q.exports=p(i(27484))})(this,function(H){"use strict";function p(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var W=p(H),x={name:"zh-cn",weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(l,T){return T==="W"?l+"\u5468":l+"\u65E5"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524D",s:"\u51E0\u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},meridiem:function(l,T){var O=100*l+T;return O<600?"\u51CC\u6668":O<900?"\u65E9\u4E0A":O<1100?"\u4E0A\u5348":O<1300?"\u4E2D\u5348":O<1800?"\u4E0B\u5348":"\u665A\u4E0A"}};return W.default.locale(x,null,!0),x})}}]);