選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

2 行
12 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8267],{28267:function(De,x,l){"use strict";l.r(x),l.d(x,{default:function(){return oe}});var be=l(71194),R=l(50146),we=l(57663),j=l(71577),je=l(62350),V=l(24565),a=l(39428),Be=l(34792),s=l(48086),v=l(3182),b=l(2824),z=l(49101),S=l(67294),H=l(78009),Q=l(53779),Fe=l(77883),X=l(85986),Ae=l(9715),k=l(55843),Ie=l(47673),U=l(4107),Te=l(43358),B=l(34041),m=l(48971);function q(u){return A.apply(this,arguments)}function A(){return A=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/GetDeviceTMCStorePage",{method:"POST",data:t}));case 1:case"end":return r.stop()}},u)})),A.apply(this,arguments)}function _(u){return I.apply(this,arguments)}function I(){return I=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/PushDeviceTMC?DeviceId=".concat(t),{method:"post"}));case 1:case"end":return r.stop()}},u)})),I.apply(this,arguments)}function ee(u){return T.apply(this,arguments)}function T(){return T=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/PushDevice?DeviceId=".concat(t),{method:"post"}));case 1:case"end":return r.stop()}},u)})),T.apply(this,arguments)}function re(u){return P.apply(this,arguments)}function P(){return P=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/CheckStockTMCAdjust?DeviceId=".concat(t),{method:"POST"}));case 1:case"end":return r.stop()}},u)})),P.apply(this,arguments)}function te(u){return E.apply(this,arguments)}function E(){return E=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/CheckStockTMCAdjust?DeviceId=".concat(t),{method:"POST"}));case 1:case"end":return r.stop()}},u)})),E.apply(this,arguments)}function ne(u){return M.apply(this,arguments)}function M(){return M=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/AddUpdateTMCDeviceStocAsync",{method:"POST",data:t}));case 1:case"end":return r.stop()}},u)})),M.apply(this,arguments)}function ae(u){return O.apply(this,arguments)}function O(){return O=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/GetProductListByBom",{method:"post",data:t}));case 1:case"end":return r.stop()}},u)})),O.apply(this,arguments)}function ue(u){return G.apply(this,arguments)}function G(){return G=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/GetProductList",{method:"post",data:t}));case 1:case"end":return r.stop()}},u)})),G.apply(this,arguments)}function se(u){return L.apply(this,arguments)}function L(){return L=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/AddUpdateTMCDeviceStocAsync",{method:"put",data:t}));case 1:case"end":return r.stop()}},u)})),L.apply(this,arguments)}function le(u){return W.apply(this,arguments)}function W(){return W=(0,v.Z)((0,a.Z)().mark(function u(t){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,m.WY)("/kitchen/api/Device/DelTMCStockAdjust?Id=".concat(t),{method:"DELETE"}));case 1:case"end":return r.stop()}},u)})),W.apply(this,arguments)}var c=l(85893),ie=function(t){var p=B.Z.Option,r=B.Z.OptGroup,Y=(0,S.useState)([]),C=(0,b.Z)(Y,2),o=C[0],F=C[1];return(0,S.useEffect)(function(){var Z=function(){t.isbom?ae({DeviceId:t.DeviceId,BomIds:t.bomIds}).then(function(g){F(g.data)}):ue({DeviceId:t.DeviceId}).then(function(g){F(g.data)})};Z()},[]),(0,c.jsx)(R.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,c.jsxs)(k.Z,{layout:"vertical",preserve:!1,initialValues:t.values,onFinish:t.onFinish,children:[(0,c.jsx)(k.Z.Item,{name:"id",hidden:!0,children:(0,c.jsx)(U.Z,{})}),(0,c.jsx)(k.Z.Item,{name:"batching_Id",label:"\u539F\u6599\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u539F\u6599\u540D\u79F0"}],children:(0,c.jsx)(B.Z,{placeholder:"\u8BF7\u9009\u62E9\u539F\u6599\u540D\u79F0",showSearch:!0,optionFilterProp:"children",filterOption:function(D,g){return g.children.toLowerCase().indexOf(D.toLowerCase())>=0},children:o.map(function(Z,D){return(0,c.jsx)(B.Z.Option,{index:D,value:Z.id,children:Z.name},Z.id)})})}),(0,c.jsx)(k.Z.Item,{name:"batching_Loc",label:"\u5E93\u5B58\u4F4D\u7F6E",rules:[{required:!0}],defaultValue:"0",children:(0,c.jsx)(U.Z,{placeholder:"\u8F93\u5165\u5E93\u5B58\u4F4D\u7F6E\u7F16\u7801"})}),(0,c.jsx)(k.Z.Item,{name:"batching_Count",label:"\u539F\u6599\u6570\u91CF",rules:[{required:!0}],defaultValue:"0",children:(0,c.jsx)(X.Z,{min:0,placeholder:"\u8BF7\u8F93\u5165\u539F\u6599\u6570\u91CF"})}),(0,c.jsx)(k.Z.Item,{children:(0,c.jsx)(j.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},ce=ie,y="message",de=function(t){var p=(0,S.useState)(!1),r=(0,b.Z)(p,2),Y=r[0],C=r[1],o=(0,S.useRef)(),F=(0,S.useState)(),Z=(0,b.Z)(F,2),D=Z[0],g=Z[1],fe=(0,S.useState)([]),N=(0,b.Z)(fe,2),he=N[0],$=N[1],ve=(0,S.useState)(0),J=(0,b.Z)(ve,2),pe=J[0],me=J[1],ye=function(){var h=(0,v.Z)((0,a.Z)().mark(function i(n){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("fdsfdas",t.values.type),e.prev=1,n.DeviceId=t.values.key,n.type=t.values.type,s.default.loading("\u6B63\u5728\u6DFB\u52A0",y),e.next=7,ne(JSON.stringify(n)).then(function(d){return s.default.destroy(y),d.data?(s.default.success("\u6DFB\u52A0\u6210\u529F"),o.current.reload(),!0):(s.default.error("\u6DFB\u52A0\u5931\u8D25"+d.errors),o.current.reload(),!1)});case 7:e.next=14;break;case 9:return e.prev=9,e.t0=e.catch(1),s.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),o.current.reload(),e.abrupt("return",!1);case 14:case"end":return e.stop()}},i,null,[[1,9]])}));return function(n){return h.apply(this,arguments)}}(),Ze=function(){var h=(0,v.Z)((0,a.Z)().mark(function i(n){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s.default.loading("\u6B63\u5728\u540C\u6B65",y),!t.isbom){e.next=7;break}return e.next=5,_(n).then(function(d){return s.default.destroy(y),d.data?($([]),s.default.success("\u540C\u6B65\u6210\u529F"),o.current.reload(),!0):(s.default.success("\u540C\u6B65\u5931\u8D25"),o.current.reload(),!1)});case 5:e.next=9;break;case 7:return e.next=9,ee(n).then(function(d){return s.default.destroy(y),d.data?($([]),s.default.success("\u540C\u6B65\u6210\u529F"),o.current.reload(),!0):(s.default.success("\u540C\u6B65\u5931\u8D25"),o.current.reload(),!1)});case 9:e.next=16;break;case 11:return e.prev=11,e.t0=e.catch(0),s.default.error("\u540C\u6B65\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),o.current.reload(),e.abrupt("return",!1);case 16:case"end":return e.stop()}},i,null,[[0,11]])}));return function(n){return h.apply(this,arguments)}}(),ge=function(){var h=(0,v.Z)((0,a.Z)().mark(function i(n){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("fdsfds"),e.prev=1,!t.isbom){e.next=7;break}return e.next=5,te(n).then(function(d){return s.default.destroy(y),d.data?(s.default.success("\u83B7\u53D6\u6210\u529F"),o.current.reload(),!0):(s.default.error("\u83B7\u53D6\u5931\u8D25"+d.errors),o.current.reload(),!1)});case 5:e.next=9;break;case 7:return e.next=9,re(n).then(function(d){return s.default.destroy(y),d.data?(s.default.success("\u83B7\u53D6\u6210\u529F"),o.current.reload(),!0):(s.default.error("\u83B7\u53D6\u5931\u8D25"+d.errors),o.current.reload(),!1)});case 9:e.next=16;break;case 11:return e.prev=11,e.t0=e.catch(1),s.default.error("\u83B7\u53D6\u5931\u8D25\uFF01"),o.current.reload(),e.abrupt("return",!1);case 16:case"end":return e.stop()}},i,null,[[1,11]])}));return function(n){return h.apply(this,arguments)}}(),Se=function(){var h=(0,v.Z)((0,a.Z)().mark(function i(n){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,le(n).then(function(d){d.data?(s.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),o.current.reload()):(s.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),o.current.reload())});case 3:return e.abrupt("return",!0);case 6:e.prev=6,e.t0=e.catch(0),s.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),o.current.reload();case 10:case"end":return e.stop()}},i,null,[[0,6]])}));return function(n){return h.apply(this,arguments)}}(),Ce=function(){var h=(0,v.Z)((0,a.Z)().mark(function i(n){return(0,a.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,s.default.loading("\u6B63\u5728\u4FEE\u6539",y),s.default.destroy(y),n.DeviceId=t.values.key,n.type=t.values.type,e.next=7,se(JSON.stringify(n)).then(function(d){return s.default.destroy(y),d.data?(s.default.success("\u4FEE\u6539\u6210\u529F"),!0):(s.default.error("\u4FEE\u6539\u5931\u8D25"+d.errors),!1)});case 7:e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(0),s.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),e.abrupt("return",!1);case 13:case"end":return e.stop()}},i,null,[[0,9]])}));return function(n){return h.apply(this,arguments)}}(),ke=[{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(i,n){return[(0,c.jsxs)("a",{onClick:function(){C(!0),g(n)},children:[" ","\u4FEE\u6539"]},"config"),(0,c.jsx)(V.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){Se(n.id)},onCancel:function(){},children:(0,c.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,c.jsx)(R.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,c.jsxs)(H.ZP,{header:{title:"",breadcrumb:{}},children:[(0,c.jsx)(Q.ZP,{headerTitle:"",actionRef:o,rowKey:"id",search:!1,toolBarRender:function(){return[(0,c.jsx)(V.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(){ge(t.values.key)},onCancel:function(){},children:(0,c.jsx)(j.Z,{type:"primary",children:"\u83B7\u53D6\u5B9E\u65F6\u5E93\u5B58"},"primary")},"primary"),(0,c.jsx)(j.Z,{type:"primary",onClick:function(){if(he.length==0)s.default.error("\u8BF7\u9009\u62E9\u9700\u8981\u540C\u6B65\u7684\u6570\u636E\uFF01\uFF01");else{var n,f;Ze(t.values.key),(n=o.current)===null||n===void 0||(f=n.reloadAndRest)===null||f===void 0||f.call(n)}},children:"\u540C\u6B65\u5E93\u5B58\u539F\u6599"},"primary"),(0,c.jsxs)(j.Z,{disabled:t.isbom&&pe>14,type:"primary",onClick:function(){C(!0)},children:[(0,c.jsx)(z.Z,{})," \u65B0\u589E\u5E93\u5B58\u539F\u6599"]},"primary")]},request:function(){var h=(0,v.Z)((0,a.Z)().mark(function i(n){var f,e;return(0,a.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return f=[],e=0,n.DeviceId=t.values.key,n.type=t.values.type,w.next=6,q(n).then(function(K){f=K.data.data,e=K.data.total,me(e)});case 6:return w.abrupt("return",{data:f,success:!0,total:e});case 7:case"end":return w.stop()}},i)}));return function(i){return h.apply(this,arguments)}}(),columns:ke,rowSelection:{onChange:function(i,n){$(n)}}}),(0,c.jsx)(ce,{isbom:t.isbom,bomIds:t.bomIds,DeviceId:t.values==null?"":t.values.key,onFinish:function(){var h=(0,v.Z)((0,a.Z)().mark(function i(n){var f;return(0,a.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:f=!1,n.id?f=Ce(n):f=ye(n),f&&(C(!1),g(void 0),o.current.reload());case 3:case"end":return d.stop()}},i)}));return function(i){return h.apply(this,arguments)}}(),onCancel:function(){C(!1),g(void 0)},createModalVisible:Y,values:D||{}})]})})},oe=de}}]);