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
8.3 KiB

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