diff --git a/erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js b/erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js index ed7a91cd7887c217c9ce9ba3f852fdf298d36b7e..f2bc383e62ac40284b13b4f9c7c7fde9de746768 100644 --- a/erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js +++ b/erp-produce/src/main/resources/template/js/departmentMachining/processingToMaterialRequisition.js @@ -14,6 +14,7 @@ layui.config({ var index = parent.layer.getFrameIndex(window.name); var $ = layui.$; var id = GetUrlParam("id"); + let initFirst = false // 加工单转领料单 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { @@ -25,16 +26,18 @@ layui.config({ saveData: function (params) { // 保存数据 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "insertMachinToPickRequest", params: params, type: 'json', method: "POST", callback: function(json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - + parent.layer.close(index); + parent.refreshCode = '0'; + }}); }, loadComponentCallback: function () { - $("#addRow" + tableId).click(); $("div[controlType='pickFromType']").remove(); }, - tableAddRowCallback: function (tableId) { + tableDeleteRowCallback: function (tableId) { + if (!initFirst) { + initFirst = true; + $("#addRow" + tableId).click(); + } } }); }}); diff --git a/erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js b/erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js index d9d82f5473d6fd4c46bcaf4cd630d08b7ccbeac3..a369d728e35845bf0377b710b9f86fdc6730b4d2 100644 --- a/erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js +++ b/erp-produce/src/main/resources/template/js/departmentMachining/processingToReturnMaterials.js @@ -14,6 +14,7 @@ layui.config({ var index = parent.layer.getFrameIndex(window.name); var $ = layui.$; var id = GetUrlParam("id"); + let initFirst = false // 加工单转退料单 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransReturnById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { @@ -33,8 +34,11 @@ layui.config({ loadComponentCallback: function () { $("div[controlType='pickFromType']").remove(); }, - tableAddRowCallback: function (tableId) { - + tableDeleteRowCallback: function (tableId) { + if (!initFirst) { + initFirst = true; + $("#addRow" + tableId).click(); + } } }); }}); diff --git a/erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js b/erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js index dfca17fa63a90b412941dffb6a7a015e16dffbe5..e4a94e93e706884ec391201e65683423cee1bcb7 100644 --- a/erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js +++ b/erp-produce/src/main/resources/template/js/departmentMachining/processingToSupplementMaterials.js @@ -14,6 +14,7 @@ layui.config({ var index = parent.layer.getFrameIndex(window.name); var $ = layui.$; var id = GetUrlParam("id"); + let initFirst = false // 加工单转补料单 AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinTransRequestById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) { @@ -33,8 +34,11 @@ layui.config({ loadComponentCallback: function () { $("div[controlType='pickFromType']").remove(); }, - tableAddRowCallback: function (tableId) { - + tableDeleteRowCallback: function (tableId) { + if (!initFirst) { + initFirst = true; + $("#addRow" + tableId).click(); + } } }); }});