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