diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index b30d8f4af..4516a3016 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -543,15 +543,15 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 - // 子表不能为空 - if (tableData.value.length == 0) { - formRef.value.formLoading = false - return message.warning('请添加明细数据!') - } // 合格退料 添加参数 isOK data.isOK = true try { if (formType === 'create') { + // 子表不能为空 + if (tableData.value.length == 0) { + formRef.value.formLoading = false + return message.warning('请添加明细数据!') + } await ProductionreturnRequestMainApi.createProductionreturnRequestMain(data) message.success(t('common.createSuccess')) } else { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index cf48af850..16c6a20fd 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -541,15 +541,15 @@ const handleDeleteTable = (item, index) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 - // 子表不能为空 - if (tableData.value.length == 0) { - formRef.value.formLoading = false - return message.warning('请添加明细数据!') - } // 合格退料 添加参数 isOK data.isOK = false // 不合格 false try { if (formType === 'create') { + // 子表不能为空 + if (tableData.value.length == 0) { + formRef.value.formLoading = false + return message.warning('请添加明细数据!') + } await ProductionreturnRequestMainNoApi.createProductionreturnRequestMain(data) message.success(t('common.createSuccess')) } else {