包含后厨 团餐 门店分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
8.7 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9901],{87430:function(ve,V,e){"use strict";e.r(V),e.d(V,{default:function(){return he}});var fe=e(57338),Q=e(83107),pe=e(57663),k=e(71577),me=e(62350),X=e(24565),i=e(39428),ge=e(34792),y=e(48086),m=e(3182),ye=e(402),q=e(56256),g=e(2824),_=e(49101),p=e(67294),ee=e(28790),te=e(85224),L=e(16894),E=e(12826),Ze=e(71194),ae=e(50146),Se=e(13062),U=e(71230),xe=e(89032),J=e(15746),Ce=e(43358),ne=e(34041),D=e(48971);function re(o){return $.apply(this,arguments)}function $(){return $=(0,m.Z)((0,i.Z)().mark(function o(c){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,D.WY)("/groupmeal/api/devicepushrecode/page",{method:"POST",data:c}));case 1:case"end":return a.stop()}},o)})),$.apply(this,arguments)}function ue(o){return G.apply(this,arguments)}function G(){return G=(0,m.Z)((0,i.Z)().mark(function o(c){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,D.WY)("/groupmeal/api/devicepushrecode/add",{method:"POST",data:c}));case 1:case"end":return a.stop()}},o)})),G.apply(this,arguments)}function De(o){return A.apply(this,arguments)}function A(){return A=_asyncToGenerator(_regeneratorRuntime().mark(function o(c){return _regeneratorRuntime().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",request("/groupmeal/api/devicepushrecode/update",{method:"POST",data:c}));case 1:case"end":return a.stop()}},o)})),A.apply(this,arguments)}function se(o){return O.apply(this,arguments)}function O(){return O=(0,m.Z)((0,i.Z)().mark(function o(c){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,D.WY)("/groupmeal/api/devicepushrecode/delete",{method:"POST",data:c}));case 1:case"end":return a.stop()}},o)})),O.apply(this,arguments)}function le(){return W.apply(this,arguments)}function W(){return W=(0,m.Z)((0,i.Z)().mark(function o(){return(0,i.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",(0,D.WY)("/saasbase/api/device/list",{method:"GET"}));case 1:case"end":return f.stop()}},o)})),W.apply(this,arguments)}function ie(o){return b.apply(this,arguments)}function b(){return b=(0,m.Z)((0,i.Z)().mark(function o(c){return(0,i.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,D.WY)("/saasbase/api/batching/getpage",{method:"Post",data:c}));case 1:case"end":return a.stop()}},o)})),b.apply(this,arguments)}var n=e(85893),oe=function(c){var f=(0,p.useState)([]),a=(0,g.Z)(f,2),P=a[0],Y=a[1],T=(0,p.useState)([]),B=(0,g.Z)(T,2),R=B[0],S=B[1],z=(0,p.useState)([]),j=(0,g.Z)(z,2),v=j[0],C=j[1],H=(0,p.useState)(),w=(0,g.Z)(H,2),Z=w[0],I=w[1],K=(0,p.useState)([]),F=(0,g.Z)(K,2),M=F[0],N=F[1],d=(0,p.useRef)();(0,p.useEffect)(function(){console.log(c.values),le().then(function(t){N(t.data);var l=t.data.map(function(x){return{value:x.id,label:x.name}});Y(l)});var r={current:1,pageSize:10};u(r)},[c.values]);var u=function(t){ie(t).then(function(l){C(l.data.data)})},s=function(t){I(t);var l={current:1,pageSize:10,deviceId:t};u(l)},h=[{title:"\u7F16\u7801",dataIndex:"code",valueType:"textarea",with:50},{title:"\u540D\u79F0",dataIndex:"name",valueType:"textarea"}];return(0,n.jsxs)(ae.Z,{title:"\u4E0B\u53D1\u6570\u636E",width:1040,visible:c.createModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){if(!Z)y.default.error("\u8BF7\u9009\u62E9\u8BBE\u5907");else{var t=M.find(function(x){return x.id==Z}),l={deviceId:t.id,deviceName:t.name,deviceAutoKey:t.autoKey,type:2,data:R};c.HandleOk(l),console.log(t)}},onCancel:function(){c.onCancel()},destroyOnClose:!0,children:[(0,n.jsx)(U.Z,{gutter:26,style:{marginBottom:20},children:(0,n.jsxs)(J.Z,{lg:24,md:24,sm:24,children:["\u9009\u62E9\u8BBE\u5907\uFF1A",(0,n.jsx)(ne.Z,{allowClear:!0,style:{width:"60%"},placeholder:"\u8BF7\u9009\u62E9\u8981\u4E0B\u53D1\u8BBE\u5907",onChange:s,options:P})]})}),(0,n.jsx)(U.Z,{gutter:26,children:(0,n.jsxs)(J.Z,{span:24,children:["\u9009\u62E9\u6570\u636E\uFF1A",(0,n.jsx)(L.ZP,{headerTitle:"",actionRef:d,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},dataSource:v,columns:h,rowSelection:{onChange:function(t,l){S(l)}}})]})})]})},ce=oe,de=function(){var c=(0,p.useState)(!1),f=(0,g.Z)(c,2),a=f[0],P=f[1],Y=(0,p.useState)(!1),T=(0,g.Z)(Y,2),B=T[0],R=T[1],S=(0,p.useRef)(),z=(0,p.useState)(),j=(0,g.Z)(z,2),v=j[0],C=j[1],H=(0,p.useState)([]),w=(0,g.Z)(H,2),Z=w[0],I=w[1],K=q.Z.Paragraph;(0,p.useEffect)(function(){},[]);var F=function(){var d=(0,m.Z)((0,i.Z)().mark(function u(s){var h;return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(h=y.default.loading("\u6B63\u5728\u5220\u9664"),s){t.next=3;break}return t.abrupt("return",!0);case 3:return t.next=5,se(s.map(function(l){return l.id})).then(function(l){l.succeeded?(y.default.success("\u5220\u9664\u6210\u529F"),S.current.reload()):y.default.error(l.errors)});case 5:return h(),t.abrupt("return",!0);case 7:case"end":return t.stop()}},u)}));return function(s){return d.apply(this,arguments)}}(),M=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",render:function(u,s){return(0,n.jsx)("a",{onClick:function(){C(s),R(!0)},children:u})}},{title:"\u4E0B\u53D1\u8BBE\u5907",dataIndex:"deviceName",valueType:"textarea",ellipsis:!0},{title:"\u4E0B\u53D1\u6570\u636E",dataIndex:"type",ellipsis:!0,valueEnum:{2:{text:"\u7269\u6599"}}},{title:"\u4E0B\u53D1\u65F6\u95F4",dataIndex:"createAt",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(u,s){return[(0,n.jsx)("a",{onClick:function(){R(!0),C(s)},children:"\u4E0B\u53D1\u8BE6\u60C5"},"config"),(0,n.jsx)(X.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,m.Z)((0,i.Z)().mark(function h(){return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,DeleteGoodsType(s.id).then(function(l){l.succeeded?(y.default.success("\u5220\u9664\u6210\u529F"),S.current.reload()):y.default.error(l.errors)});case 2:case"end":return t.stop()}},h)})),onCancel:function(){},children:(0,n.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}],N=function(){var d=(0,m.Z)((0,i.Z)().mark(function u(s){return(0,i.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,ue(s).then(function(t){t.data?(y.default.success("\u64CD\u4F5C\u6210\u529F"),P(!1),S.current.reload()):y.default.error(t.errors)});case 2:case"end":return r.stop()}},u)}));return function(s){return d.apply(this,arguments)}}();return(0,n.jsxs)(ee.ZP,{host:!0,header:{title:"",breadcrumb:{}},children:[(0,n.jsx)(L.ZP,{headerTitle:"",actionRef:S,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,n.jsxs)(k.Z,{type:"primary",onClick:function(){P(!0)},children:[(0,n.jsx)(_.Z,{})," \u4E0B\u53D1\u6570\u636E"]},"primary")]},request:function(){var d=(0,m.Z)((0,i.Z)().mark(function u(s){var h,r;return(0,i.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return h=[],r=0,s.type=2,l.next=5,re(s).then(function(x){h=x.data.data,r=x.data.total});case 5:return l.abrupt("return",{data:h,success:!0,total:r});case 6:case"end":return l.stop()}},u)}));return function(u){return d.apply(this,arguments)}}(),columns:M,rowSelection:{onChange:function(u,s){I(s)}}}),(Z==null?void 0:Z.length)>0&&(0,n.jsx)(te.Z,{extra:(0,n.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,n.jsx)("a",{style:{fontWeight:600},children:Z.length})," ","\u9879 \xA0\xA0"]}),children:(0,n.jsx)(k.Z,{onClick:(0,m.Z)((0,i.Z)().mark(function d(){var u,s;return(0,i.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,F(Z);case 2:I([]),(u=S.current)===null||u===void 0||(s=u.reloadAndRest)===null||s===void 0||s.call(u);case 4:case"end":return r.stop()}},d)})),children:"\u5220\u9664"})}),(0,n.jsx)(ce,{onFinish:function(){var d=(0,m.Z)((0,i.Z)().mark(function u(s){return(0,i.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:case"end":return r.stop()}},u)}));return function(u){return d.apply(this,arguments)}}(),onCancel:function(){P(!1),C(void 0)},createModalVisible:a,HandleOk:N,values:v||{}}),(0,n.jsx)(Q.Z,{width:600,visible:B,onClose:function(){C(void 0),R(!1)},closable:!1,children:(v==null?void 0:v.deviceName)&&(0,n.jsxs)(E.ZP,{column:1,title:"\u4E0B\u53D1\u8BE6\u60C5",children:[(0,n.jsx)(E.ZP.Item,{label:"\u4E0B\u53D1\u8BBE\u5907",valueType:"text",children:v==null?void 0:v.deviceName}),(0,n.jsx)(E.ZP.Item,{label:"topic",valueType:"text",copyable:!0,children:(0,n.jsx)(K,{copyable:!0,children:v==null?void 0:v.topic})}),(0,n.jsx)(E.ZP.Item,{contentStyle:{maxWidth:"85%"},label:"\u4E0B\u53D1\u6570\u636E",valueType:"jsonCode",children:v==null?void 0:v.dataResore})]})})]})},he=de}}]);