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.

p__card__checkgoods.5ceee314.async.js 15 KiB

1 年之前
1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[510,7975,1322],{7701:function(J,k,u){"use strict";u.r(k),u.d(k,{default:function(){return W}});var F=u(2824),S=u(39428),H=u(34792),x=u(48086),p=u(3182),D=u(67294),O=u(78009),I=u(16894),_=u(71194),L=u(50146),G=u(57663),K=u(71577),ae=u(63185),Q=u(9676),ie=u(77883),N=u(85986),se=u(9715),C=u(71257),A=u(47673),U=u(4107),V=u(43358),M=u(34041),d=u(14965),E=u(91774),ee=u(33852),r=u(85893),n=E.Z.RangePicker,e=function(v){console.log("props",v);var Y=M.Z.Option,h=M.Z.OptGroup;return(0,r.jsx)(L.Z,{title:"\u8BBE\u7F6E\u53EF\u9884\u8BA2\u6570\u91CF",width:640,visible:v.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){v.onCancel()},destroyOnClose:!0,children:(0,r.jsxs)(C.Z,{labelCol:{span:4},layout:"horizontal",preserve:!1,initialValues:v.values,onFinish:v.onFinish,children:[(0,r.jsx)(C.Z.Item,{name:"id",hidden:!0,children:(0,r.jsx)(U.Z,{})}),(0,r.jsx)(C.Z.Item,{name:"qty",label:"\u9884\u8BA2\u6570\u91CF",rules:[{required:!0}],children:(0,r.jsx)(N.Z,{min:0,placeholder:"\u9884\u8BA2\u6570\u91CF"})}),(0,r.jsx)(C.Z.Item,{name:"mealType",label:"\u7528\u9910\u65F6\u6BB5",rules:[{required:!0}],children:(0,r.jsx)(Q.Z.Group,{options:[{label:"\u65E9\u9910",value:"1"},{label:"\u5348\u9910",value:"2"},{label:"\u665A\u9910",value:"3"}]})}),(0,r.jsx)(C.Z.Item,{name:"week",label:"\u661F\u671F",rules:[{required:!0}],children:(0,r.jsx)(Q.Z.Group,{options:[{label:"\u4E00",value:"1"},{label:"\u4E8C",value:"2"},{label:"\u4E09",value:"3"},{label:"\u56DB",value:"4"},{label:"\u4E94",value:"5"},{label:"\u516D",value:"6"},{label:"\u65E5",value:"0"}]})}),(0,r.jsx)(C.Z.Item,{children:(0,r.jsx)(K.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},i=e,t=u(48971);function s(c){return a.apply(this,arguments)}function a(){return a=(0,p.Z)((0,S.Z)().mark(function c(v){return(0,S.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",(0,t.WY)("/kitchen/api/Reservation/GetPage",{method:"Post",data:v}));case 1:case"end":return h.stop()}},c)})),a.apply(this,arguments)}function o(c){return y.apply(this,arguments)}function y(){return y=(0,p.Z)((0,S.Z)().mark(function c(v){return(0,S.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",(0,t.WY)("/kitchen/api/Reservation/add",{method:"POST",data:v}));case 1:case"end":return h.stop()}},c)})),y.apply(this,arguments)}function $(c){return T.apply(this,arguments)}function T(){return T=(0,p.Z)((0,S.Z)().mark(function c(v){return(0,S.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",(0,t.WY)("/kitchen/api/goods-type/goods-types",{method:"POST",data:v}));case 1:case"end":return h.stop()}},c)})),T.apply(this,arguments)}var R=u(30381),w=u.n(R),P=function(){var c=(0,p.Z)((0,S.Z)().mark(function v(Y){var h;return(0,S.Z)().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return console.log("fields",Y),h=x.default.loading("\u6B63\u5728\u8BBE\u7F6E\u53EF\u9884\u8BA2\u6570\u91CF"),j.prev=2,j.next=5,o({goodsId:Y.id,qty:Y.qty,mealType:Y.mealType,week:Y.week}).then(function(X){X.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 j.abrupt("return",!0);case 8:return j.prev=8,j.t0=j.catch(2),h(),j.abrupt("return",!1);case 12:case"end":return j.stop()}},v,null,[[2,8]])}));return function(Y){return c.apply(this,arguments)}}(),B=function(){var v=(0,D.useState)([]),Y=(0,F.Z)(v,2),h=Y[0],te=Y[1],j=(0,D.useState)(!1),X=(0,F.Z)(j,2),de=X[0],ne=X[1],q=(0,D.useRef)(),ce=(0,D.useState)(),ue=(0,F.Z)(ce,2),fe=ue[0],re=ue[1],he=(0,D.useState)([]),oe=(0,F.Z)(he,2),pe=oe[0],me=oe[1];(0,D.useEffect)(function(){function b(){$({current:1,pageSize:1e3}).then(function(Z){var m=Z.data.data;m.forEach(function(f){f.text=f.goodsType_Name,f.goodsTypeId=f.id}),te(m)})}b()},[]);var ve=[{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:h},{title:"\u9884\u8BA2\u6570\u91CF",dataIndex:"qty"},{title:"\u7528\u9910\u65F6\u6BB5",dataIndex:"mealType",render:function(Z,m){var f="";if(m.mealType)for(var l=m.mealType.split(","),g=0;g<l.length;g++)l[g]==="1"&&(f+="[\u65E9\u9910]"),l[g]==="2"&&(f+="[\u5348\u9910]"),l[g]==="3"&&(f+="[\u665A\u9910]");return f}},{title:"\u661F\u671F",dataIndex:"week",render:function(Z,m){var f="";if(m.week)for(var l=m.week.split(","),g=0;g<l.length;g++)l[g]==="1"&&(f+="[\u4E00]"),l[g]==="2"&&(f+="[\u4E8C]"),l[g]==="3"&&(f+="[\u4E09]"),l[g]==="4"&&(f+="[\u56DB]"),l[g]==="5"&&(f+="[\u4E94]"),l[g]==="6"&&(f+="[\u516D]"),l[g]==="0"&&(f+="[\u65E5]");return f}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(Z,m){return[(0,r.jsx)("a",{type:"primary",onClick:function(){ne(!0);var l=JSON.parse(JSON.stringify(m));l.startReserveTime?l.startReserveTime=l.startReserveTime=w()(l.startReserveTime):l.startReserveTime=w()(w()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 00:00:00")),l.endReserveTime?l.endReserveTime=w()(l.endReserveTime):l.endReserveTime=w()(w()(new Date(Date.now()+24*60*60*1e3)).format("YYYY-MM-DD 23:59:59")),re(l)},children:"\u8BBE\u7F6E\u53EF\u9884\u5B9A\u6570\u91CF"},"primary")]}}];return(0,r.jsxs)(O.ZP,{children:[(0,r.jsx)(I.ZP,{headerTitle:"\u67E5\u8BE2\u8868\u683C",actionRef:q,rowKey:"id",search:{labelWidth:120},request:function(){var b=(0,p.Z)((0,S.Z)().mark(function Z(m){var f,l;return(0,S.Z)().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return f=[],m.goodsTypeId!=null&&(m.goodsTypeId=h[m.goodsTypeId].goodsTypeId),l=0,z.next=5,s(m).then(function(le){f=le.data.data,l=le.data.total});case 5:return z.abrupt("return",{data:f,success:!0,total:l});case 6:case"end":return z.stop()}},Z)}));return function(Z){return b.apply(this,arguments)}}(),columns:ve,rowSelection:{onChange:function(Z,m){me(m)}}}),(0,r.jsx)(i,{onFinish:function(){var b=(0,p.Z)((0,S.Z)().mark(function Z(m){var f;return(0,S.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return f=!1,typeof m.mealType=="object"&&(m.mealType=m.mealType.join()),typeof m.week=="object"&&(m.week=m.week.join()),console.log("\u8C03\u8BD5",m),g.next=6,P(m);case 6:f=g.sent,f&&(ne(!1),re(void 0),q.current&&q.current.reload()),q.current.reload();case 9:case"end":return g.stop()}},Z)}));return function(Z){return b.apply(this,arguments)}}(),onCancel:function(){ne(!1),re(void 0)},createModalVisible:de,values:fe||{}})]})},W=B},27484:function(J){(function(k,u){J.exports=u()})(this,function(){"use strict";var k=1e3,u=6e4,F=36e5,S="millisecond",H="second",x="minute",p="hour",D="day",O="week",I="month",_="quarter",L="year",G="date",K="Invalid Date",ae=/^(\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,ie={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("_")},N=function(r,n,e){var i=String(r);return!i||i.length>=n?r:""+Array(n+1-i.length).join(e)+r},se={s:N,z:function(r){var n=-r.utcOffset(),e=Math.abs(n),i=Math.floor(e/60),t=e%60;return(n<=0?"+":"-")+N(i,2,"0")+":"+N(t,2,"0")},m:function r(n,e){if(n.date()<e.date())return-r(e,n);var i=12*(e.year()-n.year())+(e.month()-n.month()),t=n.clone().add(i,I),s=e-t<0,a=n.clone().add(i+(s?-1:1),I);return+(-(i+(e-t)/(s?t-a:a-t))||0)},a:function(r){return r<0?Math.ceil(r)||0:Math.floor(r)},p:function(r){return{M:I,y:L,w:O,d:D,D:G,h:p,m:x,s:H,ms:S,Q:_}[r]||String(r||"").toLowerCase().replace(/s$/,"")},u:function(r){return r===void 0}},C="en",A={};A[C]=ie;var U=function(r){return r instanceof E},V=function r(n,e,i){var t;if(!n)return C;if(typeof n=="string"){var s=n.toLowerCase();A[s]&&(t=s),e&&(A[s]=e,t=s);var a=n.split("-");if(!t&&a.length>1)return r(a[0])}else{var o=n.name;A[o]=n,t=o}return!i&&t&&(C=t),t||!i&&C},M=function(r,n){if(U(r))return r.clone();var e=typeof n=="object"?n:{};return e.date=r,e.args=arguments,new E(e)},d=se;d.l=V,d.i=U,d.w=function(r,n){return M(r,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var E=function(){function r(e){this.$L=V(e.locale,null,!0),this.parse(e)}var n=r.prototype;return n.parse=function(e){this.$d=function(i){var t=i.date,s=i.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 a=t.match(ae);if(a){var o=a[2]-1||0,y=(a[7]||"0").substring(0,3);return s?new Date(Date.UTC(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,y)):new Date(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,y)}}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()!==K},n.isSame=function(e,i){var t=M(e);return this.startOf(i)<=t&&t<=this.endOf(i)},n.isAfter=function(e,i){return M(e)<this.startOf(i)},n.isBefore=function(e,i){return this.endOf(i)<M(e)},n.$g=function(e,i,t){return d.u(e)?this[i]:this.set(t,e)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(e,i){var t=this,s=!!d.u(i)||i,a=d.p(e),o=function(W,c){var v=d.w(t.$u?Date.UTC(t.$y,c,W):new Date(t.$y,c,W),t);return s?v:v.endOf(D)},y=function(W,c){return d.w(t.toDate()[W].apply(t.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(c)),t)},$=this.$W,T=this.$M,R=this.$D,w="set"+(this.$u?"UTC":"");switch(a){case L:return s?o(1,0):o(31,11);case I:return s?o(1,T):o(0,T+1);case O:var P=this.$locale().weekStart||0,B=($<P?$+7:$)-P;return o(s?R-B:R+(6-B),T);case D:case G:return y(w+"Hours",0);case p:return y(w+"Minutes",1);case x:return y(w+"Seconds",2);case H:return y(w+"Milliseconds",3);default:return this.clone()}},n.endOf=function(e){return this.startOf(e,!1)},n.$set=function(e,i){var t,s=d.p(e),a="set"+(this.$u?"UTC":""),o=(t={},t[D]=a+"Date",t[G]=a+"Date",t[I]=a+"Month",t[L]=a+"FullYear",t[p]=a+"Hours",t[x]=a+"Minutes",t[H]=a+"Seconds",t[S]=a+"Milliseconds",t)[s],y=s===D?this.$D+(i-this.$W):i;if(s===I||s===L){var $=this.clone().set(G,1);$.$d[o](y),$.init(),this.$d=$.set(G,Math.min(this.$D,$.daysInMonth())).$d}else o&&this.$d[o](y);return this.init(),this},n.set=function(e,i){return this.clone().$set(e,i)},n.get=function(e){return this[d.p(e)]()},n.add=function(e,i){var t,s=this;e=Number(e);var a=d.p(i),o=function(T){var R=M(s);return d.w(R.date(R.date()+Math.round(T*e)),s)};if(a===I)return this.set(I,this.$M+e);if(a===L)return this.set(L,this.$y+e);if(a===D)return o(1);if(a===O)return o(7);var y=(t={},t[x]=u,t[p]=F,t[H]=k,t)[a]||1,$=this.$d.getTime()+e*y;return d.w($,this)},n.subtract=function(e,i){return this.add(-1*e,i)},n.format=function(e){var i=this,t=this.$locale();if(!this.isValid())return t.invalidDate||K;var s=e||"YYYY-MM-DDTHH:mm:ssZ",a=d.z(this),o=this.$H,y=this.$m,$=this.$M,T=t.weekdays,R=t.months,w=function(c,v,Y,h){return c&&(c[v]||c(i,s))||Y[v].slice(0,h)},P=function(c){return d.s(o%12||12,c,"0")},B=t.meridiem||function(c,v,Y){var h=c<12?"AM":"PM";return Y?h.toLowerCase():h},W={YY:String(this.$y).slice(-2),YYYY:this.$y,M:$+1,MM:d.s($+1,2,"0"),MMM:w(t.monthsShort,$,R,3),MMMM:w(R,$),D:this.$D,DD:d.s(this.$D,2,"0"),d:String(this.$W),dd:w(t.weekdaysMin,this.$W,T,2),ddd:w(t.weekdaysShort,this.$W,T,3),dddd:T[this.$W],H:String(o),HH:d.s(o,2,"0"),h:P(1),hh:P(2),a:B(o,y,!0),A:B(o,y,!1),m:String(y),mm:d.s(y,2,"0"),s:String(this.$s),ss:d.s(this.$s,2,"0"),SSS:d.s(this.$ms,3,"0"),Z:a};return s.replace(Q,function(c,v){return v||W[c]||a.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(e,i,t){var s,a=d.p(i),o=M(e),y=(o.utcOffset()-this.utcOffset())*u,$=this-o,T=d.m(this,o);return T=(s={},s[L]=T/12,s[I]=T,s[_]=T/3,s[O]=($-y)/6048e5,s[D]=($-y)/864e5,s[p]=$/F,s[x]=$/u,s[H]=$/k,s)[a]||$,t?T:d.a(T)},n.daysInMonth=function(){return this.endOf(I).$D},n.$locale=function(){return A[this.$L]},n.locale=function(e,i){if(!e)return this.$L;var t=this.clone(),s=V(e,i,!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()},r}(),ee=E.prototype;return M.prototype=ee,[["$ms",S],["$s",H],["$m",x],["$H",p],["$W",D],["$M",I],["$y",L],["$D",G]].forEach(function(r){ee[r[1]]=function(n){return this.$g(n,r[0],r[1])}}),M.extend=function(r,n){return r.$i||(r(n,E,M),r.$i=!0),M},M.locale=V,M.isDayjs=U,M.unix=function(r){return M(1e3*r)},M.en=A[C],M.Ls=A,M.p={},M})},33852:function(J,k,u){(function(F,S){J.exports=S(u(27484))})(this,function(F){"use strict";function S(p){return p&&typeof p=="object"&&"default"in p?p:{default:p}}var H=S(F),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(p,D){return D==="W"?p+"\u5468":p+"\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(p,D){var O=100*p+D;return O<600?"\u51CC\u6668":O<900?"\u65E9\u4E0A":O<1100?"\u4E0A\u5348":O<1300?"\u4E2D\u5348":O<1800?"\u4E0B\u5348":"\u665A\u4E0A"}};return H.default.locale(x,null,!0),x})}}]);