From 5abbeb7cf95cc642bc583fb17b95502fb86b6167 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 2 Jan 2024 14:32:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E9=87=8F=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=A4=A7=E4=BA=8E=E9=BB=98=E8=AE=A4=E7=9A=84Bom?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productdismantleRequestMain/index.vue | 13 ++++++++++++- .../productrepairRequestMain/index.vue | 13 ++++++++++++- .../productscrap/productscrapRequestMain/index.vue | 13 ++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue index 655bbe789..9459588d8 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue @@ -149,7 +149,18 @@ const buttonBaseClickBom = async (val) => { // 保存 if (val == 'save') { // 新增bom保存 临时的 - tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0)) + let flag = false; + detatableDataBom.tableList.forEach((item) => { + if(item.qty!=0 && item.bomQty < item.qty){ + flag = true; + return; + } + }) + if(flag){ + message.warning('数量需要小于Bom数量!') + return + } + tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && item.bomQty >= item.qty)) if (lsBomSave.value) { // 根据 填写的数量 为基准 不填写数量的忽略 tableData.value.forEach((item, index) => { diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue index bb63af787..060412756 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue @@ -154,7 +154,18 @@ const buttonBaseClickBom = (val) => { // 保存 if (val == 'save') { // 根据 填写的数量 为基准 不填写数量的忽略 - tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0)) + let flag = false; + detatableDataBom.tableList.forEach((item) => { + if(item.qty!=0 && item.bomQty < item.qty){ + flag = true; + return; + } + }) + if(flag){ + message.warning('数量需要小于Bom数量!') + return + } + tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && item.bomQty >= item.qty)) if(lsBomSave.value){ tableData.value.forEach((item, index) => { if(tableListBom.value[0].rowId == index) { diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 9bc7de858..7f77f2bc8 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -154,7 +154,18 @@ const buttonBaseClickBom = (val) => { // 保存 if (val == 'save') { // 根据 填写的数量 为基准 不填写数量的忽略 - tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0)) + let flag = false; + detatableDataBom.tableList.forEach((item) => { + if(item.qty!=0 && item.bomQty < item.qty){ + flag = true; + return; + } + }) + if(flag){ + message.warning('数量需要小于Bom数量!') + return + } + tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && item.bomQty >= item.qty)) if (lsBomSave.value) { tableData.value.forEach((item, index) => { if(tableListBom.value[0].rowId == index) {