|
|
|
@ -57,10 +57,20 @@
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div v-if="title !== '详情'">
|
|
|
|
|
<a-button v-if="title !== '审核'" @click="visible = false">取消</a-button>
|
|
|
|
|
<a-button type="primary" html-type="submit" style="margin-left: 10px" @click="toExamine(0)"
|
|
|
|
|
<a-button
|
|
|
|
|
v-if="formModel.enrollStatus == 1"
|
|
|
|
|
type="primary"
|
|
|
|
|
html-type="submit"
|
|
|
|
|
style="margin-left: 10px"
|
|
|
|
|
@click="toExamine(0)"
|
|
|
|
|
>重审</a-button
|
|
|
|
|
>
|
|
|
|
|
<a-button type="primary" html-type="submit" style="margin-left: 10px" @click="toExamine(1)"
|
|
|
|
|
<a-button
|
|
|
|
|
v-if="formModel.enrollStatus == 1"
|
|
|
|
|
type="primary"
|
|
|
|
|
html-type="submit"
|
|
|
|
|
style="margin-left: 10px"
|
|
|
|
|
@click="toExamine(1)"
|
|
|
|
|
>分发</a-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
@ -74,10 +84,11 @@ import { useModal } from '@/hooks/modal'
|
|
|
|
|
import type { FormRequestMapping } from '@/hooks/form'
|
|
|
|
|
import { overrideProperties } from '@/utils/bean-utils'
|
|
|
|
|
import { message } from 'ant-design-vue'
|
|
|
|
|
import type { CustomerDTO, GeopoliticalCustomersRecord } from '@/api/geopoliticalCustomers/types'
|
|
|
|
|
import { updateCustomerAudit } from '@/api/geopoliticalCustomers/index'
|
|
|
|
|
import { useAdminForm, useFormAction, FormAction, labelCol, wrapperCol } from '@/hooks/form'
|
|
|
|
|
import { useUserStore } from '@/stores/user-store'
|
|
|
|
|
import { doRequest } from '@/utils/axios/request'
|
|
|
|
|
import { getCustomDetails } from '@/api/geopoliticalCustomers'
|
|
|
|
|
//预约时间
|
|
|
|
|
import 'dayjs/locale/zh-cn'
|
|
|
|
|
// import dayjs from 'dayjs'
|
|
|
|
@ -101,6 +112,7 @@ interface SysUserPageVO {
|
|
|
|
|
customName: string
|
|
|
|
|
customNid: string
|
|
|
|
|
comprehensiveAddress?: string
|
|
|
|
|
enrollStatus?: number
|
|
|
|
|
customStoreVOList: ReservationShop[]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -109,7 +121,8 @@ const formModel = reactive<SysUserPageVO>({
|
|
|
|
|
customName: '',
|
|
|
|
|
customNid: '',
|
|
|
|
|
comprehensiveAddress: '',
|
|
|
|
|
customStoreVOList: []
|
|
|
|
|
customStoreVOList: [],
|
|
|
|
|
enrollStatus: undefined
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 表单校验规则
|
|
|
|
@ -132,6 +145,7 @@ const { submitLoading, resetFields } = useAdminForm(
|
|
|
|
|
// onMounted(() => {})
|
|
|
|
|
|
|
|
|
|
const handleClose = () => {
|
|
|
|
|
closeModal()
|
|
|
|
|
submitLoading.value = false
|
|
|
|
|
}
|
|
|
|
|
const toExamine = (type: number) => {
|
|
|
|
@ -144,22 +158,21 @@ const toExamine = (type: number) => {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
defineExpose({
|
|
|
|
|
open(newFormAction: FormAction, record?: GeopoliticalCustomersRecord) {
|
|
|
|
|
console.log(record, 'record')
|
|
|
|
|
open(newFormAction: FormAction, id: number) {
|
|
|
|
|
openModal()
|
|
|
|
|
resetFields()
|
|
|
|
|
let record: any = null
|
|
|
|
|
if (newFormAction === FormAction.OTHER) {
|
|
|
|
|
title.value = '预约详情'
|
|
|
|
|
record!.comprehensiveAddress = `${record?.economize}${record?.market}${record?.distinguish}${record?.detailAddress}`
|
|
|
|
|
// record!.customStoreVOList = [
|
|
|
|
|
// {
|
|
|
|
|
// storeName: '测试',
|
|
|
|
|
// reservationTime: '2023-9-14 10:12:15'
|
|
|
|
|
// }
|
|
|
|
|
// ]
|
|
|
|
|
overrideProperties(formModel, record)
|
|
|
|
|
doRequest(getCustomDetails(id), {
|
|
|
|
|
onSuccess: (res: any) => {
|
|
|
|
|
record = res.data
|
|
|
|
|
record.comprehensiveAddress = `${record?.economize}${record?.market}${record?.distinguish}${record?.detailAddress}`
|
|
|
|
|
overrideProperties(formModel, record)
|
|
|
|
|
formAction.value = newFormAction
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
formAction.value = newFormAction
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|