Skip to content

Commit 9fa769b

Browse files
committed
📖 CRM:跟进记录的 code review
1 parent 163613e commit 9fa769b

File tree

15 files changed

+40
-44
lines changed

15 files changed

+40
-44
lines changed

src/api/crm/business/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const exportBusiness = async (params) => {
6161
return await request.download({ url: `/crm/business/export-excel`, params })
6262
}
6363

64-
//联系人关联商机列表
64+
// 联系人关联商机列表
6565
export const getBusinessPageByContact = async (params) => {
6666
return await request.get({ url: `/crm/business/page-by-contact`, params })
6767
}

src/api/crm/followup/index.ts

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,14 @@ import request from '@/config/axios'
22

33
// 跟进记录 VO
44
export interface FollowUpRecordVO {
5-
// 编号
6-
id: number
7-
// 数据类型
8-
bizType: number
9-
// 数据编号
10-
bizId: number
11-
// 跟进类型
12-
type: number
13-
// 跟进内容
14-
content: string
15-
// 下次联系时间
16-
nextTime: Date
17-
// 关联的商机编号数组
18-
businessIds: number[]
19-
// 关联的联系人编号数组
20-
contactIds: number[]
5+
id: number // 编号
6+
bizType: number // 数据类型
7+
bizId: number // 数据编号
8+
type: number // 跟进类型
9+
content: string // 跟进内容
10+
nextTime: Date // 下次联系时间
11+
businessIds: number[] // 关联的商机编号数组
12+
contactIds: number[] // 关联的联系人编号数组
2113
}
2214

2315
// 跟进记录 API

src/components/OperateLogV2/src/OperateLogV2.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
<!-- 某个记录的操作日志列表,目前主要用于 CRM 客户、商机等详情界面 -->
12
<template>
2-
<!-- TODO @puhui999:左边不用有空隙哈 -->
33
<div class="pt-20px">
44
<el-timeline>
55
<el-timeline-item

src/router/modules/remaining.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
503503
title: '客户详情',
504504
noCache: true,
505505
hidden: true,
506-
activeMenu: '/crm/customer/index'
506+
activeMenu: '/crm/customer'
507507
},
508508
component: () => import('@/views/crm/customer/detail/index.vue')
509509
},

src/utils/dict.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* 数据字典工具类
33
*/
4-
import {useDictStoreWithOut} from '@/store/modules/dict'
5-
import {ElementPlusInfoType} from '@/types/elementPlus'
4+
import { useDictStoreWithOut } from '@/store/modules/dict'
5+
import { ElementPlusInfoType } from '@/types/elementPlus'
66

77
const dictStore = useDictStoreWithOut()
88

@@ -162,9 +162,7 @@ export enum DICT_TYPE {
162162
MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型
163163

164164
// ========== MALL - 商品模块 ==========
165-
PRODUCT_UNIT = 'product_unit', // 商品单位
166165
PRODUCT_SPU_STATUS = 'product_spu_status', //商品状态
167-
PROMOTION_TYPE_ENUM = 'promotion_type_enum', // 营销类型枚举
168166

169167
// ========== MALL - 交易模块 ==========
170168
EXPRESS_CHARGE_MODE = 'trade_delivery_express_charge_mode', //快递的计费方式

src/views/crm/customer/detail/index.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,12 @@
3636
</CustomerDetailsHeader>
3737
<el-col>
3838
<el-tabs>
39-
<el-tab-pane label="详细资料">
40-
<CustomerDetailsInfo :customer="customer" />
41-
</el-tab-pane>
42-
<el-tab-pane label="操作日志">
43-
<OperateLogV2 :log-list="logList" />
44-
</el-tab-pane>
45-
<el-tab-pane label="跟进">
39+
<el-tab-pane label="跟进记录">
4640
<FollowUpList :biz-id="customerId" :biz-type="BizTypeEnum.CRM_CUSTOMER" />
4741
</el-tab-pane>
42+
<el-tab-pane label="基本信息">
43+
<CustomerDetailsInfo :customer="customer" />
44+
</el-tab-pane>
4845
<el-tab-pane label="联系人" lazy>
4946
<ContactList :biz-id="customer.id!" :biz-type="BizTypeEnum.CRM_CUSTOMER" />
5047
</el-tab-pane>
@@ -66,6 +63,9 @@
6663
<ReceivablePlanList :biz-id="customer.id!" :biz-type="BizTypeEnum.CRM_CUSTOMER" />
6764
<ReceivableList :biz-id="customer.id!" :biz-type="BizTypeEnum.CRM_CUSTOMER" />
6865
</el-tab-pane>
66+
<el-tab-pane label="操作日志">
67+
<OperateLogV2 :log-list="logList" />
68+
</el-tab-pane>
6969
<el-tab-pane label="回访" lazy>TODO 待开发</el-tab-pane>
7070
</el-tabs>
7171
</el-col>

src/views/crm/customer/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
</template>
147147
</el-table-column>
148148
<el-table-column align="center" label="距离进入公海" prop="poolDay">
149-
<template #default="scope"> {{ scope.row.poolDay }}天</template>
149+
<template #default="scope"> {{ scope.row.poolDay }} 天</template>
150150
</el-table-column>
151151
<el-table-column
152152
:formatter="dateFormatter"

src/views/crm/customer/pool/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ import { dateFormatter } from '@/utils/formatTime'
187187
import download from '@/utils/download'
188188
import * as CustomerApi from '@/api/crm/customer'
189189
190-
defineOptions({ name: 'CrmCustomer' })
190+
defineOptions({ name: 'CrmCustomerPool' })
191191
192192
const message = useMessage() // 消息弹窗
193193

src/views/crm/followup/FollowUpRecordForm.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- 跟进记录的添加表单弹窗 -->
12
<template>
23
<Dialog v-model="dialogVisible" :title="dialogTitle" width="50%">
34
<el-form
@@ -30,11 +31,13 @@
3031
/>
3132
</el-form-item>
3233
</el-col>
34+
<!-- TODO @puhui999:不搞富文本哈;然后加个附件、图片两个 form-item 哈 -->
3335
<el-col :span="24">
3436
<el-form-item label="跟进内容" prop="content">
3537
<Editor v-model="formData.content" height="300px" />
3638
</el-form-item>
3739
</el-col>
40+
<!-- TODO @puhui999:因为不考虑编辑的情况,是不是关联要是个弹窗选择哈? -->
3841
<el-col :span="24">
3942
<el-form-item label="关联联系人" prop="contactIds">
4043
<el-select v-model="formData.contactIds" multiple placeholder="请选择">
@@ -90,7 +93,6 @@ import { BusinessList, ContactList } from './components'
9093
import * as ContactApi from '@/api/crm/contact'
9194
import * as BusinessApi from '@/api/crm/business'
9295
93-
/** 跟进记录 表单 */
9496
defineOptions({ name: 'FollowUpRecordForm' })
9597
9698
const { t } = useI18n() // 国际化

src/views/crm/followup/index.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- 某个记录的跟进记录列表,目前主要用于 CRM 客户、商机等详情界面 -->
12
<template>
23
<!-- 操作栏 -->
34
<el-row class="mb-10px" justify="end">
@@ -24,7 +25,9 @@
2425
prop="nextTime"
2526
width="180px"
2627
/>
28+
<!-- TODO @puhui999:点击后,查看关联联系人 -->
2729
<el-table-column align="center" label="关联联系人" prop="contactIds" />
30+
<!-- TODO @puhui999:点击后,查看关联商机 -->
2831
<el-table-column align="center" label="关联商机" prop="businessIds" />
2932
<el-table-column
3033
:formatter="dateFormatter"
@@ -73,7 +76,7 @@ import { DICT_TYPE } from '@/utils/dict'
7376
import { FollowUpRecordApi, FollowUpRecordVO } from '@/api/crm/followup'
7477
import FollowUpRecordForm from './FollowUpRecordForm.vue'
7578
76-
/** 跟进记录 列表 */
79+
/** 跟进记录列表 */
7780
defineOptions({ name: 'FollowUpRecord' })
7881
const props = defineProps<{
7982
bizType: number
@@ -84,8 +87,7 @@ const { t } = useI18n() // 国际化
8487
8588
const loading = ref(true) // 列表的加载中
8689
const list = ref<FollowUpRecordVO[]>([]) // 列表的数据
87-
// 列表的总页数
88-
const total = ref(0)
90+
const total = ref(0) // 列表的总页数
8991
const queryParams = reactive({
9092
pageNo: 1,
9193
pageSize: 10,

0 commit comments

Comments
 (0)