Skip to content

Commit 64cfcbf

Browse files
committed
Merge branch 'crm-msg' of https://gitee.com/dhb52/yudao-ui-admin-vue3 into dev
# Conflicts: # src/views/crm/backlog/tables/TodayCustomer.vue
2 parents bc934f5 + c38bbb9 commit 64cfcbf

File tree

14 files changed

+437
-117
lines changed

14 files changed

+437
-117
lines changed

src/api/crm/backlog/index.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import request from '@/config/axios'
2+
3+
import { type CustomerVO } from '../customer'
4+
import { type ClueVO } from '../clue'
5+
6+
7+
// 查询客户列表
8+
// TODO @芋艿:看看是不是后续融合到 getCustomerPage 里;
9+
export const getTodayCustomerPage = async (params) => {
10+
return await request.get({ url: `/crm/backlog/today-customer-page`, params })
11+
}
12+
13+
// 查询线索列表
14+
export const getFollowLeadsPage = async (params) => {
15+
return await request.get({ url: `/crm/backlog/page`, params })
16+
}
17+
18+
export { type CustomerVO, type ClueVO }

src/api/crm/message/index.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/router/modules/remaining.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,15 +530,15 @@ const remainingRouter: AppRouteRecordRaw[] = [
530530
component: () => import('@/views/crm/product/detail/index.vue')
531531
},
532532
{
533-
path: 'message',
534-
name: 'CrmMessage',
533+
path: 'backlog',
534+
name: 'CrmBacklog',
535535
meta: {
536536
title: '待办事项',
537537
noCache: true,
538538
hidden: true
539539
},
540540
// TODO @db52:后面搞,搞成菜单
541-
component: () => import('@/views/crm/message/index.vue')
541+
component: () => import('@/views/crm/backlog/index.vue')
542542
}
543543
]
544544
}

src/views/crm/message/index.vue renamed to src/views/crm/backlog/index.vue

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,25 @@
1717
<el-col :span="20" :xs="24">
1818
<TodayCustomer v-if="leftType === 'todayCustomer'" />
1919
<FollowLeads v-if="leftType === 'followLeads'" />
20+
<CheckContract v-if="leftType === 'checkContract'" />
21+
<CheckReceivables v-if="leftType === 'checkReceivables'" />
22+
<EndContract v-if="leftType === 'endContract'" />
23+
<FollowCustomer v-if="leftType === 'followCustomer'" />
24+
<PutInPoolRemind v-if="leftType === 'putInPoolRemind'" />
25+
<RemindReceivables v-if="leftType === 'remindReceivables'" />
2026
</el-col>
2127
</el-row>
2228
</template>
23-
<!-- @dbh52:模块改成 backlog 会更合适,待办事项 -->
29+
2430
<script lang="ts" setup>
25-
import TodayCustomer from './tables/TodayCustomer.vue'
31+
import CheckContract from './tables/CheckContract.vue'
32+
import CheckReceivables from './tables/CheckReceivables.vue'
33+
import EndContract from './tables/EndContract.vue'
34+
import FollowCustomer from './tables/FollowCustomer.vue'
2635
import FollowLeads from './tables/FollowLeads.vue'
36+
import PutInPoolRemind from './tables/PutInPoolRemind.vue'
37+
import RemindReceivables from './tables/RemindReceivables.vue'
38+
import TodayCustomer from './tables/TodayCustomer.vue'
2739
2840
const leftType = ref('todayCustomer')
2941
const leftSides = ref([
@@ -66,7 +78,7 @@ const leftSides = ref([
6678
},
6779
{
6880
name: '待回款提醒',
69-
infoType: 'remindReceivablesPlan',
81+
infoType: 'remindReceivables',
7082
msgCount: 4,
7183
tips: ''
7284
},
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- 待审核合同 -->
2+
<!-- TODO: 后续再统一改名字 -->
3+
<template>
4+
<div>
5+
TODO: 待审核合同
6+
</div>
7+
</template>
8+
9+
<script setup lang="ts" name="CheckContract">
10+
11+
</script>
12+
13+
<style scoped>
14+
15+
</style>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- 待审核回款 -->
2+
<!-- TODO: 后续再统一改名字 -->
3+
<template>
4+
<div>
5+
TODO: 待审核回款
6+
</div>
7+
</template>
8+
9+
<script setup lang="ts" name="CheckReceivables">
10+
11+
</script>
12+
13+
<style scoped>
14+
15+
</style>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- 分配给我的客户 -->
2+
<!-- TODO: 即将到期的合同 -->
3+
<template>
4+
<div>
5+
TODO: 即将到期的合同
6+
</div>
7+
</template>
8+
9+
<script setup lang="ts" name="EndContract">
10+
11+
</script>
12+
13+
<style scoped>
14+
15+
</style>
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
<!-- 分配给我的客户 -->
2+
<!-- WHERE followUpStatus = ? -->
3+
<template>
4+
<ContentWrap>
5+
<div class="pb-5 text-xl">分配给我的客户</div>
6+
<!-- 搜索工作栏 -->
7+
<el-form
8+
ref="queryFormRef"
9+
:inline="true"
10+
:model="queryParams"
11+
class="-mb-15px"
12+
label-width="68px"
13+
>
14+
<el-form-item label="状态" prop="followUpStatus">
15+
<el-select
16+
v-model="queryParams.followUpStatus"
17+
class="!w-240px"
18+
placeholder="状态"
19+
@change="handleQuery"
20+
>
21+
<el-option
22+
v-for="(option, index) in FOLLOWUP_STATUS"
23+
:label="option.label"
24+
:value="option.value"
25+
:key="index"
26+
/>
27+
</el-select>
28+
</el-form-item>
29+
</el-form>
30+
</ContentWrap>
31+
<!-- 列表 -->
32+
<ContentWrap>
33+
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
34+
<el-table-column align="center" label="编号" prop="id" />
35+
<el-table-column align="center" label="客户名称" prop="name" width="160">
36+
<template #default="scope">
37+
<el-link :underline="false" type="primary" @click="openDetail(scope.row.id)">
38+
{{ scope.row.name }}
39+
</el-link>
40+
</template>
41+
</el-table-column>
42+
<el-table-column align="center" label="手机" prop="mobile" width="120" />
43+
<el-table-column align="center" label="电话" prop="telephone" width="120" />
44+
<el-table-column align="center" label="客户来源" prop="source" width="100">
45+
<template #default="scope">
46+
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_SOURCE" :value="scope.row.source" />
47+
</template>
48+
</el-table-column>
49+
<el-table-column align="center" label="所属行业" prop="industryId" width="120">
50+
<template #default="scope">
51+
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_INDUSTRY" :value="scope.row.industryId" />
52+
</template>
53+
</el-table-column>
54+
<el-table-column align="center" label="客户等级" prop="level" width="120">
55+
<template #default="scope">
56+
<dict-tag :type="DICT_TYPE.CRM_CUSTOMER_LEVEL" :value="scope.row.level" />
57+
</template>
58+
</el-table-column>
59+
<el-table-column align="center" label="网址" prop="website" width="200" />
60+
<el-table-column
61+
:formatter="dateFormatter"
62+
align="center"
63+
label="下次联系时间"
64+
prop="contactNextTime"
65+
width="180px"
66+
/>
67+
<el-table-column align="center" label="备注" prop="remark" width="200" />
68+
<el-table-column align="center" label="成交状态" prop="dealStatus">
69+
<template #default="scope">
70+
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.dealStatus" />
71+
</template>
72+
</el-table-column>
73+
<el-table-column align="center" label="距离进入公海" prop="poolDay">
74+
<template #default="scope"> {{ scope.row.poolDay }} 天</template>
75+
</el-table-column>
76+
<el-table-column
77+
:formatter="dateFormatter"
78+
align="center"
79+
label="最后跟进时间"
80+
prop="contactLastTime"
81+
width="180px"
82+
/>
83+
<el-table-column
84+
:formatter="dateFormatter"
85+
align="center"
86+
label="创建时间"
87+
prop="updateTime"
88+
width="180px"
89+
/>
90+
<el-table-column
91+
:formatter="dateFormatter"
92+
align="center"
93+
label="创建时间"
94+
prop="createTime"
95+
width="180px"
96+
/>
97+
<el-table-column align="center" label="负责人" prop="ownerUserName" width="100px" />
98+
<el-table-column align="center" label="所属部门" prop="ownerUserDeptName" width="100px" />
99+
<el-table-column align="center" label="创建人" prop="creatorName" width="100px" />
100+
</el-table>
101+
<!-- 分页 -->
102+
<Pagination
103+
v-model:limit="queryParams.pageSize"
104+
v-model:page="queryParams.pageNo"
105+
:total="total"
106+
@pagination="getList"
107+
/>
108+
</ContentWrap>
109+
</template>
110+
111+
<script setup lang="ts" name="FollowCustomer">
112+
import * as CustomerApi from '@/api/crm/customer'
113+
import { DICT_TYPE } from '@/utils/dict'
114+
import { dateFormatter } from '@/utils/formatTime'
115+
import { FOLLOWUP_STATUS } from './common'
116+
117+
118+
const { push } = useRouter()
119+
120+
const loading = ref(true) // 列表的加载中
121+
const total = ref(0) // 列表的总页数
122+
const list = ref([]) // 列表的数据
123+
const queryParams = ref({
124+
pageNo: 1,
125+
pageSize: 10,
126+
followUpStatus: false,
127+
sceneType: 1
128+
})
129+
const queryFormRef = ref() // 搜索的表单
130+
131+
/** 查询列表 */
132+
const getList = async () => {
133+
loading.value = true
134+
try {
135+
const data = await CustomerApi.getCustomerPage(queryParams.value)
136+
list.value = data.list
137+
total.value = data.total
138+
} finally {
139+
loading.value = false
140+
}
141+
}
142+
143+
/** 搜索按钮操作 */
144+
const handleQuery = () => {
145+
queryParams.value.pageNo = 1
146+
getList()
147+
}
148+
149+
/** 打开客户详情 */
150+
const openDetail = (id: number) => {
151+
push({ name: 'CrmCustomerDetail', params: { id } })
152+
}
153+
154+
/** 初始化 **/
155+
onMounted(() => {
156+
getList()
157+
})
158+
</script>
159+
160+
<style scoped></style>

0 commit comments

Comments
 (0)