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.
 
 
 

2 regels
11 KiB

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