You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< template >
< div >
< div class = "flex items-start justify-between" >
< div >
< el -col >
< el -row >
< span class = "text-xl font-bold" > { { contact . name } } < / span >
< / e l - r o w >
< / e l - c o l >
< / div >
< div >
<!-- 右上 : 按钮 -- >
< el -button @ click = "openForm('update', contact.id)" v-hasPermi ="['crm:contact:update']" >
编 辑
< / el -button >
< / div >
< / div >
< / div >
< ContentWrap class = "mt-10px" >
< el -descriptions :column ="5" direction = "vertical" >
< el -descriptions -item label = "客户" >
{ { contact . customerName } }
< / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item label = "职务" >
{ { contact . post } }
< / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item label = "手机" >
{ { contact . mobile } }
< / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item label = "创建时间" >
{ { contact . createTime ? formatDate ( contact . createTime ) : '空' } }
< / e l - d e s c r i p t i o n s - i t e m >
< / e l - d e s c r i p t i o n s >
< / ContentWrap >
<!-- 表单弹窗 : 添加 / 修改 -- >
< ContactForm ref = "formRef" @success ="emit('refresh')" / >
< / template >
< script setup lang = "ts" >
import * as ContactApi from '@/api/crm/contact'
import ContactForm from '@/views/crm/contact/ContactForm.vue'
import { formatDate } from '@/utils/formatTime'
//操作修改
const formRef = ref ( )
const openForm = ( type : string , id ? : number ) => {
formRef . value . open ( type , id )
}
const { contact } = defineProps < { contact : ContactApi . ContactVO } > ( )
const emit = defineEmits ( [ 'refresh' ] ) // 定义 success 事件,用于操作成功后的回调
< / script >