From 62e2cefec5c321e9ed6a13effd8f72d72322f3ca Mon Sep 17 00:00:00 2001 From: "LAPTOP-UV1MNL38\\18023" <1802330370@qq.com> Date: Fri, 26 Jul 2024 22:33:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processingToMaterialRequisition.js | 15 +++++++++------ .../processingToReturnMaterials.js | 8 ++++++-- .../processingToSupplementMaterials.js | 8 ++++++-- 3 files changed, 21 insertions(+), 10 deletions(-) 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 ed7a91cd7..f2bc383e6 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 d9d82f547..a369d728e 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 dfca17fa6..e4a94e93e 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(); + } } }); }}); -- GitLab