干系人 新增编辑

feature-JimuReport-1106-yjl
张同海 1 month ago
parent 5eca11dd7d
commit c23a45dcd3

@ -42,7 +42,7 @@
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './columns'
import { ApiEdit, ApiInfo } from './api'
import { ApiEdit, ApiGet } from './api'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
@ -65,14 +65,14 @@
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
const res: API.DataResult = await ApiGet({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
}
} else {
setFieldsValue({ clientId: data.clientId })
setFieldsValue({ clientId: data.clientId, status: 2 })
}
setModalProps({ loading: false })
})
@ -112,7 +112,7 @@
}
}
async function refresh() {
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
const res: API.DataResult = await ApiGet({ id: unref(rowId) })
if (res.succeeded) {
await setFieldsValue({
...res.data,

Loading…
Cancel
Save