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) {