Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

2 wiersze
11 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8340],{70271:function(H,y,e){"use strict";var s=e(28991),x=e(81253),f=e(85893),Z=e(67294),h=e(31649),b=["fieldProps","proFieldProps"],v=function(j,P){var S=j.fieldProps,r=j.proFieldProps,E=(0,x.Z)(j,b);return(0,f.jsx)(h.Z,(0,s.Z)({mode:"edit",valueType:"digitRange",fieldProps:(0,s.Z)({},S),ref:P,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:r},E))};y.Z=Z.forwardRef(v)},64317:function(H,y,e){"use strict";var s=e(28991),x=e(81253),f=e(85893),Z=e(22270),h=e(67294),b=e(66758),v=e(31649),g=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],j=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],P=h.forwardRef(function(a,R){var $=a.fieldProps,O=a.children,B=a.params,W=a.proFieldProps,L=a.mode,T=a.valueEnum,A=a.request,t=a.showSearch,N=a.options,U=(0,x.Z)(a,g),I=(0,h.useContext)(b.Z);return(0,f.jsx)(v.Z,(0,s.Z)((0,s.Z)({mode:"edit",valueEnum:(0,Z.h)(T),request:A,params:B,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,s.Z)({options:N,mode:L,showSearch:t,getPopupContainer:I.getPopupContainer},$),ref:R,proFieldProps:W},U),{},{children:O}))}),S=h.forwardRef(function(a,R){var $=a.fieldProps,O=a.children,B=a.params,W=a.proFieldProps,L=a.mode,T=a.valueEnum,A=a.request,t=a.options,N=(0,x.Z)(a,j),U=(0,s.Z)({options:t,mode:L||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},$),I=(0,h.useContext)(b.Z);return(0,f.jsx)(v.Z,(0,s.Z)((0,s.Z)({mode:"edit",valueEnum:(0,Z.h)(T),request:A,params:B,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,s.Z)({getPopupContainer:I.getPopupContainer},U),ref:R,proFieldProps:W},N),{},{children:O}))}),r=P,E=S,p=r;p.SearchSelect=E,p.displayName="ProFormComponent",y.Z=p},5966:function(H,y,e){"use strict";var s=e(28991),x=e(81253),f=e(85893),Z=e(31649),h=["fieldProps","proFieldProps"],b=["fieldProps","proFieldProps"],v="text",g=function(r){var E=r.fieldProps,p=r.proFieldProps,a=(0,x.Z)(r,h);return(0,f.jsx)(Z.Z,(0,s.Z)({mode:"edit",valueType:v,fieldProps:E,filedConfig:{valueType:v},proFieldProps:p},a))},j=function(r){var E=r.fieldProps,p=r.proFieldProps,a=(0,x.Z)(r,b);return(0,f.jsx)(Z.Z,(0,s.Z)({mode:"edit",valueType:"password",fieldProps:E,proFieldProps:p,filedConfig:{valueType:v}},a))},P=g;P.Password=j,P.displayName="ProFormComponent",y.Z=P},66951:function(H,y,e){"use strict";e.r(y),e.d(y,{default:function(){return ve}});var s=e(3182),x=e(34792),f=e(48086),Z=e(57663),h=e(71577),b=e(71194),v=e(50146),g=e(2824),j=e(58024),P=e(91894),S=e(94043),r=e.n(S),E=e(49101),p=e(67294),a=e(78009),R=e(16894),$=e(43358),O=e(34041),B=e(952),W=e(24739),L=e(70271),T=e(64317),A=e(5966),t=e(85893),N=function(u){var C=O.Z.Option,n=O.Z.OptGroup,G=[];return(0,t.jsx)(v.Z,{title:u.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:u.modalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){u.onCancel()},destroyOnClose:!0,children:(0,t.jsx)("div",{style:{padding:24},children:(0,t.jsx)(B.ZP,{layout:"Horizontal",onValuesChange:function(M,z){},onFinish:function(){var w=(0,s.Z)(r().mark(function M(z){return r().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.abrupt("return",u.onFinish(z));case 1:case"end":return F.stop()}},M)}));return function(M){return w.apply(this,arguments)}}(),children:(0,t.jsxs)(W.UW,{children:[(0,t.jsx)(L.Z,{label:"\u684C\u53F7\u8303\u56F4",placeholder:"\u8BF7\u8F93\u5165\u684C\u53F7\u8303\u56F4",name:"numbers",min:1,rules:[{required:!0}]}),(0,t.jsx)(T.Z,{label:"\u6392\u9664\u684C\u53F7",mode:"tags",placeholder:"\u8BF7\u8F93\u5165\u6392\u9664\u7684\u684C\u53F7",name:"excludeNumber",width:"md"}),(0,t.jsx)(A.Z,{name:"code",label:"\u684C\u53F0\u7801\u524D\u7F00",placeholder:"\u8BF7\u8F93\u5165\u684C\u53F0\u7801\u524D\u7F00",rules:[{max:2}]}),(0,t.jsx)(T.Z,{label:"\u9002\u7528\u5E97\u94FA",mode:"multiple",placeholder:"\u8BF7\u9009\u62E9\u5E97\u94FA",name:"storeIds",width:"md",valueEnum:u.storeInfoList})]})})})})},U=N,I=e(11849),Ze=e(9715),K=e(86835),je=e(47673),Q=e(4107),oe=function(u){var C={labelCol:{sm:{span:4}},wrapperCol:{}};return(0,t.jsx)(v.Z,{title:"\u4FEE\u6539",width:640,visible:u.editModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){u.onCancel()},destroyOnClose:!0,children:(0,t.jsxs)(K.Z,(0,I.Z)((0,I.Z)({},C),{},{layout:"Horizontal",preserve:!1,initialValues:u.values,onFinish:u.onFinish,children:[(0,t.jsx)(K.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(Q.Z,{})}),(0,t.jsx)(K.Z.Item,{name:"desktopNumber",label:"\u684C\u9762\u7801",children:(0,t.jsx)(Q.Z,{placeholder:"\u8BF7\u8F93\u5165\u684C\u9762\u7801"})}),(0,t.jsx)(K.Z.Item,{name:"code",label:"\u684C\u9762\u7801\u524D\u7F00",children:(0,t.jsx)(Q.Z,{placeholder:"\u8BF7\u8F93\u5165\u684C\u9762\u7801\u524D\u7F00"})}),(0,t.jsx)(K.Z.Item,{children:(0,t.jsx)(h.Z,{disabled:u.isLook,type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})})]}))})},se=oe,k=e(48971);function ue(d){return J.apply(this,arguments)}function J(){return J=(0,s.Z)(r().mark(function d(u){return r().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,k.WY)("/kitchen/api/store-desktop-number-app-server/page",{method:"POST",data:u}));case 1:case"end":return n.stop()}},d)})),J.apply(this,arguments)}function le(d){return X.apply(this,arguments)}function X(){return X=(0,s.Z)(r().mark(function d(u){return r().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,k.WY)("/kitchen/api/store-desktop-number-app-server",{method:"POST",data:u}));case 1:case"end":return n.stop()}},d)})),X.apply(this,arguments)}function ie(d){return q.apply(this,arguments)}function q(){return q=(0,s.Z)(r().mark(function d(u){return r().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,k.WY)("/kitchen/api/StoreDesktopNumber/UpdateDesktopNumber",{method:"POST",data:u}));case 1:case"end":return n.stop()}},d)})),q.apply(this,arguments)}function de(d){return _.apply(this,arguments)}function _(){return _=(0,s.Z)(r().mark(function d(u){return r().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,k.WY)("\u200B/kitchen/api/FoodMenu/GetStorePage",{method:"POST",data:u}));case 1:case"end":return n.stop()}},d)})),_.apply(this,arguments)}function ce(d){return ee.apply(this,arguments)}function ee(){return ee=(0,s.Z)(r().mark(function d(u){return r().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,k.WY)("\u200B/kitchen/api/store-desktop-number-app-server",{method:"DELETE",data:u}));case 1:case"end":return n.stop()}},d)})),ee.apply(this,arguments)}var pe=e(79361),me=e.n(pe),De=P.Z.Meta,be="message",he=function(){var u=(0,p.useState)(!1),C=(0,g.Z)(u,2),n=C[0],G=C[1],w=(0,p.useState)(!1),M=(0,g.Z)(w,2),z=M[0],Y=M[1],F=(0,p.useRef)(),fe=(0,p.useState)(),te=(0,g.Z)(fe,2),re=te[0],Pe=te[1],Ce=(0,p.useState)(),ne=(0,g.Z)(Ce,2),Fe=ne[0],ge=ne[1];(0,p.useEffect)(function(){var m=de({current:1,pageSize:99999}).then(function(o){var l=[];o.data.data.forEach(function(i){l[i.id]={text:i.name},ge(l)})})},[]);var Ee=function(o){var l={title:"".concat(o.storeName," ").concat(o.desktopNumber,"\u53F7\u684C"),okText:"\u4E0B\u8F7D",cancelText:"\u53D6\u6D88",onOk:function(){ye("".concat(o.storeName," ").concat(o.desktopNumber,"\u53F7\u684C"))},content:(0,t.jsx)(P.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,t.jsx)("h2",{style:{fontWeight:600},children:"".concat(o.storeName)}),headStyle:{border:"0px",textAlign:"center"},cover:(0,t.jsx)(me(),{id:"qrCode",value:"".concat(o.host,"?storeId=").concat(o.storeId,"&number=").concat(o.desktopNumber),size:174,fgColor:"#000000",style:{margin:"auto",marginTop:"60px"}}),children:(0,t.jsx)("div",{style:{textAlign:"center"},children:(0,t.jsx)("h2",{style:{fontWeight:600},children:"".concat(o.desktopNumber,"\u53F7\u684C")})})})};v.Z.confirm(l)},ye=function(o){var l=document.getElementById("qrCode"),i=new Image;i.src=l.toDataURL("image/png");var c=document.createElement("a");c.download=o,c.style.display="none",c.href=i.src,document.body.appendChild(c),c.click(),URL.revokeObjectURL(c.href),document.body.removeChild(c)},xe=[{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(o){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(h.Z,{type:"primary",shape:"circle",children:o})})}},{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(o,l){return[(0,t.jsx)("a",{onClick:function(){Y(!0),Pe(l)},type:"link",children:"\u4FEE\u6539"}),(0,t.jsx)("a",{onClick:function(){ce([l.id]).then(function(c){return c.data?(f.default.success("\u5220\u9664\u6210\u529F"),F.current.reload(),!0):(f.default.error("\u5220\u9664\u5931\u8D25"),F.current.reload(),!1)})},type:"link",children:"\u5220\u9664"}),(0,t.jsx)("a",{onClick:function(){Ee(l)},type:"link",children:l.storeName})]}}];return(0,t.jsxs)(a.ZP,{children:[(0,t.jsx)(R.ZP,{headerTitle:"\u5E97\u94FA\u7C7B\u578B",actionRef:F,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,t.jsxs)(h.Z,{type:"primary",onClick:function(){G(!0)},children:[(0,t.jsx)(E.Z,{})," \u7F16\u8F91"]},"primary")]},request:function(){var m=(0,s.Z)(r().mark(function o(l){var i,c;return r().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return i=[],c=0,V.next=4,ue(l).then(function(ae){i=ae.data.data,c=ae.data.total});case 4:return V.abrupt("return",{data:i,success:!0,total:c});case 5:case"end":return V.stop()}},o)}));return function(o){return m.apply(this,arguments)}}(),columns:xe}),(0,t.jsx)(U,{onFinish:function(){var m=(0,s.Z)(r().mark(function o(l){var i;return r().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:i=!1,l.startNumber=l.numbers[0],l.endNumber=l.numbers[1],l.id||(i=le(l)),i&&(G(!1),F.current.reload());case 5:case"end":return D.stop()}},o)}));return function(o){return m.apply(this,arguments)}}(),onCancel:function(){G(!1)},modalVisible:n,storeInfoList:Fe,values:re||{}}),(0,t.jsx)(se,{onFinish:function(){var m=(0,s.Z)(r().mark(function o(l){var i;return r().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:i=!1,l.id&&(i=ie(l)),i&&(Y(!1),F.current.reload());case 3:case"end":return D.stop()}},o)}));return function(o){return m.apply(this,arguments)}}(),onCancel:function(){Y(!1)},editModalVisible:z,values:re||{}})]})},ve=he}}]);