1
1
<template >
2
- <!-- TODO 芋艿:要不要把 3 到 62 合并成一个组件 -->
3
- <div v-loading =" loading" >
4
- <div class =" flex items-start justify-between" >
5
- <div >
6
- <!-- 左上:客户基本信息 -->
7
- <ContactBasicInfo :contact =" contact" />
8
- </div >
9
- <div >
10
- <!-- 右上:按钮 -->
11
- <el-button @click =" openForm('update', contact.id)" v-hasPermi =" ['crm:contact:update']" >
12
- 编辑
13
- </el-button >
14
- </div >
15
- </div >
16
- <el-row class =" mt-10px" >
17
- <el-button >
18
- <Icon icon =" ph:calendar-fill" class =" mr-5px" />
19
- 创建任务
20
- </el-button >
21
- <el-button >
22
- <Icon icon =" carbon:email" class =" mr-5px" />
23
- 发送邮件
24
- </el-button >
25
- <el-button >
26
- <Icon icon =" system-uicons:contacts" class =" mr-5px" />
27
- 创建联系人
28
- </el-button >
29
- <el-button >
30
- <Icon icon =" ep:opportunity" class =" mr-5px" />
31
- 创建商机
32
- </el-button >
33
- <el-button >
34
- <Icon icon =" clarity:contract-line" class =" mr-5px" />
35
- 创建合同
36
- </el-button >
37
- <el-button >
38
- <Icon icon =" icon-park:income-one" class =" mr-5px" />
39
- 创建回款
40
- </el-button >
41
- <el-button >
42
- <Icon icon =" fluent:people-team-add-20-filled" class =" mr-5px" />
43
- 添加团队成员
44
- </el-button >
45
- </el-row >
46
- </div >
47
- <ContentWrap class =" mt-10px" >
48
- <el-descriptions :column =" 5" direction =" vertical" >
49
- <el-descriptions-item label =" 客户" >
50
- {{ contact.customerName }}
51
- </el-descriptions-item >
52
- <el-descriptions-item label =" 职务" >
53
- {{ contact.post }}
54
- </el-descriptions-item >
55
- <el-descriptions-item label =" 手机" >
56
- {{ contact.mobile }}
57
- </el-descriptions-item >
58
- <el-descriptions-item label =" 创建时间" >
59
- {{ contact.createTime ? formatDate(contact.createTime) : '空' }}
60
- </el-descriptions-item >
61
- </el-descriptions >
62
- </ContentWrap >
63
- <!-- TODO wanwan:这个 tab 拉满哈,可以更好看; -->
64
- <el-col :span =" 18" >
2
+ <ContactDetailsHeader :contact =" contact" :loading =" loading" @refresh =" getContactData(id)" />
3
+ <el-col >
65
4
<el-tabs >
66
- <el-tab-pane label =" 基本信息" >
67
- <!-- TODO wanwan:这个 ml-2 是不是可以优化下,不要整个左移,而是里面的内容有个几 px 的偏移,不顶在框里 -->
68
- <ContactDetails class =" ml-2" :contact =" contact" />
5
+ <el-tab-pane label =" 详细资料" >
6
+ <ContactDetailsInfo :contact =" contact" />
69
7
</el-tab-pane >
70
- <el-tab-pane label =" 跟进记录" lazy > 跟进记录</el-tab-pane >
71
- <el-tab-pane label =" 商机" lazy > 商机</el-tab-pane >
72
- <el-tab-pane label =" 附件" lazy > 附件</el-tab-pane >
73
- <!-- TODO wanwan 以下标签上的数量需要接口统计返回 -->
74
- <el-tab-pane label =" 操作记录" lazy >
75
- <template #label > 操作记录<el-badge :value =" 12" class =" item" type =" primary" /> </template >
76
- 操作记录
8
+ <el-tab-pane label =" 操作日志" lazy >TODO 待开发</el-tab-pane >
9
+ <el-tab-pane label =" 团队成员" lazy >
10
+ <PermissionList :biz-id =" contact.id!" :biz-type =" BizTypeEnum.CRM_CONTACT" />
11
+ </el-tab-pane >
12
+ <el-tab-pane label =" 商机" lazy >
13
+ <BusinessList :biz-id =" contact.id!" :biz-type =" BizTypeEnum.CRM_CONTACT" />
77
14
</el-tab-pane >
78
15
</el-tabs >
79
16
</el-col >
80
-
81
- <!-- 表单弹窗:添加/修改 -->
82
- <ContactForm ref =" formRef" @success =" getContactData(id)" />
83
17
</template >
84
18
85
19
<script setup lang="ts">
86
20
import { ElMessage } from ' element-plus'
87
21
import { useTagsViewStore } from ' @/store/modules/tagsView'
88
22
import * as ContactApi from ' @/api/crm/contact'
89
- import ContactBasicInfo from ' @/views/crm/contact/detail/ContactBasicInfo .vue'
90
- import ContactDetails from ' @/views/crm/contact/detail/ContactDetails .vue'
91
- import ContactForm from ' @/views/crm/contact/ContactForm .vue'
92
- import { formatDate } from ' @/utils/formatTime '
93
- // TODO 芋艿:后面在 review 么?
23
+ import ContactDetailsHeader from ' @/views/crm/contact/detail/ContactDetailsHeader .vue'
24
+ import ContactDetailsInfo from ' @/views/crm/contact/detail/ContactDetailsInfo .vue'
25
+ import BusinessList from ' @/views/crm/contactBusinessLink/components/BusinessListByContact .vue' // 商机列表
26
+ import PermissionList from ' @/views/crm/permission/components/PermissionList.vue ' // 团队成员列表(权限)
27
+ import { BizTypeEnum } from ' @/api/crm/permission '
94
28
95
29
defineOptions ({ name: ' CrmContactDetail' })
96
-
97
30
const { delView } = useTagsViewStore () // 视图操作
98
31
const route = useRoute ()
99
32
const { currentRoute } = useRouter () // 路由
@@ -114,12 +47,6 @@ const getContactData = async (id: number) => {
114
47
loading .value = false
115
48
}
116
49
}
117
-
118
- const formRef = ref ()
119
- const openForm = (type : string , id ? : number ) => {
120
- formRef .value .open (type , id )
121
- }
122
-
123
50
/**
124
51
* 初始化
125
52
*/
0 commit comments