干系人 新增编辑

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

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

Loading…
Cancel
Save