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

2 行
20 KiB

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