|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[1298,7975,1322],{5966:function(wt,Le,a){"use strict";var Te=a(28991),Y=a(81253),J=a(85893),be=a(31649),nt=["fieldProps","proFieldProps"],ae=["fieldProps","proFieldProps"],Ce="text",l=function(he){var Ne=he.fieldProps,$e=he.proFieldProps,v=(0,Y.Z)(he,nt);return(0,J.jsx)(be.Z,(0,Te.Z)({valueType:Ce,fieldProps:Ne,filedConfig:{valueType:Ce},proFieldProps:$e},v))},u=function(he){var Ne=he.fieldProps,$e=he.proFieldProps,v=(0,Y.Z)(he,ae);return(0,J.jsx)(be.Z,(0,Te.Z)({valueType:"password",fieldProps:Ne,proFieldProps:$e,filedConfig:{valueType:Ce}},v))},N=l;N.Password=u,N.displayName="ProFormComponent",Le.Z=N},43673:function(){},57719:function(){},37114:function(wt,Le,a){"use strict";a.r(Le),a.d(Le,{default:function(){return Yt}});var Te=a(58024),Y=a(91894),J=a(62350),be=a(24565),nt=a(34792),ae=a(48086),Ce=a(71153),l=a(60331),u=a(39428),N=a(3182),ne=a(2824),he=a(18106),Ne=a(36166),$e=a(78009),v=a(67294),xe=a(48971);function Rt(e){return Ve.apply(this,arguments)}function Ve(){return Ve=(0,N.Z)((0,u.Z)().mark(function e(n){return(0,u.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,xe.WY)("/kitchen/api/printer/store-infos",{method:"Post",data:n}));case 1:case"end":return r.stop()}},e)})),Ve.apply(this,arguments)}function jt(e){return(0,xe.WY)("/kitchen/api/printer/printer-list/".concat(e),{method:"get",data:e})}function At(e){return Ye.apply(this,arguments)}function Ye(){return Ye=(0,N.Z)((0,u.Z)().mark(function e(n){return(0,u.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,xe.WY)("/kitchen/api/printer/printer",{method:"Post",data:n}));case 1:case"end":return r.stop()}},e)})),Ye.apply(this,arguments)}function Tt(e){return rt.apply(this,arguments)}function rt(){return rt=(0,N.Z)((0,u.Z)().mark(function e(n){return(0,u.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,xe.WY)("/kitchen/api/printer/printer",{method:"PUT",data:n}));case 1:case"end":return r.stop()}},e)})),rt.apply(this,arguments)}function Je(e,n){return vt.apply(this,arguments)}function vt(){return vt=(0,N.Z)((0,u.Z)().mark(function e(n,i){return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",(0,xe.WY)("/kitchen/api/printer/set-printer-host/".concat(n,"/").concat(i),{method:"post"}));case 1:case"end":return s.stop()}},e)})),vt.apply(this,arguments)}function mt(e){return it.apply(this,arguments)}function it(){return it=(0,N.Z)((0,u.Z)().mark(function e(n){return(0,u.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,xe.WY)("/kitchen/api/printer/del-printer",{method:"post",data:n}));case 1:case"end":return r.stop()}},e)})),it.apply(this,arguments)}function f(e){return E.apply(this,arguments)}function E(){return E=(0,N.Z)((0,u.Z)().mark(function e(n){return(0,u.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,xe.WY)("/kitchen/api/printer/printer-templater",{method:"get",data:n}));case 1:case"end":return r.stop()}},e)})),E.apply(this,arguments)}function R(e){return y.apply(this,arguments)}function y(){return y=(0,N.Z)((0,u.Z)().mark(function e(n){return(0,u.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,xe.WY)("/kitchen/api/printer/store-food-menu/".concat(n),{method:"get",data:n}));case 1:case"end":return r.stop()}},e)})),y.apply(this,arguments)}var c=a(96156),h=a(28991),ue=a(84305),Pe=a(39559),Ee=a(81253),t=a(85893),X=a(53779),ge=a(94184),P=a.n(ge),ot=a(43673),ze=a(54421),Be=a(38272),We=a(85061),W=a(28481),He=a(84164),st=a(58448),Se=a(93125);function Fe(e,n){for(var i=e,r=0;r<n.length;r+=1){if(i==null)return;i=i[n[r]]}return i}var ye=["title","subTitle","avatar","description","extra","content","actions","type"],lt=ye.reduce(function(e,n){return e.set(n,!0),e},new Map),bt=a(18446),pt=a(19586),Nt=a(94233),Ft=a(51890),Dt=a(8812),Mt=a(57895);function ht(e,n){return $t(e)||Lt(e,n)||Kt(e,n)||Ot()}function Ot(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kt(e,n){if(!!e){if(typeof e=="string")return Qe(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Qe(e,n)}}function Qe(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,r=new Array(n);i<n;i++)r[i]=e[i];return r}function Lt(e,n){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))){var i=[],r=!0,s=!1,p=void 0;try{for(var S=e[Symbol.iterator](),j;!(r=(j=S.next()).done)&&(i.push(j.value),!(n&&i.length===n));r=!0);}catch(K){s=!0,p=K}finally{try{!r&&S.return!=null&&S.return()}finally{if(s)throw p}}return i}}function $t(e){if(Array.isArray(e))return e}function zt(e,n){var i=n||{},r=i.defaultValue,s=i.value,p=i.onChange,S=i.postState,j=v.useState(function(){return s!==void 0?s:r!==void 0?typeof r=="function"?r():r:typeof e=="function"?e():e}),K=ht(j,2),V=K[0],O=K[1],L=s!==void 0?s:V;S&&(L=S(L));function H(M){O(M),L!==M&&p&&p(M,L)}var fe=v.useRef(!0);return v.useEffect(function(){if(fe.current){fe.current=!1;return}s===void 0&&O(s)},[s]),[L,H]}var Bt=["title","subTitle","content","itemTitleRender","prefixCls","actions","item","recordKey","avatar","cardProps","description","isEditable","checkbox","index","selected","loading","expand","onExpand","expandable","rowSupportExpand","showActions","showExtra","type","style","className","record","onRow","onItem","itemHeaderRender","cardActionProps","extra"];function xt(e){var n,i=e.prefixCls,r=e.expandIcon,s=r===void 0?(0,t.jsx)(Dt.Z,{}):r,p=e.onExpand,S=e.expanded,j=e.record,K=s,V="".concat(i,"-row-expand-icon"),O=function(H){p(!S),H.stopPropagation()};return typeof s=="function"&&(K=s({expanded:S,onExpand:p,record:j})),(0,t.jsx)("span",{className:P()(V,(n={},(0,c.Z)(n,"".concat(i,"-row-expanded"),S),(0,c.Z)(n,"".concat(i,"-row-collapsed"),!S),n)),onClick:O,children:K})}function Wt(e){var n,i,r,s,p,S=e.prefixCls,j=(0,v.useContext)(Pe.ZP.ConfigContext),K=j.getPrefixCls,V=K("pro-list",S),O="".concat(V,"-row"),L=e.title,H=e.subTitle,fe=e.content,M=e.itemTitleRender,ke=e.prefixCls,q=e.actions,Ue=e.item,Me=e.recordKey,ie=e.avatar,_=e.cardProps,z=e.description,we=e.isEditable,Re=e.checkbox,k=e.index,Ge=e.selected,je=e.loading,oe=e.expand,Ze=e.onExpand,se=e.expandable,Oe=e.rowSupportExpand,Ke=e.showActions,Ae=e.showExtra,ve=e.type,ee=e.style,me=e.className,A=me===void 0?O:me,Z=e.record,B=e.onRow,U=e.onItem,ce=e.itemHeaderRender,le=e.cardActionProps,T=e.extra,C=(0,Ee.Z)(e,Bt),d=se||{},I=d.expandedRowRender,x=d.expandIcon,w=d.expandRowByClick,te=d.indentSize,b=te===void 0?8:te,o=d.expandedRowClassName,m=zt(!!oe,{value:oe,onChange:Ze}),F=(0,W.Z)(m,2),g=F[0],Q=F[1],$=P()((n={},(0,c.Z)(n,"".concat(O,"-selected"),!_&&Ge),(0,c.Z)(n,"".concat(O,"-show-action-hover"),Ke==="hover"),(0,c.Z)(n,"".concat(O,"-type-").concat(ve),!!ve),(0,c.Z)(n,"".concat(O,"-editable"),we),(0,c.Z)(n,"".concat(O,"-show-extra-hover"),Ae==="hover"),n),O),de=P()((0,c.Z)({},"".concat(A,"-extra"),Ae==="hover")),ut=g||Object.values(se||{}).length===0,Pt=I&&I(Z,k,b,g),_e=(0,v.useMemo)(function(){if(!(!q||le==="actions"))return[(0,t.jsx)("div",{onClick:function(at){return at.stopPropagation()},children:q},"action")]},[q,le]),Jt=(0,v.useMemo)(function(){if(!(!q||!le||le==="extra"))return[(0,t.jsx)("div",{onClick:function(at){return at.stopPropagation()},children:q},"action")]},[q,le]),et=L||H?(0,t.jsxs)("div",{className:"".concat($,"-header-title"),children:[L&&(0,t.jsx)("div",{className:"".concat($,"-title"),children:L}),H&&(0,t.jsx)("div",{className:"".concat($,"-subTitle"),children:H})]}):null,pe=(i=M&&(M==null?void 0:M(Z,k,et)))!==null&&i!==void 0?i:et,tt=pe||ie||H||z?(0,t.jsx)(Be.ZP.Item.Meta,{avatar:ie,title:pe,description:z&&ut&&(0,t.jsx)("div",{className:"".concat($,"-description"),children:z})}):null,Et=P()((r={},(0,c.Z)(r,"".concat($,"-item-has-checkbox"),Re),(0,c.Z)(r,"".concat($,"-item-has-avatar"),ie),(0,c.Z)(r,$,$),r)),ct=(0,v.useMemo)(function(){return ie||L?(0,t.jsxs)(t.Fragment,{children:[ie&&(0,t.jsx)(Ft.C,{size:22,src:ie,className:K("list-item-meta-avatar")}),(0,t.jsx)("span",{className:K("list-item-meta-title"),children:L})]}):null},[ie,K,L]),dt=_?(0,t.jsx)(Mt.ZP,(0,h.Z)((0,h.Z)((0,h.Z)({bordered:!0,loading:je,hoverable:!0},_),{},{title:ct,subTitle:H,extra:_e,actions:Jt,bodyStyle:(0,h.Z)({padding:24},_.bodyStyle)},U==null?void 0:U(Z,k)),{},{children:(0,t.jsx)(pt.Z,{avatar:!0,title:!1,loading:je,active:!0,children:(0,t.jsxs)("div",{className:"".concat($,"-header"),children:[M&&(M==null?void 0:M(Z,k,et)),fe]})})})):(0,t.jsx)(Be.ZP.Item,(0,h.Z)((0,h.Z)((0,h.Z)((0,h.Z)({className:P()(Et,(0,c.Z)({},A,A!==O))},C),{},{actions:_e,extra:!!T&&(0,t.jsx)("div",{className:de,children:T})},B==null?void 0:B(Z,k)),U==null?void 0:U(Z,k)),{},{onClick:function(at){var St,Qt,It,Xt;B==null||(St=B(Z,k))===null||St===void 0||(Qt=St.onClick)===null||Qt===void 0||Qt.call(St,at),U==null||(It=U(Z,k))===null||It===void 0||(Xt=It.onClick)===null||Xt===void 0||Xt.call(It,at),w&&Q(!g)},children:(0,t.jsxs)(pt.Z,{avatar:!0,title:!1,loading:je,active:!0,children:[(0,t.jsxs)("div",{className:"".concat($,"-header"),children:[(0,t.jsxs)("div",{className:"".concat($,"-header-option"),children:[!!Re&&(0,t.jsx)("div",{className:"".concat($,"-checkbox"),children:Re}),Object.values(se||{}).length>0&&Oe&&xt({prefixCls:V,expandIcon:x,onExpand:Q,expanded:g,record:Z})]}),(s=ce&&(ce==null?void 0:ce(Z,k,tt)))!==null&&s!==void 0?s:tt]}),ut&&(fe||Pt)&&(0,t.jsxs)("div",{className:"".concat($,"-content"),children:[fe,I&&Oe&&(0,t.jsx)("div",{className:o&&o(Z,k,b),children:Pt})]})]})}));return _?(0,t.jsx)("div",{className:P()((p={},(0,c.Z)(p,"".concat($,"-card"),_),(0,c.Z)(p,A,A!==O),p)),style:ee,children:dt}):dt}var Ht=Wt,kt=["dataSource","columns","rowKey","showActions","showExtra","prefixCls","actionRef","itemTitleRender","renderItem","itemCardProps","itemHeaderRender","expandable","rowSelection","pagination","onRow","onItem","rowClassName"];function Ut(e){var n=e.dataSource,i=e.columns,r=e.rowKey,s=e.showActions,p=e.showExtra,S=e.prefixCls,j=e.actionRef,K=e.itemTitleRender,V=e.renderItem,O=e.itemCardProps,L=e.itemHeaderRender,H=e.expandable,fe=e.rowSelection,M=e.pagination,ke=e.onRow,q=e.onItem,Ue=e.rowClassName,Me=(0,Ee.Z)(e,kt),ie=(0,v.useContext)(Pe.ZP.ConfigContext),_=ie.getPrefixCls,z=v.useMemo(function(){return typeof r=="function"?r:function(b,o){return b[r]||o}},[r]),we=(0,He.Z)(n,"children",z),Re=(0,W.Z)(we,1),k=Re[0],Ge=(0,st.ZP)(n.length,(0,h.Z)({responsive:!0},M),function(){}),je=(0,W.Z)(Ge,1),oe=je[0],Ze=v.useMemo(function(){if(M===!1||!oe.pageSize||n.length<oe.total)return n;var b=oe.current,o=b===void 0?1:b,m=oe.pageSize,F=m===void 0?10:m,g=n.slice((o-1)*F,o*F);return g},[n,oe,M]),se=_("pro-list",S),Oe=(0,Se.ZP)(fe,{getRowKey:z,getRecordByKey:k,prefixCls:se,data:n,pageData:Ze,expandType:"row",childrenColumnName:"children",locale:{}}),Ke=(0,W.Z)(Oe,2),Ae=Ke[0],ve=Ke[1],ee=H||{},me=ee.expandedRowKeys,A=ee.defaultExpandedRowKeys,Z=ee.defaultExpandAllRows,B=Z===void 0?!0:Z,U=ee.onExpand,ce=ee.onExpandedRowsChange,le=ee.rowExpandable,T=v.useState(function(){return A||(B!==!1?n.map(z):[])}),C=(0,W.Z)(T,2),d=C[0],I=C[1],x=v.useMemo(function(){return new Set(me||d||[])},[me,d]),w=v.useCallback(function(b){var o=z(b,n.indexOf(b)),m,F=x.has(o);F?(x.delete(o),m=(0,We.Z)(x)):m=[].concat((0,We.Z)(x),[o]),I(m),U&&U(!F,b),ce&&ce(m)},[z,x,n,U,ce]),te=Ae([])[0];return(0,t.jsx)(Be.ZP,(0,h.Z)((0,h.Z)({},Me),{},{className:P()(_("pro-list-container",S),Me.className),dataSource:Ze,pagination:M&&oe,renderItem:function(o,m){var F,g,Q,$={className:typeof Ue=="function"?Ue(o,m):Ue};i==null||i.forEach(function(pe){var tt=pe.listKey,Et=pe.cardActionProps;if(!!lt.has(tt)){var ct=pe.dataIndex||tt||pe.key,dt=Array.isArray(ct)?Fe(o,ct):o[ct];Et==="actions"&&tt==="actions"&&($.cardActionProps=Et);var ft=pe.render?pe.render(dt,o,m):dt;ft!=="-"&&($[pe.listKey]=ft)}});var de;te&&te.render&&(de=te.render(o,o,m)||void 0);var ut=((F=j.current)===null||F===void 0?void 0:F.isEditable((0,h.Z)((0,h.Z)({},o),{},{index:m})))||{},Pt=ut.isEditable,_e=ut.recordKey,Jt=ve.has(_e||m),et=(0,t.jsx)(Ht,(0,h.Z)((0,h.Z)({cardProps:Me.grid?(0,h.Z)((0,h.Z)((0,h.Z)({},O),Me.grid),{},{checked:Jt,onChecked:v.isValidElement(de)?(g=de)===null||g===void 0||(Q=g.props)===null||Q===void 0?void 0:Q.onChange:void 0}):void 0},$),{},{recordKey:_e,isEditable:Pt||!1,expandable:H,expand:x.has(z(o,m)),onExpand:function(){w(o)},index:m,record:o,item:o,showActions:s,showExtra:p,itemTitleRender:K,itemHeaderRender:L,rowSupportExpand:!le||le&&le(o),selected:ve.has(z(o,m)),checkbox:de,onRow:ke,onItem:q}),_e);return V?V(o,m,et):et}}))}var Gt=Ut,G=["metas","split","footer","rowKey","tooltip","className","options","search","expandable","showActions","showExtra","rowSelection","pagination","itemLayout","renderItem","grid","itemCardProps","onRow","onItem","rowClassName","locale","itemHeaderRender","itemTitleRender"];function Ie(e){var n=e.metas,i=e.split,r=e.footer,s=e.rowKey,p=e.tooltip,S=e.className,j=e.options,K=j===void 0?!1:j,V=e.search,O=V===void 0?!1:V,L=e.expandable,H=e.showActions,fe=e.showExtra,M=e.rowSelection,ke=M===void 0?!1:M,q=e.pagination,Ue=q===void 0?!1:q,Me=e.itemLayout,ie=e.renderItem,_=e.grid,z=e.itemCardProps,we=e.onRow,Re=e.onItem,k=e.rowClassName,Ge=e.locale,je=e.itemHeaderRender,oe=e.itemTitleRender,Ze=(0,Ee.Z)(e,G),se=(0,v.useRef)();(0,v.useImperativeHandle)(Ze.actionRef,function(){return se.current});var Oe=(0,v.useContext)(Pe.ZP.ConfigContext),Ke=Oe.getPrefixCls,Ae=(0,v.useMemo)(function(){var me=[];return Object.keys(n||{}).forEach(function(A){var Z=n[A]||{},B=Z.valueType;B||(A==="avatar"&&(B="avatar"),A==="actions"&&(B="option"),A==="description"&&(B="textarea")),me.push((0,h.Z)((0,h.Z)({listKey:A,dataIndex:(Z==null?void 0:Z.dataIndex)||A},Z),{},{valueType:B}))}),me},[n]),ve=Ke("pro-list",e.prefixCls),ee=P()(ve,(0,c.Z)({},"".concat(ve,"-no-split"),!i));return(0,t.jsx)(X.ZP,(0,h.Z)((0,h.Z)({tooltip:p},Ze),{},{actionRef:se,pagination:Ue,type:"list",rowSelection:ke,search:O,options:K,className:P()(ve,S,ee),columns:Ae,rowKey:s,tableViewRender:function(A){var Z=A.columns,B=A.size,U=A.pagination,ce=A.rowSelection,le=A.dataSource,T=A.loading;return(0,t.jsx)(Gt,{grid:_,itemCardProps:z,itemTitleRender:oe,prefixCls:e.prefixCls,columns:Z,renderItem:ie,actionRef:se,dataSource:le||[],size:B,footer:r,split:i,rowKey:s,expandable:L,rowSelection:ke===!1?void 0:ce,showActions:H,showExtra:fe,pagination:U,itemLayout:Me,loading:T,itemHeaderRender:je,onRow:we,onItem:Re,rowClassName:k,locale:Ge})}}))}function gt(e){return _jsx(Ie,_objectSpread({cardProps:!1,search:!1,toolBarRender:!1},e))}var Xe=Ie,re=a(1614),D=a(952),De=a(5966),yt=a(37476),Zt=a(78775),Vt=a(49101),Ct=Ne.Z.TabPane,qe=function(){var n=(0,v.useRef)(),i=(0,v.useRef)(),r=(0,v.useState)("actions"),s=(0,ne.Z)(r,2),p=s[0],S=s[1],j=(0,v.useState)([]),K=(0,ne.Z)(j,2),V=K[0],O=K[1],L=(0,v.useState)(0),H=(0,ne.Z)(L,2),fe=H[0],M=H[1],ke=(0,v.useState)([]),q=(0,ne.Z)(ke,2),Ue=q[0],Me=q[1],ie=(0,v.useState)({}),_=(0,ne.Z)(ie,2),z=_[0],we=_[1],Re=(0,v.useState)(""),k=(0,ne.Z)(Re,2),Ge=k[0],je=k[1],oe=(0,v.useState)([]),Ze=(0,ne.Z)(oe,2),se=Ze[0],Oe=Ze[1],Ke=(0,v.useState)(!1),Ae=(0,ne.Z)(Ke,2),ve=Ae[0],ee=Ae[1],me=(0,v.useState)([]),A=(0,ne.Z)(me,2),Z=A[0],B=A[1];(0,v.useEffect)((0,N.Z)((0,u.Z)().mark(function T(){return(0,u.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:U(1),f().then(function(I){B(I.data)});case 2:case"end":return d.stop()}},T)})),[]);var U=function(){var T=(0,N.Z)((0,u.Z)().mark(function C(d){return(0,u.Z)().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.prev=0,x.next=3,Rt({current:d,pageSize:10}).then(function(w){M(w.data.total),console.log("\u6211\u662F\u5E97\u94FA\u4FE1\u606F",w.data.data),O(w.data.data)});case 3:x.next=8;break;case 5:x.prev=5,x.t0=x.catch(0),O([]);case 8:case"end":return x.stop()}},C,null,[[0,5]])}));return function(d){return T.apply(this,arguments)}}(),ce=function(){var T=(0,N.Z)((0,u.Z)().mark(function C(d){var I,x;return(0,u.Z)().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return I=[],te.next=3,jt(d).then(function(b){b==null||b.data.forEach(function(o){if(o.id==(z==null?void 0:z.id)){var m=z;m.state=m.state=="read"?"edit":"read",o.state=m.state,we(m)}else o.state="read";I.push(o)})});case 3:return x=te.sent,te.abrupt("return",I);case 5:case"end":return te.stop()}},C)}));return function(d){return T.apply(this,arguments)}}(),le=function(){var T=(0,N.Z)((0,u.Z)().mark(function C(d){var I,x,w;return(0,u.Z)().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,ce(d);case 2:return I=b.sent,b.next=5,R(d);case 5:return x=b.sent,Oe(x.data),w=I==null?void 0:I.map(function(o){return{title:o.name,subTitle:o.isHost?(0,t.jsx)(l.Z,{color:"#5BD8A6",children:"\u4E3B\u6253\u5370\u673A"}):"",actions:[(0,t.jsx)("a",{onClick:(0,N.Z)((0,u.Z)().mark(function m(){return(0,u.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,Je(d,o.id).then(function(Q){Q.data?(n.current.reload(),ae.default.success("\u8BBE\u7F6E\u6210\u529F")):ae.default.success("\u8BBE\u7F6E\u5931\u8D25")});case 2:case"end":return g.stop()}},m)})),children:"\u8BBE\u4E3A\u4E3B\u673A"},"run"),(0,t.jsx)(be.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,N.Z)((0,u.Z)().mark(function m(){return(0,u.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,mt([o.id]).then(function(Q){Q.data?(n.current.reload(),ae.default.success("\u5220\u9664\u6210\u529F")):ae.default.success("\u5220\u9664\u5931\u8D25")});case 2:case"end":return g.stop()}},m)})),onCancel:function(){},children:(0,t.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary"),(0,t.jsx)("a",{onClick:(0,N.Z)((0,u.Z)().mark(function m(){return(0,u.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:n.current.reload(),o.state=="edit"&&i.current.submit();case 2:case"end":return g.stop()}},m)})),children:o.state=="edit"?"\u4FDD\u5B58":"\u7F16\u8F91"},"delete")],avatar:"https://gw.alipayobjects.com/zos/antfincdn/UCSiy1j6jx/xingzhuang.svg",info:o,content:(0,t.jsx)("div",{style:{flex:1,width:"100%"},children:(0,t.jsx)("div",{style:{overflow:"auto",height:"555px",float:"left",width:"100%"},children:(0,t.jsxs)(D.ZP,{labelCol:{span:5},style:{float:"left",width:"80%",margin:"10px"},onFinish:function(){var m=(0,N.Z)((0,u.Z)().mark(function F(g){var Q;return(0,u.Z)().wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return de.next=2,Tt(g);case 2:Q=de.sent,Q.data?(n.current.reload(),ae.default.success("\u7F16\u8F91\u6210\u529F")):ae.default.success("\u7F16\u8F91\u5931\u8D25");case 4:case"end":return de.stop()}},F)}));return function(F){return m.apply(this,arguments)}}(),formRef:i,submitter:!1,layout:"horizontal",initialValues:{id:o.id,state:o.state,name:o.name,applicationId:o.applicationId,applicationkey:o.applicationkey,terminalId:o.terminalId,terminalKey:o.terminalKey,templaterId:o.templaterId,goodsIdList:o.goodsIdList},autoFocusFirstInput:!0,children:[(0,t.jsx)(D.ZP.Item,{name:"id",hidden:!0,children:(0,t.jsx)(re.ZP,{mode:o.state})}),(0,t.jsx)(D.ZP.Item,{name:"applicationId",label:"\u5E94\u7528ID",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528ID",children:(0,t.jsx)(re.ZP,{mode:o.state})}),(0,t.jsx)(D.ZP.Item,{style:{marginTop:"-10px"},name:"applicationkey",label:"\u5E94\u7528\u79D8\u94A5",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u79D8\u94A5",children:(0,t.jsx)(re.ZP,{valueType:"password",mode:o.state})}),(0,t.jsx)(D.ZP.Item,{style:{marginTop:"-10px"},name:"terminalId",label:"\u7EC8\u7AEFID",placeholder:"\u8BF7\u8F93\u5165\u7EC8\u7AEFID",children:(0,t.jsx)(re.ZP,{mode:o.state})}),(0,t.jsx)(D.ZP.Item,{style:{marginTop:"-10px"},name:"terminalKey",label:"\u7EC8\u7AEF\u79D8\u94A5",placeholder:"\u8BF7\u8F93\u5165\u7EC8\u7AEF\u79D8\u94A5",children:(0,t.jsx)(re.ZP,{valueType:"password",mode:o.state})}),(0,t.jsx)(D.ZP.Item,{style:{marginTop:"-10px"},name:"name",label:"\u6253\u5370\u673A\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u6253\u5370\u673A\u540D\u79F0",hidden:o.state!="edit",children:(0,t.jsx)(re.ZP,{mode:o.state})}),(0,t.jsx)(De.Z,{mode:o.state,name:"templaterId",label:"\u6A21\u677F",placeholder:"\u6A21\u677F",request:function(){var F=[];return Z==null||Z.map(function(g,Q){F.push({label:g.title,value:g.id})}),F}}),(0,t.jsx)("div",{style:{overflow:"auto",width:"100%",float:"left",textAlign:"left",margin:"5px",padding:"5px"},children:(0,t.jsx)(De.Z,{mode:o.state,name:"goodsIdList",valueType:"checkbox",label:"\u5546\u54C1",request:function(){var F=[];return x==null||x.data.map(function(g,Q){F.push({label:g.foodName,value:g.foodId})}),F}})})]})})})}}),w.push({info:{},content:(0,t.jsx)("div",{style:{flex:1},children:(0,t.jsx)("div",{style:{height:195,textAlign:"center"},onClick:function(){ee(!0),je(d)},children:(0,t.jsx)(Vt.Z,{style:{fontSize:"50px",color:"#08c",marginTop:"60px"}})})})}),b.abrupt("return",w);case 10:case"end":return b.stop()}},C)}));return function(d){return T.apply(this,arguments)}}();return(0,t.jsxs)($e.ZP,{children:[(0,t.jsx)(Y.Z,{}),(0,t.jsx)(Y.Z,{headStyle:{border:"0px "},title:"\u5E97\u94FA\u6253\u5370\u673A",style:{marginTop:"17px"},children:(0,t.jsx)(Ne.Z,{defaultActiveKey:"1",tabPosition:"left",onChange:function(){var T=(0,N.Z)((0,u.Z)().mark(function C(d){return(0,u.Z)().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:case"end":return x.stop()}},C)}));return function(C){return T.apply(this,arguments)}}(),children:V==null?void 0:V.map(function(T){return(0,t.jsx)(Ct,{tab:T.storeName,children:(0,t.jsx)(Xe,{params:{storeid:T.storeId},actionRef:n,pagination:!1,showActions:"hover",rowSelection:{},grid:{gutter:8,column:3},onItem:function(d){return{onMouseEnter:function(){we(d.info)},onClick:function(){we(d.info)}}},metas:{title:{},subTitle:{},type:{},avatar:{},content:{},actions:{cardActionProps:p}},headerTitle:"\u6253\u5370\u673A",request:function(){var C=(0,N.Z)((0,u.Z)().mark(function d(I){return(0,u.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,le(I.storeid);case 2:return w.t0=w.sent,w.abrupt("return",{data:w.t0,success:!0});case 4:case"end":return w.stop()}},d)}));return function(d){return C.apply(this,arguments)}}()})},T.storeId)})})}),(0,t.jsx)(yt.Y,{labelCol:{span:4},visible:ve,modalProps:{onCancel:function(){return ee(!1)}},onFinish:function(){var T=(0,N.Z)((0,u.Z)().mark(function C(d){var I;return(0,u.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return d.storeId=Ge,w.next=3,At(d);case 3:I=w.sent,I.data?(n.current.reload(),ee(!1),ae.default.success("\u6DFB\u52A0\u6210\u529F")):ae.default.success("\u6DFB\u52A0\u5931\u8D25");case 5:case"end":return w.stop()}},C)}));return function(C){return T.apply(this,arguments)}}(),formRef:i,layout:"horizontal",autoFocusFirstInput:!0,children:(0,t.jsxs)("div",{style:{width:"98%"},children:[(0,t.jsx)(De.Z,{style:{marginTop:"-10px"},name:"applicationId",label:"\u5E94\u7528ID",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528ID",children:(0,t.jsx)(re.ZP,{mode:"edit"})}),(0,t.jsx)(D.ZP.Item,{style:{marginTop:"-10px"},name:"applicationkey",label:"\u5E94\u7528\u79D8\u94A5",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u79D8\u94A5",children:(0,t.jsx)(re.ZP,{valueType:"password",mode:"edit"})}),(0,t.jsx)(D.ZP.Item,{style:{marginTop:"-10px"},name:"terminalId",label:"\u7EC8\u7AEFID",placeholder:"\u7EC8\u7AEFID",children:(0,t.jsx)(re.ZP,{mode:"edit"})}),(0,t.jsx)(D.ZP.Item,{style:{marginTop:"-10px"},name:"terminalKey",label:"\u7EC8\u7AEF\u79D8\u94A5",placeholder:"\u7EC8\u7AEF\u79D8\u94A5",children:(0,t.jsx)(re.ZP,{valueType:"password",mode:"edit"})}),(0,t.jsx)(D.ZP.Item,{style:{marginTop:"-10px"},name:"name",label:"\u6253\u5370\u673A\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u6253\u5370\u673A\u540D\u79F0",children:(0,t.jsx)(re.ZP,{mode:"edit"})}),(0,t.jsx)(De.Z,{mode:"edit",name:"templaterId",label:"\u6A21\u677F",placeholder:"\u6A21\u677F",style:{marginTop:"-10px"},request:function(){var C=[];return Z==null||Z.map(function(d,I){C.push({label:d.title,value:d.id})}),C}}),(0,t.jsx)(De.Z,{mode:"edit",name:"goodsIdList",valueType:"checkbox",label:"\u5546\u54C1",placeholder:"\u5546\u54C1",request:function(){var C=[];return se==null||se.map(function(d,I){C.push({label:d.foodName,value:d.foodId})}),C}})]})})]})},Yt=qe},38272:function(wt,Le,a){"use strict";a.d(Le,{ZM:function(){return Je},ZP:function(){return it}});var Te=a(85061),Y=a(22122),J=a(96156),be=a(28481),nt=a(90484),ae=a(94184),Ce=a.n(ae),l=a(67294),u=a(53124),N=a(88258),ne=a(92820),he=a(25378),Ne=a(36138),$e=a(11382),v=a(24308),xe=a(21584),Rt=a(96159),Ve=function(f,E){var R={};for(var y in f)Object.prototype.hasOwnProperty.call(f,y)&&E.indexOf(y)<0&&(R[y]=f[y]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,y=Object.getOwnPropertySymbols(f);c<y.length;c++)E.indexOf(y[c])<0&&Object.prototype.propertyIsEnumerable.call(f,y[c])&&(R[y[c]]=f[y[c]]);return R},jt=function(E){var R=E.prefixCls,y=E.className,c=E.avatar,h=E.title,ue=E.description,Pe=Ve(E,["prefixCls","className","avatar","title","description"]),Ee=(0,l.useContext)(u.E_),t=Ee.getPrefixCls,X=t("list",R),ge=Ce()("".concat(X,"-item-meta"),y),P=l.createElement("div",{className:"".concat(X,"-item-meta-content")},h&&l.createElement("h4",{className:"".concat(X,"-item-meta-title")},h),ue&&l.createElement("div",{className:"".concat(X,"-item-meta-description")},ue));return l.createElement("div",(0,Y.Z)({},Pe,{className:ge}),c&&l.createElement("div",{className:"".concat(X,"-item-meta-avatar")},c),(h||ue)&&P)},At=function(E,R){var y=E.prefixCls,c=E.children,h=E.actions,ue=E.extra,Pe=E.className,Ee=E.colStyle,t=Ve(E,["prefixCls","children","actions","extra","className","colStyle"]),X=(0,l.useContext)(Je),ge=X.grid,P=X.itemLayout,ot=(0,l.useContext)(u.E_),ze=ot.getPrefixCls,Be=function(){var ye;return l.Children.forEach(c,function(lt){typeof lt=="string"&&(ye=!0)}),ye&&l.Children.count(c)>1},We=function(){return P==="vertical"?!!ue:!Be()},W=ze("list",y),He=h&&h.length>0&&l.createElement("ul",{className:"".concat(W,"-item-action"),key:"actions"},h.map(function(Fe,ye){return l.createElement("li",{key:"".concat(W,"-item-action-").concat(ye)},Fe,ye!==h.length-1&&l.createElement("em",{className:"".concat(W,"-item-action-split")}))})),st=ge?"div":"li",Se=l.createElement(st,(0,Y.Z)({},t,ge?{}:{ref:R},{className:Ce()("".concat(W,"-item"),(0,J.Z)({},"".concat(W,"-item-no-flex"),!We()),Pe)}),P==="vertical"&&ue?[l.createElement("div",{className:"".concat(W,"-item-main"),key:"content"},c,He),l.createElement("div",{className:"".concat(W,"-item-extra"),key:"extra"},ue)]:[c,He,(0,Rt.Tm)(ue,{key:"extra"})]);return ge?l.createElement(xe.Z,{ref:R,flex:1,style:Ee},Se):Se},Ye=(0,l.forwardRef)(At);Ye.Meta=jt;var Tt=Ye,rt=function(f,E){var R={};for(var y in f)Object.prototype.hasOwnProperty.call(f,y)&&E.indexOf(y)<0&&(R[y]=f[y]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,y=Object.getOwnPropertySymbols(f);c<y.length;c++)E.indexOf(y[c])<0&&Object.prototype.propertyIsEnumerable.call(f,y[c])&&(R[y[c]]=f[y[c]]);return R},Je=l.createContext({}),vt=Je.Consumer;function mt(f){var E=f.pagination,R=E===void 0?!1:E,y=f.prefixCls,c=f.bordered,h=c===void 0?!1:c,ue=f.split,Pe=ue===void 0?!0:ue,Ee=f.className,t=f.children,X=f.itemLayout,ge=f.loadMore,P=f.grid,ot=f.dataSource,ze=ot===void 0?[]:ot,Be=f.size,We=f.header,W=f.footer,He=f.loading,st=He===void 0?!1:He,Se=f.rowKey,Fe=f.renderItem,ye=f.locale,lt=rt(f,["pagination","prefixCls","bordered","split","className","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),bt=R&&(0,nt.Z)(R)==="object"?R:{},pt=l.useState(bt.defaultCurrent||1),Nt=(0,be.Z)(pt,2),Ft=Nt[0],Dt=Nt[1],Mt=l.useState(bt.defaultPageSize||10),ht=(0,be.Z)(Mt,2),Ot=ht[0],Kt=ht[1],Qe=l.useContext(u.E_),Lt=Qe.getPrefixCls,$t=Qe.renderEmpty,zt=Qe.direction,Bt={current:1,total:0},xt=function(p){return function(S,j){Dt(S),Kt(j),R&&R[p]&&R[p](S,j)}},Wt=xt("onChange"),Ht=xt("onShowSizeChange"),kt=function(p,S){if(!Fe)return null;var j;return typeof Se=="function"?j=Se(p):Se?j=p[Se]:j=p.key,j||(j="list-item-".concat(S)),l.createElement(l.Fragment,{key:j},Fe(p,S))},Ut=function(){return!!(ge||R||W)},Gt=function(p,S){return l.createElement("div",{className:"".concat(p,"-empty-text")},ye&&ye.emptyText||S("List"))},G=Lt("list",y),Ie=st;typeof Ie=="boolean"&&(Ie={spinning:Ie});var gt=Ie&&Ie.spinning,Xe="";switch(Be){case"large":Xe="lg";break;case"small":Xe="sm";break;default:break}var re=Ce()(G,(0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)((0,J.Z)({},"".concat(G,"-vertical"),X==="vertical"),"".concat(G,"-").concat(Xe),Xe),"".concat(G,"-split"),Pe),"".concat(G,"-bordered"),h),"".concat(G,"-loading"),gt),"".concat(G,"-grid"),!!P),"".concat(G,"-something-after-last-item"),Ut()),"".concat(G,"-rtl"),zt==="rtl"),Ee),D=(0,Y.Z)((0,Y.Z)((0,Y.Z)({},Bt),{total:ze.length,current:Ft,pageSize:Ot}),R||{}),De=Math.ceil(D.total/D.pageSize);D.current>De&&(D.current=De);var yt=R?l.createElement("div",{className:"".concat(G,"-pagination")},l.createElement(Ne.Z,(0,Y.Z)({},D,{onChange:Wt,onShowSizeChange:Ht}))):null,Zt=(0,Te.Z)(ze);R&&ze.length>(D.current-1)*D.pageSize&&(Zt=(0,Te.Z)(ze).splice((D.current-1)*D.pageSize,D.pageSize));var Vt=Object.keys(P||{}).some(function(s){return["xs","sm","md","lg","xl","xxl"].includes(s)}),Ct=(0,he.Z)(Vt),qe=l.useMemo(function(){for(var s=0;s<v.c4.length;s+=1){var p=v.c4[s];if(Ct[p])return p}},[Ct]),Yt=l.useMemo(function(){if(!!P){var s=qe&&P[qe]?P[qe]:P.column;if(s)return{width:"".concat(100/s,"%"),maxWidth:"".concat(100/s,"%")}}},[P==null?void 0:P.column,qe]),e=gt&&l.createElement("div",{style:{minHeight:53}});if(Zt.length>0){var n=Zt.map(function(s,p){return kt(s,p)});e=P?l.createElement(ne.Z,{gutter:P.gutter},l.Children.map(n,function(s){return l.createElement("div",{key:s==null?void 0:s.key,style:Yt},s)})):l.createElement("ul",{className:"".concat(G,"-items")},n)}else!t&&!gt&&(e=Gt(G,$t||N.Z));var i=D.position||"bottom",r=l.useMemo(function(){return{grid:P,itemLayout:X}},[JSON.stringify(P),X]);return l.createElement(Je.Provider,{value:r},l.createElement("div",(0,Y.Z)({className:re},lt),(i==="top"||i==="both")&&yt,We&&l.createElement("div",{className:"".concat(G,"-header")},We),l.createElement($e.Z,(0,Y.Z)({},Ie),e,t),W&&l.createElement("div",{className:"".concat(G,"-footer")},W),ge||(i==="bottom"||i==="both")&&yt))}mt.Item=Tt;var it=mt},54421:function(wt,Le,a){"use strict";var Te=a(38663),Y=a.n(Te),J=a(57719),be=a.n(J),nt=a(13254),ae=a(6999),Ce=a(14781),l=a(20228)}}]);
|