From bfd6db0739036da12bb85c419093c8ede90d9c41 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 19 Dec 2023 15:50:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=93=81=E6=8A=A5=E5=BA=9F=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productrepairRequestMain/index.vue | 13 +++++++++++++ .../productscrap/productscrapRequestMain/index.vue | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue index 579681b76..54bf4a040 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue @@ -472,6 +472,19 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 + // 判断 bom 是否添加 + let childListRs = true + // 根据 填写的数量 为基准 不填写数量的忽略 + tableData.value.forEach((item) => { + if (!item.childList) { + childListRs = false + } + }) + if (!childListRs) { + message.warning('请填写Bom信息!') + formRef.value.dialogVisible = false + return + } try { if (formType === 'create') { await ProductrepairRequestMainApi.createProductrepairRequestMain(data) diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 86d1383e6..552c0bbca 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -479,6 +479,19 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 + // 判断 bom 是否添加 + let childListRs = true + // 根据 填写的数量 为基准 不填写数量的忽略 + tableData.value.forEach((item) => { + if (!item.childList) { + childListRs = false + } + }) + if (!childListRs) { + message.warning('请填写Bom信息!') + formRef.value.dialogVisible = false + return + } try { if (formType === 'create') { await ProductscrapRequestMainApi.createProductscrapRequestMain(data)