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