Browse Source

二级页面新增修改刷新

master
zhang_li 8 months ago
parent
commit
1b4fd57896
  1. 2
      src/components/Detail/src/Detail.vue
  2. 6
      src/views/eam/item/itemApplyMain/index.vue

2
src/components/Detail/src/Detail.vue

@ -511,7 +511,7 @@ const submitForm = async (formType, data) => {
try { try {
const rs = (await props.detailValidate) ? props.detailValidate(data) : true const rs = (await props.detailValidate) ? props.detailValidate(data) : true
if (!rs) return if (!rs) return
emit('detailSubmitForm', formType, data, getList(), formRef.value) emit('detailSubmitForm', formType, data, formRef.value)
} finally { } finally {
// formRef.value.formLoading = false // formRef.value.formLoading = false
} }

6
src/views/eam/item/itemApplyMain/index.vue

@ -333,18 +333,18 @@
} }
getList() // getList() //
} }
const detailSubmitForm = async (formType, data, getList, formRef, tableList) => { const detailSubmitForm = async (formType, data, formRef, tableList) => {
try { try {
if (formType === 'create') { if (formType === 'create') {
await ItemApplyDetailApi.createItemApplyDetail(data) await ItemApplyDetailApi.createItemApplyDetail(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
formRef.dialogVisible = false formRef.dialogVisible = false
await formRef.getList await detailRef.value.getList()
} else { } else {
await ItemApplyDetailApi.updateItemApplyDetail(data) await ItemApplyDetailApi.updateItemApplyDetail(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
formRef.dialogVisible = false formRef.dialogVisible = false
formRef.getList await detailRef.value.getList()
} }
}catch { }catch {
} finally { } finally {

Loading…
Cancel
Save