From 74f36ceccad90e00ab49dba6f844e3ffbf4f4d60 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 10 Jul 2024 10:52:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E6=A0=87=E7=AD=BEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/labelForm.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue index 337596fe2..b25277d6f 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue @@ -336,7 +336,7 @@ const addT = (oneRow) => { oneId.value++ oneRow.packageList.push({ id: oneId.value, - tPoNumber: (oneRow.packageList[oneRow.packageList.length - 1]?.tPoNumber || 0) + 1, //行号是上一行的行号加1 + tPoNumber: oneRow?.packageList?.length>0?oneRow.packageList[oneRow.packageList.length - 1]?.tPoNumber + 1 :1, //行号是上一行的行号加1 xNumber: '', qtyOne: '' }) @@ -355,9 +355,7 @@ const addX = (oneRow, oneIndex, twoRow, twoIndex, type) => { // 在托下添加箱 twoRow.children.push({ id: twoId.value, - xPoNumber: twoRow?.children[twoRow.children.length - 1]?.xPoNumber - ? twoRow?.children[twoRow.children.length - 1]?.xPoNumber - : 0 + 1, + xPoNumber: twoRow?.children?.length>0? twoRow?.children[twoRow.children.length - 1]?.xPoNumber + 1 :1, qtyOne: '' }) twoRow.xNumber = twoRow.children.length @@ -365,7 +363,7 @@ const addX = (oneRow, oneIndex, twoRow, twoIndex, type) => { // 直接添加箱 twoRow.children.push({ id: twoId.value, - xPoNumber: twoRow.children[twoRow.children.length - 1].xPoNumber + 1, + xPoNumber:twoRow.children.length>0? twoRow.children[twoRow.children.length - 1].xPoNumber + 1:1, qtyTwo: '' }) oneRow.allTuoQty = twoRow.children.length