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 {