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