包含后厨 团餐 门店分支
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

2 行
9.7 KiB

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