diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html index 57775430..6d5f8435 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/addProduceInbound.html @@ -507,7 +507,7 @@ tableData.push(row); hasValue = true; } - }else if(row.currentNum!=0){ + }else if(row.currentNum && row.currentNum!=0){ tableData.push(row); hasValue = true; } diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html index ce6c3bb8..cfd45f8c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html @@ -377,11 +377,11 @@ // 当所有数据被加载时触发 onLoadSuccess: function(data) { var childRows = data.rows; - if(childRows[0].orderNum == 0||childRows[0].orderNum == null){ - childRows.forEach(function(row) { + childRows.forEach(function(row) { + if(row.orderNum == 0||row.orderNum == null){ row.orderNum = parentRow.orderNum * row.useNum; - }); - } + } + }); childRows.forEach(function (materialData){ var key = childTableId + '_' + materialData.materialNo; var curIndex = materialData.sortNo -1; @@ -390,6 +390,7 @@ var pickDetail = JSON.parse(pick); $("#"+childTableId+curIndex).val(pickDetail.pickNum); }else{ + materialData.pickNum = $("#"+childTableId+curIndex).val(); sessionStorage.setItem(key,JSON.stringify(materialData)); } }) @@ -502,7 +503,7 @@ } data.pickDetails = pickDetails; console.log(data); - $.operate.saveJson(ctx + "system/makeorderpick/ad", JSON.stringify(data)); + $.operate.saveJson(ctx + "system/makeorderpick/add", JSON.stringify(data)); }