|
|
@ -789,16 +789,16 @@ const submitForm = async () => { |
|
|
|
if (!valid) return |
|
|
|
// 针对主子表 明细校验 |
|
|
|
if (props.isBusiness) { |
|
|
|
formLoading.value = true |
|
|
|
// formLoading.value = true |
|
|
|
if (formType.value == 'create') { |
|
|
|
const validateForm = await tableFormRef.value.validateForm() |
|
|
|
if (!validateForm && props.tableFormDataLength) { |
|
|
|
if (props.tableData.length == 0) { |
|
|
|
message.warning('请填写明细信息!') |
|
|
|
formLoading.value = false |
|
|
|
// formLoading.value = false |
|
|
|
return |
|
|
|
} |
|
|
|
formLoading.value = false |
|
|
|
// formLoading.value = false |
|
|
|
return |
|
|
|
} |
|
|
|
// 主子表——提交请求 |
|
|
@ -807,7 +807,7 @@ const submitForm = async () => { |
|
|
|
const data1 = unref(formRef1)?.formModel |
|
|
|
emit('submitForm', formType.value, { ...data, ...data1 }) |
|
|
|
} finally { |
|
|
|
formLoading.value = false |
|
|
|
// formLoading.value = false |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 编辑 |
|
|
@ -816,17 +816,17 @@ const submitForm = async () => { |
|
|
|
const data1 = unref(formRef1)?.formModel |
|
|
|
emit('submitForm', formType.value, { ...data }) |
|
|
|
} finally { |
|
|
|
formLoading.value = false |
|
|
|
// formLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 基础数据单表——提交请求 |
|
|
|
formLoading.value = true |
|
|
|
// formLoading.value = true |
|
|
|
try { |
|
|
|
const data = unref(formRef)?.formModel |
|
|
|
emit('success', formType.value, data) |
|
|
|
} finally { |
|
|
|
formLoading.value = false |
|
|
|
// formLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|