包含后厨 团餐 门店分支
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

2 líneas
12 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8360],{23145:function(xe,H,t){"use strict";t.r(H),t.d(H,{default:function(){return me}});var Ee=t(57663),X=t(71577),$e=t(62350),b=t(24565),De=t(71153),q=t(60331),u=t(39428),Te=t(34792),g=t(48086),h=t(3182),S=t(2824),_=t(28790),ee=t(16894),P=t(48971);function re(){return w.apply(this,arguments)}function w(){return w=(0,h.Z)((0,u.Z)().mark(function i(){return(0,u.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",(0,P.WY)("/storemanagement/api/shop/alllist",{method:"GET"}));case 1:case"end":return p.stop()}},i)})),w.apply(this,arguments)}function te(i){return B.apply(this,arguments)}function B(){return B=(0,h.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,P.WY)("/storemanagement/api/Printer/AddPrinter",{method:"Post",data:n}));case 1:case"end":return a.stop()}},i)})),B.apply(this,arguments)}function ne(i){return(0,P.WY)("/storemanagement/api/Printer/GetPrinterList?storeId="+i,{method:"get",data:i})}function ae(i){return G.apply(this,arguments)}function G(){return G=(0,h.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,P.WY)("/storemanagement/api/Printer/UpdatePrinter",{method:"post",data:n}));case 1:case"end":return a.stop()}},i)})),G.apply(this,arguments)}function ue(i,n){return M.apply(this,arguments)}function M(){return M=(0,h.Z)((0,u.Z)().mark(function i(n,p){return(0,u.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.abrupt("return",(0,P.WY)("/storemanagement/api/Printer/SetPrinterHost?storeId=".concat(n,"&id=").concat(p),{method:"post"}));case 1:case"end":return v.stop()}},i)})),M.apply(this,arguments)}function se(i){return k.apply(this,arguments)}function k(){return k=(0,h.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,P.WY)("/storemanagement/api/Printer/DelPrinter",{method:"post",data:n}));case 1:case"end":return a.stop()}},i)})),k.apply(this,arguments)}function le(i){return L.apply(this,arguments)}function L(){return L=(0,h.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,P.WY)("/storemanagement/api/Printer/GetPrinterTemplater",{method:"get",data:n}));case 1:case"end":return a.stop()}},i)})),L.apply(this,arguments)}function ie(i){return O.apply(this,arguments)}function O(){return O=(0,h.Z)((0,u.Z)().mark(function i(n){return(0,u.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,P.WY)("/storemanagement/api/Printer/GetStoreFoodMenu?storeId="+n,{method:"get",data:n}));case 1:case"end":return a.stop()}},i)})),O.apply(this,arguments)}var y=t(67294),oe=t(49101),we=t(71194),de=t(50146),Be=t(63185),U=t(9676),Ge=t(13062),K=t(71230),Me=t(43358),z=t(34041),ke=t(89032),C=t(15746),Le=t(47673),A=t(4107),Oe=t(9715),I=t(55843),e=t(85893),ce=function(n){var p,a=I.Z.useForm(),v=(0,S.Z)(a,1),x=v[0],R=function(){var F=(0,h.Z)((0,u.Z)().mark(function D(){var j,$,E;return(0,u.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,x.validateFields();case 2:if(j=Z.sent,!j.id){Z.next=10;break}return Z.next=6,ae(j);case 6:$=Z.sent,$.statusCode===200?(g.default.success("\u6253\u5370\u673A\u66F4\u65B0\u6210\u529F\uFF01"),n.onOk()):g.default.error($.errors||"\u6253\u5370\u673A\u66F4\u65B0\u5931\u8D25\uFF01"),Z.next=15;break;case 10:return j.storeId=n.currentStore,Z.next=13,te(j);case 13:E=Z.sent,E.statusCode===200?(g.default.success("\u6253\u5370\u673A\u521B\u5EFA\u6210\u529F\uFF01"),n.onOk()):g.default.error(E.errors||"\u6253\u5370\u673A\u521B\u5EFA\u5931\u8D25\uFF01");case 15:case"end":return Z.stop()}},D)}));return function(){return F.apply(this,arguments)}}();return(0,y.useEffect)(function(){x.setFieldsValue(n.printer)},[]),(0,e.jsx)(de.Z,{title:"\u3010".concat(((p=n.printer)===null||p===void 0?void 0:p.name)||"\u65B0\u5EFA","\u3011\u6253\u5370\u673A"),destroyOnClose:!0,width:900,visible:n.isModalOpen,onOk:R,onCancel:n.onCancel,children:(0,e.jsxs)(I.Z,{name:"basic",labelCol:{span:8},autoComplete:"off",form:x,children:[(0,e.jsx)(I.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(A.Z,{})}),(0,e.jsxs)(K.Z,{children:[(0,e.jsx)(C.Z,{span:12,children:(0,e.jsx)(I.Z.Item,{name:"name",label:"\u6253\u5370\u673A\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u6253\u5370\u673A\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6253\u5370\u673A\u540D\u79F0\uFF01"}],children:(0,e.jsx)(A.Z,{})})}),(0,e.jsx)(C.Z,{span:12,children:(0,e.jsx)(I.Z.Item,{name:"applicationId",label:"\u5E94\u7528ID",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528ID",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5E94\u7528ID\uFF01"}],children:(0,e.jsx)(A.Z,{})})}),(0,e.jsx)(C.Z,{span:12,children:(0,e.jsx)(I.Z.Item,{name:"applicationkey",label:"\u5E94\u7528\u79D8\u94A5",placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u79D8\u94A5",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5E94\u7528\u79D8\u94A5\uFF01"}],children:(0,e.jsx)(A.Z,{})})}),(0,e.jsx)(C.Z,{span:12,children:(0,e.jsx)(I.Z.Item,{name:"terminalId",label:"\u7EC8\u7AEFID",placeholder:"\u7EC8\u7AEFID",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7EC8\u7AEFID\uFF01"}],children:(0,e.jsx)(A.Z,{})})}),(0,e.jsx)(C.Z,{span:12,children:(0,e.jsx)(I.Z.Item,{name:"terminalKey",label:"\u7EC8\u7AEF\u79D8\u94A5",placeholder:"\u7EC8\u7AEF\u79D8\u94A5",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7EC8\u7AEF\u79D8\u94A5\uFF01"}],children:(0,e.jsx)(A.Z,{})})}),(0,e.jsx)(C.Z,{span:12,children:(0,e.jsx)(I.Z.Item,{name:"templaterId",label:"\u6253\u5370\u673A\u6A21\u677F",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6253\u5370\u673A\u6A21\u677F\uFF01"}],children:(0,e.jsx)(z.Z,{placeholder:"\u8BF7\u9009\u62E9\u6253\u5370\u673A\u6A21\u677F\uFF01",allowClear:!0,children:n.printerTemplaterList.map(function(F){return(0,e.jsx)(z.Z.Option,{value:F.value,children:F.label},F.value)})})})})]}),(0,e.jsx)(I.Z.Item,{name:"goodsIdList",label:"\u5546\u54C1",labelCol:{span:3},children:(0,e.jsx)(U.Z.Group,{children:(0,e.jsx)(K.Z,{children:n.storeFoodMenuAll.map(function(F){return(0,e.jsx)(C.Z,{span:8,children:(0,e.jsx)(U.Z,{value:F.foodId,style:{lineHeight:"32px"},children:F.foodName})},F.foodId)})})})})]})})},fe=ce,pe=function(){var n=(0,y.useRef)(),p=(0,y.useState)(null),a=(0,S.Z)(p,2),v=a[0],x=a[1],R=(0,y.useState)([]),F=(0,S.Z)(R,2),D=F[0],j=F[1],$=(0,y.useState)([]),E=(0,S.Z)($,2),W=E[0],Z=E[1],he=(0,y.useState)(!1),N=(0,S.Z)(he,2),V=N[0],T=N[1],ve=(0,y.useState)(null),J=(0,S.Z)(ve,2),Ze=J[0],Y=J[1],ge=(0,y.useState)([]),Q=(0,S.Z)(ge,2),Fe=Q[0],ye=Q[1],Ie=function(){var d=(0,h.Z)((0,u.Z)().mark(function l(){var r,f,o;return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,re();case 3:r=s.sent,r.statusCode===200?((f=r.data)===null||f===void 0||f.forEach(function(m){m.value=m.id,m.label=m.name}),x((o=r.data[0])===null||o===void 0?void 0:o.id),j(r.data)):g.default.error(r.errors||"\u83B7\u53D6\u5E97\u94FA\u5217\u8868\u5931\u8D25"),s.next=10;break;case 7:s.prev=7,s.t0=s.catch(0),j([]);case 10:case"end":return s.stop()}},l,null,[[0,7]])}));return function(){return d.apply(this,arguments)}}(),Pe=function(){var d=(0,h.Z)((0,u.Z)().mark(function l(){var r,f;return(0,u.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,le();case 2:r=c.sent,r.statusCode===200?((f=r.data)===null||f===void 0||f.forEach(function(s){s.value=s.id,s.label=s.title}),Z(r.data)):g.default.error(r.errors||"\u83B7\u53D6\u6253\u5370\u673A\u6A21\u677F\u5217\u8868\u5931\u8D25");case 4:case"end":return c.stop()}},l)}));return function(){return d.apply(this,arguments)}}(),je=function(){var d=(0,h.Z)((0,u.Z)().mark(function l(){var r;return(0,u.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,ie(v);case 2:r=o.sent,r.statusCode===200&&ye(r.data);case 4:case"end":return o.stop()}},l)}));return function(){return d.apply(this,arguments)}}(),Se=function(){var d=(0,h.Z)((0,u.Z)().mark(function l(r){var f,o;return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,ue(v,r);case 2:f=s.sent,f.statusCode===200?(g.default.success("\u8BBE\u7F6E\u4E3B\u6253\u5370\u673A\u6210\u529F\uFF01"),(o=n.current)===null||o===void 0||o.reload()):g.default.error(f.errors||"\u8BBE\u7F6E\u4E3B\u6253\u5370\u673A\u51FA\u9519");case 4:case"end":return s.stop()}},l)}));return function(r){return d.apply(this,arguments)}}(),Ce=function(){var d=(0,h.Z)((0,u.Z)().mark(function l(r){var f,o;return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,se([r]);case 2:f=s.sent,f.statusCode===200?(g.default.success("\u5220\u9664\u6210\u529F\uFF01"),(o=n.current)===null||o===void 0||o.reload()):g.default.error(g.default.error||"\u5220\u9664\u5931\u8D25");case 4:case"end":return s.stop()}},l)}));return function(r){return d.apply(this,arguments)}}(),Ae=[{title:"\u95E8\u5E97",valueType:"select",hideInTable:!0,dataIndex:"storeId",fieldProps:{options:D,value:v,onChange:function(l){x(l)}}},{title:"\u6253\u5370\u673A\u540D\u79F0",dataIndex:"name",key:"name",render:function(l,r){return[r.isHost?(0,e.jsxs)("div",{children:[r.name,(0,e.jsx)(q.Z,{style:{marginLeft:"5px"},color:"#87d068",children:"\u4E3B\u6253\u5370\u673A"})]}):r.name]},hideInSearch:!0},{title:"\u5E94\u7528ID",dataIndex:"applicationId",key:"applicationId",hideInSearch:!0},{title:"\u7EC8\u7AEFID",dataIndex:"terminalId",key:"terminalId",hideInSearch:!0},{title:"\u6A21\u677F",dataIndex:"templaterId",key:"templaterId",valueType:"select",hideInSearch:!0,fieldProps:{options:W}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",fixed:"right",width:200,render:function(l,r,f,o){return[(0,e.jsx)("a",{onClick:function(){Y(r),T(!0)},children:"\u7F16\u8F91"},"edit"),(0,e.jsx)(b.Z,{title:"\u786E\u5B9A\u8981\u5C06\u3010".concat(r.name,"\u3011\u8BBE\u4E3A\u4E3B\u6253\u5370\u673A\u5417\uFF1F"),onConfirm:function(){return Se(r.id)},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,e.jsx)("a",{href:"#",children:"\u4E3B\u6253\u5370\u673A"})},"confirm"),(0,e.jsx)(b.Z,{title:"\u786E\u5B9A\u8981\u5C06\u3010".concat(r.name,"\u3011\u5220\u9664\u5417\uFF1F"),onConfirm:function(){return Ce(r.id)},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,e.jsx)("a",{href:"#",children:"\u5220\u9664"})},"delete")]}}];return(0,y.useEffect)(function(){Ie(),Pe()},[]),(0,y.useEffect)(function(){var d;(d=n.current)===null||d===void 0||d.reload(),je()},[v]),(0,e.jsxs)(_.ZP,{header:{title:"",breadcrumb:{}},children:[(0,e.jsx)(ee.ZP,{pagination:{pageSize:10},scroll:{x:1300},columns:Ae,actionRef:n,cardBordered:!0,request:(0,h.Z)((0,u.Z)().mark(function d(){var l,r,f,o,c=arguments;return(0,u.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(l=c.length>0&&c[0]!==void 0?c[0]:{},r=c.length>1?c[1]:void 0,f=c.length>2?c[2]:void 0,!v){m.next=14;break}return m.next=6,ne(v);case 6:if(o=m.sent,o.statusCode!==200){m.next=11;break}return m.abrupt("return",{data:o.data,success:!0});case 11:g.default.error(o.errors||"\u83B7\u53D6\u6253\u5370\u673A\u5217\u8868\u51FA\u9519");case 12:m.next=15;break;case 14:return m.abrupt("return",[]);case 15:case"end":return m.stop()}},d)})),rowKey:"id",dateFormatter:"string",headerTitle:"\u6253\u5370\u673A\u5217\u8868",toolBarRender:function(){return[(0,e.jsx)(X.Z,{icon:(0,e.jsx)(oe.Z,{}),type:"primary",onClick:function(){Y(null),T(!0)},children:"\u65B0\u5EFA"},"button")]}}),V&&(0,e.jsx)(fe,{storeFoodMenuAll:Fe,currentStore:v,isModalOpen:V,onOk:function(){var l;T(!1),(l=n.current)===null||l===void 0||l.reload()},onCancel:function(){T(!1),Y(null)},printerTemplaterList:W,printer:Ze})]})},me=pe}}]);