From 2588f24b3e0c0b7bbed3c5ff55a317605c17b3d7 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Thu, 25 Jan 2024 16:30:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=87=E8=B4=AD=E6=94=B6?= =?UTF-8?q?=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index d4715b68f..f54fa7a35 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -143,6 +143,7 @@ const updataTableColumns = (val) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(() => { + console.log("formField:",formField) if (type == 'tableForm') { // 明细查询页赋值 row[formField] = val[0][searchField] @@ -152,9 +153,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => row['poLine'] = val[0]['poLine'] row['uom'] = val[0]['uom'] } + } else { const setV = {} setV[formField] = val[0][searchField] + if(formField == 'ppNumber'){ + // 清空子表数据 + tableData.value = [] // 重置明细数据 + } formRef.setValues(setV) } }) @@ -643,6 +649,11 @@ const submitForm = async (formType, data) => { } try { if (formType === 'create') { + if(tableData.value.length <= 0){ + message.warning(`子表明细不能为空!`) + formRef.value.formLoading = false + return; + } await SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain(data) message.success(t('common.createSuccess')) } else {