Browse Source

盘点计划loading

hella_online_20240924
yufei_wang 2 months ago
parent
commit
4d60c10836
  1. 14
      src/components/BasicForm/src/BasicFormWmsCount.vue

14
src/components/BasicForm/src/BasicFormWmsCount.vue

@ -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
} }
} }
} }

Loading…
Cancel
Save