Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

3 righe
30 KiB

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