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)