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 rivejä
20 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3845],{24855:function(Ke,oe,d){"use strict";d.r(oe),d.d(oe,{default:function(){return Ue}});var Je=d(57663),P=d(71577),ze=d(58024),ve=d(91894),He=d(32157),me=d(7573),w=d(2824),a=d(39428),$=d(11849),Qe=d(34792),i=d(48086),h=d(3182),fe=d(49101),g=d(67294),he=d(78009),Ze=d(85224),N=d(16894),Xe=d(71194),K=d(50146),C=d(48971);function ye(n,t){return J.apply(this,arguments)}function J(){return J=(0,h.Z)((0,a.Z)().mark(function n(t,p){return(0,a.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.abrupt("return",(0,C.WY)("/kitchen/api/Device/GetDeviceGoods",{method:"POST",data:(0,$.Z)({},t)}));case 1:case"end":return y.stop()}},n)})),J.apply(this,arguments)}function ge(n){return z.apply(this,arguments)}function z(){return z=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/AddDeviceGood",{method:"POST",data:(0,$.Z)({},t)}));case 1:case"end":return e.stop()}},n)})),z.apply(this,arguments)}function Se(n){return H.apply(this,arguments)}function H(){return H=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("\u200B/kitchen/api/Device/DelDeviceGood",{method:"POST",data:t}));case 1:case"end":return e.stop()}},n)})),H.apply(this,arguments)}function Ce(n){return Q.apply(this,arguments)}function Q(){return Q=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/StoreDeviceTree?isTMC=false",{data:(0,$.Z)({},t)}));case 1:case"end":return e.stop()}},n)})),Q.apply(this,arguments)}function ke(n){return X.apply(this,arguments)}function X(){return X=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/\u200Bapi/Device/GetGoods",{method:"POST",data:(0,$.Z)({},t)}));case 1:case"end":return e.stop()}},n)})),X.apply(this,arguments)}var s=d(85893),we=function(t){var p=(0,g.useState)([]),e=(0,w.Z)(p,2),y=e[0],c=e[1],o=[{title:"\u5546\u54C1id",dataIndex:"goodsId",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u5546\u54C1\u540D\u79F0",dataIndex:"goodsName"}];return(0,s.jsx)(K.Z,{width:700,bodyStyle:{padding:"32px 40px 48px"},destroyOnClose:!0,title:"\u9009\u62E9\u5546\u54C1",visible:t.modalVisible,onCancel:function(){return t.onCancel()},onOk:function(){return t.onSubmit(y)},maskClosable:!1,children:(0,s.jsx)(N.ZP,{headerTitle:"\u5546\u54C1\u4FE1\u606F",rowKey:"goodsId",pagination:{defaultPageSize:5e3},search:!1,toolBarRender:!1,params:{DeviceId:t.values},request:function(){var D=(0,h.Z)((0,a.Z)().mark(function S(b){var k,E;return(0,a.Z)().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return k=[],E=0,F.next=4,ke(b).then(function(O){k=O.data,E=1});case 4:return F.abrupt("return",{data:k,success:!0,total:E});case 5:case"end":return F.stop()}},S)}));return function(S){return D.apply(this,arguments)}}(),columns:o,rowSelection:{onChange:function(S,b){return c(b)}}})})},De=we,qe=d(62350),pe=d(24565),_e=d(77883),be=d(85986),er=d(9715),R=d(71257),rr=d(47673),je=d(4107),tr=d(43358),T=d(34041);function Fe(n){return q.apply(this,arguments)}function q(){return q=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/GetDeviceStorePage",{method:"POST",data:t}));case 1:case"end":return e.stop()}},n)})),q.apply(this,arguments)}function Be(n){return _.apply(this,arguments)}function _(){return _=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/PushDeviceTMC?DeviceId=".concat(t),{method:"post"}));case 1:case"end":return e.stop()}},n)})),_.apply(this,arguments)}function Ie(n){return ee.apply(this,arguments)}function ee(){return ee=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/PushStirFryTimeAsync?DeviceId=".concat(t),{method:"post"}));case 1:case"end":return e.stop()}},n)})),ee.apply(this,arguments)}function Ae(n){return re.apply(this,arguments)}function re(){return re=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/CheckStockAdjust?DeviceId=".concat(t),{method:"POST"}));case 1:case"end":return e.stop()}},n)})),re.apply(this,arguments)}function Te(n){return te.apply(this,arguments)}function te(){return te=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/CheckStockTMCAdjust?DeviceId=".concat(t),{method:"POST"}));case 1:case"end":return e.stop()}},n)})),te.apply(this,arguments)}function Ee(n){return ae.apply(this,arguments)}function ae(){return ae=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/AddUpdateDeviceStocAsync",{method:"POST",data:t}));case 1:case"end":return e.stop()}},n)})),ae.apply(this,arguments)}function Pe(n){return ne.apply(this,arguments)}function ne(){return ne=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/GetProductListByBom",{method:"post",data:t}));case 1:case"end":return e.stop()}},n)})),ne.apply(this,arguments)}function Oe(n){return ue.apply(this,arguments)}function ue(){return ue=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/GetProductList",{method:"post",data:t}));case 1:case"end":return e.stop()}},n)})),ue.apply(this,arguments)}function xe(n){return se.apply(this,arguments)}function se(){return se=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/AddUpdateDeviceStocAsync",{method:"put",data:t}));case 1:case"end":return e.stop()}},n)})),se.apply(this,arguments)}function Re(n){return ie.apply(this,arguments)}function ie(){return ie=(0,h.Z)((0,a.Z)().mark(function n(t){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,C.WY)("/kitchen/api/Device/DelStockAdjust?Id=".concat(t),{method:"DELETE"}));case 1:case"end":return e.stop()}},n)})),ie.apply(this,arguments)}var Ge=function(t){var p=T.Z.Option,e=T.Z.OptGroup,y=(0,g.useState)([]),c=(0,w.Z)(y,2),o=c[0],D=c[1];return(0,g.useEffect)(function(){var S=function(){t.isbom?Pe({DeviceId:t.DeviceId,BomIds:t.bomIds}).then(function(k){D(k.data)}):Oe({DeviceId:t.DeviceId}).then(function(k){D(k.data)})};S()},[]),(0,s.jsx)(K.Z,{title:t.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:t.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){t.onCancel()},destroyOnClose:!0,children:(0,s.jsxs)(R.Z,{layout:"vertical",preserve:!1,initialValues:t.values,onFinish:t.onFinish,children:[(0,s.jsx)(R.Z.Item,{name:"id",hidden:!0,children:(0,s.jsx)(je.Z,{})}),(0,s.jsx)(R.Z.Item,{name:"batching_Id",label:"\u539F\u6599\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u539F\u6599\u540D\u79F0"}],children:(0,s.jsx)(T.Z,{placeholder:"\u8BF7\u9009\u62E9\u539F\u6599\u540D\u79F0",showSearch:!0,optionFilterProp:"children",filterOption:function(b,k){return k.children.toLowerCase().indexOf(b.toLowerCase())>=0},children:o.map(function(S,b){return(0,s.jsx)(T.Z.Option,{index:b,value:S.id,children:S.name},S.id)})})}),(0,s.jsx)(R.Z.Item,{name:"batching_Loc",label:"\u5E93\u5B58\u4F4D\u7F6E",rules:[{required:!0}],defaultValue:"0",children:(0,s.jsxs)(T.Z,{placeholder:"\u8BF7\u9009\u62E9\u5E93\u5B58\u4F4D\u7F6E",children:[(0,s.jsx)(T.Z.Option,{index:1,value:1,children:1},1),(0,s.jsx)(T.Z.Option,{index:2,value:2,children:2},2),(0,s.jsx)(T.Z.Option,{index:3,value:3,children:3},3)]})}),(0,s.jsx)(R.Z.Item,{name:"batching_Count",label:"\u539F\u6599\u6570\u91CF",rules:[{required:!0}],defaultValue:"0",children:(0,s.jsx)(be.Z,{min:0,placeholder:"\u8BF7\u8F93\u5165\u539F\u6599\u6570\u91CF"})}),(0,s.jsx)(R.Z.Item,{children:(0,s.jsx)(P.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},$e=Ge,j="message",Me=function(t){var p=(0,g.useState)(!1),e=(0,w.Z)(p,2),y=e[0],c=e[1],o=(0,g.useRef)(),D=(0,g.useState)(),S=(0,w.Z)(D,2),b=S[0],k=S[1],E=(0,g.useState)([]),I=(0,w.Z)(E,2),F=I[0],O=I[1],M=(0,g.useState)(0),W=(0,w.Z)(M,2),V=W[0],le=W[1],Y=function(){var m=(0,h.Z)((0,a.Z)().mark(function v(u){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,u.DeviceId=t.values.key,i.default.loading("\u6B63\u5728\u6DFB\u52A0",j),r.next=5,Ee(JSON.stringify(u)).then(function(f){return i.default.destroy(j),f.data?(i.default.success("\u6DFB\u52A0\u6210\u529F"),o.current.reload(),!0):(i.default.error("\u6DFB\u52A0\u5931\u8D25"+f.errors),o.current.reload(),!1)});case 5:r.next=12;break;case 7:return r.prev=7,r.t0=r.catch(0),i.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),o.current.reload(),r.abrupt("return",!1);case 12:case"end":return r.stop()}},v,null,[[0,7]])}));return function(u){return m.apply(this,arguments)}}(),L=function(){var m=(0,h.Z)((0,a.Z)().mark(function v(u){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,i.default.loading("\u6B63\u5728\u540C\u6B65",j),!t.isbom){r.next=7;break}return r.next=5,Be(u).then(function(f){return i.default.destroy(j),f.data?(O([]),i.default.success("\u540C\u6B65\u6210\u529F"),o.current.reload(),!0):(i.default.success("\u540C\u6B65\u5931\u8D25"),o.current.reload(),!1)});case 5:r.next=9;break;case 7:return r.next=9,Ie(u).then(function(f){return i.default.destroy(j),f.data?(O([]),i.default.success("\u540C\u6B65\u6210\u529F"),o.current.reload(),!0):(i.default.success("\u540C\u6B65\u5931\u8D25"),o.current.reload(),!1)});case 9:r.next=16;break;case 11:return r.prev=11,r.t0=r.catch(0),i.default.error("\u540C\u6B65\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),o.current.reload(),r.abrupt("return",!1);case 16:case"end":return r.stop()}},v,null,[[0,11]])}));return function(u){return m.apply(this,arguments)}}(),ce=function(){var m=(0,h.Z)((0,a.Z)().mark(function v(u){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(console.log("fdsfds"),r.prev=1,!t.isbom){r.next=7;break}return r.next=5,Te(u).then(function(f){return i.default.destroy(j),f.data?(i.default.success("\u83B7\u53D6\u6210\u529F"),o.current.reload(),!0):(i.default.error("\u83B7\u53D6\u5931\u8D25"+f.errors),o.current.reload(),!1)});case 5:r.next=9;break;case 7:return r.next=9,Ae(u).then(function(f){return i.default.destroy(j),f.data?(i.default.success("\u83B7\u53D6\u6210\u529F"),o.current.reload(),!0):(i.default.error("\u83B7\u53D6\u5931\u8D25"+f.errors),o.current.reload(),!1)});case 9:r.next=16;break;case 11:return r.prev=11,r.t0=r.catch(1),i.default.error("\u83B7\u53D6\u5931\u8D25\uFF01"),o.current.reload(),r.abrupt("return",!1);case 16:case"end":return r.stop()}},v,null,[[1,11]])}));return function(u){return m.apply(this,arguments)}}(),de=function(){var m=(0,h.Z)((0,a.Z)().mark(function v(u){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Re(u).then(function(f){f.data?(i.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),o.current.reload()):(i.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),o.current.reload())});case 3:return r.abrupt("return",!0);case 6:r.prev=6,r.t0=r.catch(0),i.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),o.current.reload();case 10:case"end":return r.stop()}},v,null,[[0,6]])}));return function(u){return m.apply(this,arguments)}}(),U=function(){var m=(0,h.Z)((0,a.Z)().mark(function v(u){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i.default.loading("\u6B63\u5728\u4FEE\u6539",j),i.default.destroy(j),u.DeviceId=t.values.key,r.next=6,xe(JSON.stringify(u)).then(function(f){return i.default.destroy(j),f.data?(i.default.success("\u4FEE\u6539\u6210\u529F"),!0):(i.default.error("\u4FEE\u6539\u5931\u8D25"+f.errors),!1)});case 6:r.next=12;break;case 8:return r.prev=8,r.t0=r.catch(0),i.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),r.abrupt("return",!1);case 12:case"end":return r.stop()}},v,null,[[0,8]])}));return function(u){return m.apply(this,arguments)}}(),x=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u7269\u6599",dataIndex:"batching_Name",valueType:"textarea"},{title:"\u6570\u91CF",dataIndex:"batching_Count",valueType:"textarea"},{title:"\u5E93\u4F4D",dataIndex:"batching_Loc"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(v,u){return[(0,s.jsxs)("a",{onClick:function(){c(!0),k(u)},children:[" ","\u4FEE\u6539"]},"config"),(0,s.jsx)(pe.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){de(u.id)},onCancel:function(){},children:(0,s.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,s.jsx)(K.Z,{width:1200,bodyStyle:{padding:"32px 40px 48px"},destroyOnClose:!0,title:(t.values==null?"":t.values.title)+"\u5E93\u5B58\u539F\u6599\u8C03\u6574",search:!1,visible:t.stockModalVisible,footer:!1,onCancel:function(){return t.onCancel()},maskClosable:!1,children:(0,s.jsxs)(he.ZP,{header:{title:"",breadcrumb:{}},children:[(0,s.jsx)(N.ZP,{headerTitle:"",actionRef:o,rowKey:"id",search:!1,toolBarRender:function(){return[(0,s.jsx)(pe.Z,{type:"primary",title:"\u83B7\u53D6\u5B9E\u65F6\u5E93\u5B58\u4F1A\u8986\u76D6\u672C\u6B21\u8865\u8D27\u6570\u636E",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){ce(t.values.key)},onCancel:function(){},children:(0,s.jsx)(P.Z,{type:"primary",children:"\u83B7\u53D6\u5B9E\u65F6\u5E93\u5B58"},"primary")},"primary"),(0,s.jsx)(P.Z,{type:"primary",onClick:function(){if(F.length==0)i.default.error("\u8BF7\u9009\u62E9\u9700\u8981\u540C\u6B65\u7684\u6570\u636E\uFF01\uFF01");else{var u,l;L(t.values.key),(u=o.current)===null||u===void 0||(l=u.reloadAndRest)===null||l===void 0||l.call(u)}},children:"\u540C\u6B65\u5E93\u5B58\u539F\u6599"},"primary"),(0,s.jsxs)(P.Z,{disabled:t.isbom&&V>14,type:"primary",onClick:function(){c(!0)},children:[(0,s.jsx)(fe.Z,{})," \u65B0\u589E\u5E93\u5B58\u539F\u6599"]},"primary")]},request:function(){var m=(0,h.Z)((0,a.Z)().mark(function v(u){var l,r;return(0,a.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return l=[],r=0,u.DeviceId=t.values.key,Z.next=5,Fe(u).then(function(A){l=A.data.data,r=A.data.total,le(r)});case 5:return Z.abrupt("return",{data:l,success:!0,total:r});case 6:case"end":return Z.stop()}},v)}));return function(v){return m.apply(this,arguments)}}(),columns:x,rowSelection:{onChange:function(v,u){O(u)}}}),(0,s.jsx)($e,{isbom:t.isbom,bomIds:t.bomIds,DeviceId:t.values==null?"":t.values.key,onFinish:function(){var m=(0,h.Z)((0,a.Z)().mark(function v(u){var l;return(0,a.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:l=!1,u.id?l=U(u):l=Y(u),l&&(c(!1),k(void 0),o.current.reload());case 3:case"end":return f.stop()}},v)}));return function(v){return m.apply(this,arguments)}}(),onCancel:function(){c(!1),k(void 0)},createModalVisible:y,values:b||{}})]})})},We=Me,Ve=function(){var n=(0,h.Z)((0,a.Z)().mark(function t(p){var e;return(0,a.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return e=i.default.loading("\u6B63\u5728\u6DFB\u52A0"),c.prev=1,c.next=4,ge((0,$.Z)({},p)).then(function(o){if(!o.succeeded)return i.default.error(o.errors),!1});case 4:return e(),i.default.success("\u6DFB\u52A0\u6210\u529F"),c.abrupt("return",!0);case 9:return c.prev=9,c.t0=c.catch(1),e(),i.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),c.abrupt("return",!1);case 14:case"end":return c.stop()}},t,null,[[1,9]])}));return function(p){return n.apply(this,arguments)}}(),Ye=function(){var n=(0,h.Z)((0,a.Z)().mark(function t(p){var e;return(0,a.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,i.default.loading("\u6B63\u5728\u5220\u9664"),e=[],p.forEach(function(o){e.push(o.id)}),c.next=6,Se(e).then(function(o){return o.data?(i.default.success("\u5220\u9664\u6210\u529F"),!0):(i.default.success("\u5220\u9664\u5931\u8D25"),!1)});case 6:c.next=12;break;case 8:return c.prev=8,c.t0=c.catch(0),i.default.error("\u5220\u9664\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),c.abrupt("return",!1);case 12:case"end":return c.stop()}},t,null,[[0,8]])}));return function(p){return n.apply(this,arguments)}}(),Le=function(){var t=(0,g.useState)(),p=(0,w.Z)(t,2),e=p[0],y=p[1],c=(0,g.useRef)(),o=(0,g.useState)(),D=(0,w.Z)(o,2),S=D[0],b=D[1],k=(0,g.useState)(),E=(0,w.Z)(k,2),I=E[0],F=E[1],O=(0,g.useState)(!1),M=(0,w.Z)(O,2),W=M[0],V=M[1],le=(0,g.useState)(),Y=(0,w.Z)(le,2),L=Y[0],ce=Y[1],de=(0,g.useState)(),U=(0,w.Z)(de,2),x=U[0],m=U[1];(0,g.useEffect)(function(){function u(){Ce().then(function(l){b(l.data)})}u()},[]);var v=[{title:"\u5546\u54C1\u540D\u79F0",dataIndex:"goods_Name"}];return(0,s.jsxs)(he.ZP,{children:[(0,s.jsx)(N.ZP,{headerTitle:"\u5546\u54C1\u5217\u8868",actionRef:c,rowKey:"id",search:{labelWidth:120},tableRender:function(l,r){return(0,s.jsxs)("div",{style:{display:"flex",width:"100%"},children:[(0,s.jsx)(ve.Z,{title:"\u5E97\u94FA\u8BBE\u5907\u5217\u8868",children:(0,s.jsx)(me.Z,{defaultExpandAll:!0,onSelect:function(Z,A){return[m(Z[0]),ce(A.node)]},treeData:S})}),(0,s.jsx)("div",{style:{flex:1},children:r})]})},toolBarRender:function(){return[(0,s.jsxs)(P.Z,{type:"primary",onClick:function(){y(!0)},children:[(0,s.jsx)(fe.Z,{})," \u4E0A\u67B6\u83DC\u54C1\u5546\u54C1"]},"primary"),(0,s.jsx)(P.Z,{type:"primary",onClick:function(){if(x==null){i.default.error("\u8BF7\u9009\u62E9\u8BBE\u5907");return}L.parentId!="0"&&V(!0)},children:"\u8BBE\u5907\u5E93\u5B58\u7BA1\u7406"},"primary")]},params:{DeviceId:x},request:function(){var u=(0,h.Z)((0,a.Z)().mark(function l(r){var f,Z;return(0,a.Z)().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return f=[],Z=0,G.next=4,ye(r).then(function(B){f=B.data.data,Z=B.data.total});case 4:return G.abrupt("return",{data:f,success:!0,total:Z});case 5:case"end":return G.stop()}},l)}));return function(l){return u.apply(this,arguments)}}(),columns:v,rowSelection:{onChange:function(l,r){F(r)}}}),(I==null?void 0:I.length)>0&&(0,s.jsx)(Ze.Z,{extra:(0,s.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,s.jsx)("a",{style:{fontWeight:600},children:I.length})," ","\u9879 \xA0\xA0"]}),children:(0,s.jsx)(P.Z,{onClick:(0,h.Z)((0,a.Z)().mark(function u(){var l,r;return(0,a.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,Ye(I);case 2:F([]),(l=c.current)===null||l===void 0||(r=l.reloadAndRest)===null||r===void 0||r.call(l);case 4:case"end":return Z.stop()}},u)})),children:"\u6279\u91CF\u5220\u9664"})}),(0,s.jsx)(De,{onSubmit:function(){var u=(0,h.Z)((0,a.Z)().mark(function l(r){var f,Z,A;return(0,a.Z)().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(x!=null){B.next=5;break}i.default.error("\u8BF7\u9009\u62E9\u8BBE\u5907"),y(!1),B.next=13;break;case 5:return f=[],r.map(function(Ne){f.push({FoodId:Ne.goodsId})}),Z={DeviceId:x,Foodss:f},A=!1,B.next=11,Ve(Z);case 11:A=B.sent,A&&(y(!1),c.current&&c.current.reload());case 13:case"end":return B.stop()}},l)}));return function(l){return u.apply(this,arguments)}}(),onCancel:function(){y(!1)},modalVisible:e,values:x}),(0,s.jsx)(We,{onCancel:function(){V(!1)},stockModalVisible:W,values:L})]})},Ue=Le}}]);