(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9999],{44943:function(){},1958:function(te,I,e){"use strict";e.r(I),e.d(I,{default:function(){return d}});var E=e(13062),m=e(71230),A=e(89032),h=e(15746),ae=e(58024),k=e(91894),i=e(86582),q=e(88983),Q=e(47933),p=e(39428),re=e(34792),_=e(48086),B=e(3182),L=e(2824),oe=e(18106),ee=e(60561),ne=e(78009),j=e(67294),x=e(952),F=e(1705),W=e(48971);function le(t){return b.apply(this,arguments)}function b(){return b=(0,B.Z)((0,p.Z)().mark(function t(r){return(0,p.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,W.WY)("/kitchen/api/printer/printer-templater",{method:"get",data:r}));case 1:case"end":return l.stop()}},t)})),b.apply(this,arguments)}function ie(t){return H.apply(this,arguments)}function H(){return H=(0,B.Z)((0,p.Z)().mark(function t(r){return(0,p.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,W.WY)("/kitchen/api/printer/printer-template",{method:"post",data:r}));case 1:case"end":return l.stop()}},t)})),H.apply(this,arguments)}function se(t){return J.apply(this,arguments)}function J(){return J=(0,B.Z)((0,p.Z)().mark(function t(r){return(0,p.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,W.WY)("/kitchen/api/printer/printer-template",{method:"put",data:r}));case 1:case"end":return l.stop()}},t)})),J.apply(this,arguments)}function ue(t){return S.apply(this,arguments)}function S(){return S=(0,B.Z)((0,p.Z)().mark(function t(r){return(0,p.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,W.WY)("/kitchen/api/printer/del-printer-templater",{method:"post",data:r}));case 1:case"end":return l.stop()}},t)})),S.apply(this,arguments)}var n=e(85893),a=ee.Z.TabPane,s=function(){var r=(0,j.useRef)(),y=(0,j.useState)([]),l=(0,L.Z)(y,2),C=l[0],M=l[1],O=(0,j.useState)(),z=(0,L.Z)(O,2),K=z[0],D=z[1],w=(0,j.useState)(!1),U=(0,L.Z)(w,2),N=U[0],R=U[1];(0,j.useEffect)(function(){G()},[]),(0,j.useEffect)(function(){},[K]);var G=function(){le().then(function(u){var v;M(u.data),D((v=u.data[0])===null||v===void 0?void 0:v.id)})},V=function(u){return(0,n.jsxs)(x.ZP,{onFinish:function(){var v=(0,B.Z)((0,p.Z)().mark(function g($){var Z;return(0,p.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(N){c.next=6;break}return c.next=3,se($);case 3:c.t0=c.sent,c.next=9;break;case 6:return c.next=8,ie($);case 8:c.t0=c.sent;case 9:Z=c.t0,Z.data?(G(),_.default.success("\u6210\u529F")):_.default.success("\u5931\u8D25");case 11:case"end":return c.stop()}},g)}));return function(g){return v.apply(this,arguments)}}(),labelCol:{span:4},formRef:r,layout:"horizontal",initialValues:{id:u.id,title:u.title,subtitle:u.subtitle,explain:u.explain,isShowPrintTime:u.isShowPrintTime,isShowNumber:u.isShowNumber,Footer:u.Footer,type:u.type},autoFocusFirstInput:!0,children:[(0,n.jsx)(x.ZP.Item,{name:"id",hidden:!0,children:(0,n.jsx)(F.ZP,{mode:"edit"})}),(0,n.jsx)(x.ZP.Item,{name:"type",label:"\u5C0F\u7968\u7C7B\u578B",rules:[{required:!0}],children:(0,n.jsxs)(Q.ZP.Group,{children:[(0,n.jsx)(Q.ZP,{value:1,children:"\u6536\u94F6(\u51FA\u9910)\u5C0F\u7968"}),(0,n.jsx)(Q.ZP,{value:2,children:"\u8D34\u7EB8\u5C0F\u7968"})]})}),(0,n.jsx)(x.ZP.Item,{name:"title",label:"\u6807\u9898",placeholder:"\u6807\u9898",children:(0,n.jsx)(F.ZP,{mode:"edit"})}),(0,n.jsx)(x.ZP.Item,{style:{marginTop:"-10px"},name:"subtitle",label:"\u526F\u6807\u9898",placeholder:"\u526F\u6807\u9898",children:(0,n.jsx)(F.ZP,{mode:"edit"})}),(0,n.jsx)(x.ZP.Item,{style:{marginTop:"-10px"},name:"explain",label:"\u8BF4\u660E\uFF08\u6B22\u8FCE\u8BED\uFF09",placeholder:"\u8BF4\u660E\uFF08\u6B22\u8FCE\u8BED\uFF09",children:(0,n.jsx)(F.ZP,{mode:"edit"})}),(0,n.jsx)(x.ZP.Item,{style:{marginTop:"-10px"},name:"isShowPrintTime",label:"\u662F\u5426\u663E\u793A\u65F6\u95F4",placeholder:"",children:(0,n.jsx)(F.ZP,{mode:"edit",valueType:"switch"})}),(0,n.jsx)(x.ZP.Item,{style:{marginTop:"-10px"},name:"isShowNumber",label:"\u662F\u5426\u663E\u793A\u8BA2\u5355\u53F7",placeholder:"",children:(0,n.jsx)(F.ZP,{mode:"edit",valueType:"switch"})}),(0,n.jsx)(x.ZP.Item,{style:{marginTop:"-10px"},name:"Footer",label:"\u9875\u811A",placeholder:"\u9875\u811A",children:(0,n.jsx)(F.ZP,{mode:"edit"})})]})},X=function(u){D(u)},Y=function(u,v){v=="remove"?(R(!1),ue([u]).then(function(g){G()})):(R(!0),P(u))},P=function(u){var v="\u6A21\u677F"+C.length,g=(0,i.Z)(C);g.push({title:"\u6A21\u677F"+g.length,content:(0,n.jsx)("div",{children:" "}),id:v}),D(v),M(g)};return(0,n.jsx)(ne.ZP,{children:(0,n.jsx)(ee.Z,{type:"editable-card",onChange:X,activeKey:K,onEdit:Y,children:C==null?void 0:C.map(function(o){return(0,n.jsx)(a,{tab:o.title,children:(0,n.jsxs)(m.Z,{children:[(0,n.jsx)(h.Z,{span:12,push:12,children:(0,n.jsx)(k.Z,{children:V(o)})}),(0,n.jsx)(h.Z,{span:12,pull:12,children:(0,n.jsx)(k.Z,{children:"\u6A21\u677F\u6837\u5F0F"})})]})},o.id)})})})},d=s},5467:function(te,I,e){"use strict";e.d(I,{Z:function(){return E}});function E(m){return Object.keys(m).reduce(function(A,h){return(h.startsWith("data-")||h.startsWith("aria-")||h==="role")&&!h.startsWith("data-__")&&(A[h]=m[h]),A},{})}},47933:function(te,I,e){"use strict";e.d(I,{ZP:function(){return n}});var E=e(22122),m=e(96156),A=e(28481),h=e(94184),ae=e.n(h),k=e(21770),i=e(67294),q=e(53124),Q=e(97647),p=e(5467),re=i.createContext(null),_=re.Provider,B=re,L=i.createContext(null),oe=L.Provider,ee=e(50132),ne=e(42550),j=e(98866),x=e(65223),F=function(a,s){var d={};for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&s.indexOf(t)<0&&(d[t]=a[t]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(a);r0&&(c=N.map(function(f){return typeof f=="string"||typeof f=="number"?i.createElement(b,{key:f.toString(),prefixCls:Z,disabled:V,value:f,checked:O===f},f):i.createElement(b,{key:"radio-group-value-options-".concat(f.value),prefixCls:Z,disabled:f.disabled||V,value:f.value,checked:O===f.value,style:f.style},f.label)}));var de=Y||l,me=ae()(T,"".concat(T,"-").concat(G),(d={},(0,m.Z)(d,"".concat(T,"-").concat(de),de),(0,m.Z)(d,"".concat(T,"-rtl"),y==="rtl"),d),U);return i.createElement("div",(0,E.Z)({},(0,p.Z)(a),{className:me,style:P,onMouseEnter:u,onMouseLeave:v,onFocus:g,onBlur:$,id:o,ref:s}),i.createElement(_,{value:{onChange:K,value:O,disabled:a.disabled,name:a.name,optionType:a.optionType}},c))}),H=i.memo(ie),se=function(a,s){var d={};for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&s.indexOf(t)<0&&(d[t]=a[t]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(a);r