25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
8.8 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8340],{70271:function(G,F,e){"use strict";var t=e(28991),l=e(81253),Z=e(85893),v=e(67294),P=e(31649),C=["fieldProps","proFieldProps"],g=function(h,y){var x=h.fieldProps,c=h.proFieldProps,p=(0,l.Z)(h,C);return(0,Z.jsx)(P.Z,(0,t.Z)({valueType:"digitRange",fieldProps:(0,t.Z)({},x),ref:y,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:c},p))};F.Z=v.forwardRef(g)},64317:function(G,F,e){"use strict";var t=e(28991),l=e(81253),Z=e(85893),v=e(22270),P=e(67294),C=e(66758),g=e(31649),T=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],h=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],y=P.forwardRef(function(n,k){var j=n.fieldProps,M=n.children,b=n.params,R=n.proFieldProps,I=n.mode,W=n.valueEnum,r=n.request,A=n.showSearch,B=n.options,D=(0,l.Z)(n,T),L=(0,P.useContext)(C.Z);return(0,Z.jsx)(g.Z,(0,t.Z)((0,t.Z)({valueEnum:(0,v.h)(W),request:r,params:b,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,t.Z)({options:B,mode:I,showSearch:A,getPopupContainer:L.getPopupContainer},j),ref:k,proFieldProps:R},D),{},{children:M}))}),x=P.forwardRef(function(n,k){var j=n.fieldProps,M=n.children,b=n.params,R=n.proFieldProps,I=n.mode,W=n.valueEnum,r=n.request,A=n.options,B=(0,l.Z)(n,h),D=(0,t.Z)({options:A,mode:I||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},j),L=(0,P.useContext)(C.Z);return(0,Z.jsx)(g.Z,(0,t.Z)((0,t.Z)({valueEnum:(0,v.h)(W),request:r,params:b,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,t.Z)({getPopupContainer:L.getPopupContainer},D),ref:k,proFieldProps:R},B),{},{children:M}))}),c=y,p=x,E=c;E.SearchSelect=p,E.displayName="ProFormComponent",F.Z=E},5966:function(G,F,e){"use strict";var t=e(28991),l=e(81253),Z=e(85893),v=e(31649),P=["fieldProps","proFieldProps"],C=["fieldProps","proFieldProps"],g="text",T=function(c){var p=c.fieldProps,E=c.proFieldProps,n=(0,l.Z)(c,P);return(0,Z.jsx)(v.Z,(0,t.Z)({valueType:g,fieldProps:p,filedConfig:{valueType:g},proFieldProps:E},n))},h=function(c){var p=c.fieldProps,E=c.proFieldProps,n=(0,l.Z)(c,C);return(0,Z.jsx)(v.Z,(0,t.Z)({valueType:"password",fieldProps:p,proFieldProps:E,filedConfig:{valueType:g}},n))},y=T;y.Password=h,y.displayName="ProFormComponent",F.Z=y},83454:function(G,F,e){"use strict";e.r(F),e.d(F,{default:function(){return oe}});var t=e(39428),l=e(3182),Z=e(34792),v=e(48086),P=e(57663),C=e(71577),g=e(71194),T=e(50146),h=e(2824),y=e(58024),x=e(91894),c=e(49101),p=e(67294),E=e(78009),n=e(16894),k=e(43358),j=e(34041),M=e(952),b=e(24739),R=e(70271),I=e(64317),W=e(5966),r=e(85893),A=function(i){var S=j.Z.Option,o=j.Z.OptGroup,V=[];return(0,r.jsx)(T.Z,{title:i.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:i.modalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){i.onCancel()},destroyOnClose:!0,children:(0,r.jsx)("div",{style:{padding:24},children:(0,r.jsx)(M.ZP,{layout:"Horizontal",onValuesChange:function(N,U){},onFinish:function(){var O=(0,l.Z)((0,t.Z)().mark(function N(U){return(0,t.Z)().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.abrupt("return",i.onFinish(U));case 1:case"end":return K.stop()}},N)}));return function(N){return O.apply(this,arguments)}}(),children:(0,r.jsxs)(b.UW,{children:[(0,r.jsx)(R.Z,{label:"\u684C\u53F7\u8303\u56F4",placeholder:"\u8BF7\u8F93\u5165\u684C\u53F7\u8303\u56F4",name:"numbers",min:1,rules:[{required:!0}]}),(0,r.jsx)(I.Z,{label:"\u6392\u9664\u684C\u53F7",mode:"tags",placeholder:"\u8BF7\u8F93\u5165\u6392\u9664\u7684\u684C\u53F7",name:"excludeNumber",width:"md"}),(0,r.jsx)(W.Z,{name:"code",label:"\u684C\u53F0\u7801\u524D\u7F00",placeholder:"\u8BF7\u8F93\u5165\u684C\u53F0\u7801\u524D\u7F00",rules:[{max:2}]}),(0,r.jsx)(I.Z,{label:"\u9002\u7528\u5E97\u94FA",mode:"multiple",placeholder:"\u8BF7\u9009\u62E9\u5E97\u94FA",name:"storeIds",width:"md",valueEnum:i.storeInfoList})]})})})})},B=A,D=e(48971);function L(m){return z.apply(this,arguments)}function z(){return z=(0,l.Z)((0,t.Z)().mark(function m(i){return(0,t.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,D.WY)("/kitchen/api/store-desktop-number-app-server/page",{method:"POST",data:i}));case 1:case"end":return o.stop()}},m)})),z.apply(this,arguments)}function q(m){return Y.apply(this,arguments)}function Y(){return Y=(0,l.Z)((0,t.Z)().mark(function m(i){return(0,t.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,D.WY)("/kitchen/api/store-desktop-number-app-server",{method:"POST",data:i}));case 1:case"end":return o.stop()}},m)})),Y.apply(this,arguments)}function ee(m){return Q.apply(this,arguments)}function Q(){return Q=(0,l.Z)((0,t.Z)().mark(function m(i){return(0,t.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,D.WY)("\u200B/kitchen/api/FoodMenu/GetStorePage",{method:"POST",data:i}));case 1:case"end":return o.stop()}},m)})),Q.apply(this,arguments)}function te(m){return H.apply(this,arguments)}function H(){return H=(0,l.Z)((0,t.Z)().mark(function m(i){return(0,t.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,D.WY)("\u200B/kitchen/api/store-desktop-number-app-server",{method:"DELETE",data:i}));case 1:case"end":return o.stop()}},m)})),H.apply(this,arguments)}var re=e(79361),ne=e.n(re),pe=x.Z.Meta,me="message",ae=function(){var i=(0,p.useState)(!1),S=(0,h.Z)(i,2),o=S[0],V=S[1],O=(0,p.useRef)(),N=(0,p.useState)(),U=(0,h.Z)(N,2),J=U[0],K=U[1],se=(0,p.useState)(),X=(0,h.Z)(se,2),ue=X[0],le=X[1];(0,p.useEffect)(function(){var f=ee({current:1,pageSize:99999}).then(function(a){var s=[];a.data.data.forEach(function(u){s[u.id]={text:u.name},le(s)})})},[]);var ie=function(a){var s={title:"".concat(a.storeName," ").concat(a.desktopNumber,"\u53F7\u684C"),okText:"\u4E0B\u8F7D",cancelText:"\u53D6\u6D88",onOk:function(){de("".concat(a.storeName," ").concat(a.desktopNumber,"\u53F7\u684C"))},content:(0,r.jsx)(x.Z,{style:{width:300,height:450,backgroundImage:"url(http://bpic.588ku.com/back_pic/05/42/90/125a6c515c035ab.jpg%21r650/fw/800)",backgroundSize:"cover"},title:(0,r.jsx)("h2",{style:{fontWeight:600},children:"".concat(a.storeName)}),headStyle:{border:"0px",textAlign:"center"},cover:(0,r.jsx)(ne(),{id:"qrCode",value:"".concat(a.host,"?storeId=").concat(a.storeId,"&number=").concat(a.desktopNumber),size:174,fgColor:"#000000",style:{margin:"auto",marginTop:"60px"}}),children:(0,r.jsx)("div",{style:{textAlign:"center"},children:(0,r.jsx)("h2",{style:{fontWeight:600},children:"".concat(a.desktopNumber,"\u53F7\u684C")})})})};T.Z.confirm(s)},de=function(a){var s=document.getElementById("qrCode"),u=new Image;u.src=s.toDataURL("image/png");var d=document.createElement("a");d.download=a,d.style.display="none",d.href=u.src,document.body.appendChild(d),d.click(),URL.revokeObjectURL(d.href),document.body.removeChild(d)},ce=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u684C\u53F7",dataIndex:"desktopNumber",align:"center",search:!1,render:function(a){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(C.Z,{type:"primary",shape:"circle",children:a})})}},{title:"\u9002\u7528\u5E97\u94FA",align:"center",dataIndex:"storeName"},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",hideInForm:!0,search:!1},{title:"\u4E8C\u7EF4\u7801",dataIndex:"option",valueType:"option",render:function(a,s){return[(0,r.jsx)("a",{onClick:function(){ie(s)},type:"link",children:s.storeName}),(0,r.jsx)("a",{onClick:function(){te([s.id]).then(function(d){return d.data?(v.default.success("\u5220\u9664\u6210\u529F"),O.current.reload(),!0):(v.default.error("\u5220\u9664\u5931\u8D25"),O.current.reload(),!1)})},type:"link",children:"\u5220\u9664"})]}}];return(0,r.jsxs)(E.ZP,{children:[(0,r.jsx)(n.ZP,{headerTitle:"\u5E97\u94FA\u7C7B\u578B",actionRef:O,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,r.jsxs)(C.Z,{type:"primary",onClick:function(){V(!0)},children:[(0,r.jsx)(c.Z,{})," \u7F16\u8F91"]},"primary")]},request:function(){var f=(0,l.Z)((0,t.Z)().mark(function a(s){var u,d;return(0,t.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return u=[],d=0,w.next=4,L(s).then(function(_){u=_.data.data,d=_.data.total});case 4:return w.abrupt("return",{data:u,success:!0,total:d});case 5:case"end":return w.stop()}},a)}));return function(a){return f.apply(this,arguments)}}(),columns:ce}),(0,r.jsx)(B,{onFinish:function(){var f=(0,l.Z)((0,t.Z)().mark(function a(s){var u;return(0,t.Z)().wrap(function($){for(;;)switch($.prev=$.next){case 0:u=!1,s.startNumber=s.numbers[0],s.endNumber=s.numbers[1],s.id||(u=q(s)),u&&(V(!1),O.current.reload());case 5:case"end":return $.stop()}},a)}));return function(a){return f.apply(this,arguments)}}(),onCancel:function(){V(!1)},modalVisible:o,storeInfoList:ue,values:J||{}})]})},oe=ae}}]);