From f06f1f29c93c10747e4901698d6d39aefdcfddb6 Mon Sep 17 00:00:00 2001 From: jiangjunhong <870160034@qq.com> Date: Fri, 25 Apr 2025 22:42:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/customer/customer/index.ts | 6 +- src/api/crm/customer/labels/index.ts | 28 +- src/api/crm/follw/index.ts | 9 +- src/views/crm/components/Customer/Detail.vue | 49 +- .../crm/components/Customer/FollowRecord.vue | 2 +- src/views/crm/components/Customer/Infor.vue | 121 +++-- .../crm/components/Customer/QuickFollow.vue | 498 +++++++++++------- .../components/Customer/TransferRecord.vue | 40 +- src/views/crm/customer/my/tables/all.vue | 33 +- src/views/crm/customer/my/tables/import.vue | 33 +- src/views/crm/customer/my/tables/seven.vue | 33 +- src/views/crm/customer/my/tables/today.vue | 33 +- src/views/crm/customer/my/tables/unfollow.vue | 33 +- .../crm/customer/team/tables/unfollow.vue | 20 +- src/views/crm/opensea/customer/allopensea.vue | 35 +- src/views/crm/opensea/customer/myopensea.vue | 35 +- 16 files changed, 443 insertions(+), 565 deletions(-) diff --git a/src/api/crm/customer/customer/index.ts b/src/api/crm/customer/customer/index.ts index 13124f87..f8c5bb97 100644 --- a/src/api/crm/customer/customer/index.ts +++ b/src/api/crm/customer/customer/index.ts @@ -22,9 +22,9 @@ export interface CustomerInforVO { ownerUserId: number // 负责人ID ownerTime: Date // 成为负责人时间 depId: number // 部门ID - contactLastTime: Date // 最后跟进时间 - contactLastContent: string // 最后跟进内容 - contactNextTime: Date // 下次联系时间 + latestFollowTime: Date // 最后跟进时间 + latestFollowContent: string // 最后跟进内容 + nextFollowTime: Date // 下次联系时间 lockStatus: number // 锁定状态(0:未锁,1:锁定) openSeaId: number // 公海ID } diff --git a/src/api/crm/customer/labels/index.ts b/src/api/crm/customer/labels/index.ts index cc8dea32..cf82f56d 100644 --- a/src/api/crm/customer/labels/index.ts +++ b/src/api/crm/customer/labels/index.ts @@ -9,33 +9,15 @@ export interface CustomerLabelsVO { // 客户标签 API export const CustomerLabelsApi = { - // 查询客户标签分页 - getCustomerLabelsPage: async (params: any) => { - return await request.get({ url: `/crm/customer-labels/page`, params }) - }, - // 查询客户标签详情 - getCustomerLabels: async (id: number) => { - return await request.get({ url: `/crm/customer-labels/get?id=` + id }) - }, + getCustomerLabelsList: async (params: any) => { + return await request.get({ url: `/crm/customer-labels/list`, params }) + }, // 新增客户标签 - createCustomerLabels: async (data: CustomerLabelsVO) => { - return await request.post({ url: `/crm/customer-labels/create`, data }) + createCustomerLabels: async (params: any) => { + return await request.post({ url: `/crm/customer-labels/create`, params }) }, - // 修改客户标签 - updateCustomerLabels: async (data: CustomerLabelsVO) => { - return await request.put({ url: `/crm/customer-labels/update`, data }) - }, - // 删除客户标签 - deleteCustomerLabels: async (id: number) => { - return await request.delete({ url: `/crm/customer-labels/delete?id=` + id }) - }, - - // 导出客户标签 Excel - exportCustomerLabels: async (params) => { - return await request.download({ url: `/crm/customer-labels/export-excel`, params }) - } } \ No newline at end of file diff --git a/src/api/crm/follw/index.ts b/src/api/crm/follw/index.ts index 483adfef..06274fd9 100644 --- a/src/api/crm/follw/index.ts +++ b/src/api/crm/follw/index.ts @@ -5,9 +5,7 @@ export interface FollwRecordVO { id: number // 唯一标识 customerId: number // 客户ID content: string // 跟进内容 - createTime: string // 创建时间 - creator: string // 创建人 - userId: string // 客户经理 + userId: number // 客户经理 } // 跟进记录 API @@ -17,6 +15,11 @@ export const FollwRecordApi = { return await request.get({ url: `/crm/follw-record/page`, params }) }, + // 新增跟进记录 + createFollwRecord: async (data: FollwRecordVO) => { + return await request.post({ url: `/crm/follw-record/create`, data }) + }, + // 查询跟进记录详情 getFollwRecord: async (id: number) => { return await request.get({ url: `/crm/follw-record/get?id=` + id }) diff --git a/src/views/crm/components/Customer/Detail.vue b/src/views/crm/components/Customer/Detail.vue index 46508a65..14e99467 100644 --- a/src/views/crm/components/Customer/Detail.vue +++ b/src/views/crm/components/Customer/Detail.vue @@ -3,13 +3,32 @@
-

{{ customerForm.customerName }}({{ customerForm.mobile }})

+

{{ customerForm.customerName }}({{ customerForm.mobile }})

撞库次数: {{ customerForm.repeatCount }}次 跟进次数: {{ customerForm.followCount }}次
- 上一条 - 下一条 + + + 上一条 + + + 下一条 + +
@@ -50,16 +69,16 @@
-
- - +
+ +
- + @@ -92,25 +111,9 @@ const transferFormRef = ref() // 转公海表单的 Ref // 客户表单数据 const customerForm = ref({ id: undefined as number | undefined, - sex: 1, - age: undefined as string | undefined, customerName: '', - expectAmount: undefined as string | undefined, - city: '', - customerLevel: 0, - customerType: '潜在', followContent: '', mobile: '', - remark: '', - customerSourceId: undefined, - customerTypeId: undefined, - importLevelId: undefined, - followStatusId: undefined, - ownerUserId: undefined, - depId: undefined, - contactLastTime: undefined, - contactLastContent: undefined, - createTime: undefined, repeatCount: 0, followCount: 0 }) diff --git a/src/views/crm/components/Customer/FollowRecord.vue b/src/views/crm/components/Customer/FollowRecord.vue index 31704c3f..2ae6e95a 100644 --- a/src/views/crm/components/Customer/FollowRecord.vue +++ b/src/views/crm/components/Customer/FollowRecord.vue @@ -11,7 +11,7 @@
加载中...
没有更多了
-
暂无跟进记录
+
暂无记录
diff --git a/src/views/crm/components/Customer/Infor.vue b/src/views/crm/components/Customer/Infor.vue index f8983f90..c4601a94 100644 --- a/src/views/crm/components/Customer/Infor.vue +++ b/src/views/crm/components/Customer/Infor.vue @@ -4,10 +4,10 @@
基本信息 - 保存 + 保存 - +
@@ -25,21 +25,24 @@ placeholder="请输入" class="!w-[120px]" size="small" + type="number" + min="0" + max="150" + @input="(val) => form.age = val ? Number(val) : 0" /> - + - - - - - + + + +
@@ -51,9 +54,9 @@ size="small" /> - +
- -
@@ -83,65 +84,75 @@ diff --git a/src/views/crm/components/Customer/QuickFollow.vue b/src/views/crm/components/Customer/QuickFollow.vue index edc3eaa6..de7f73f4 100644 --- a/src/views/crm/components/Customer/QuickFollow.vue +++ b/src/views/crm/components/Customer/QuickFollow.vue @@ -1,219 +1,369 @@ - \ No newline at end of file diff --git a/src/views/crm/components/Customer/TransferRecord.vue b/src/views/crm/components/Customer/TransferRecord.vue index 886ee754..62c2fcde 100644 --- a/src/views/crm/components/Customer/TransferRecord.vue +++ b/src/views/crm/components/Customer/TransferRecord.vue @@ -1,15 +1,8 @@ @@ -130,28 +123,9 @@ watch(() => props.customerId, async (id) => { \ No newline at end of file diff --git a/src/views/crm/customer/my/tables/all.vue b/src/views/crm/customer/my/tables/all.vue index 9bb66351..db6ce35e 100644 --- a/src/views/crm/customer/my/tables/all.vue +++ b/src/views/crm/customer/my/tables/all.vue @@ -302,13 +302,7 @@ - + @@ -320,7 +314,6 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import { buildTree } from '@/utils/tree' -import { handlePrevNext } from '@/utils/crm' import { CustomerInforApi, CustomerInforVO } from '@/api/crm/customer/customer' import CustomerDetail from '@/views/crm/components/Customer/Detail.vue' import TransferForm from '@/views/crm/components/Transfer/TransferForm.vue' @@ -370,8 +363,6 @@ let customerSourceOptions = ref(); let customerTypeOptions = ref(); const drawerVisible = ref(false) // 抽屉是否显示 const customerId = ref() // 当前查看的客户ID -const prevId = ref(0) // 上一条记录ID -const nextId = ref(0) // 下一条记录ID const cascaderProps= { emitPath: false, } @@ -404,31 +395,9 @@ const resetQuery = () => { /** 打开跟进抽屉 */ const openInforForm = (id?: number) => { customerId.value = id - // 找到当前记录在列表中的索引 - const currentIndex = list.value.findIndex(item => item.id === id) - - // 获取上一条和下一条记录的ID - prevId.value = currentIndex > 0 ? list.value[currentIndex - 1].id : 0 - nextId.value = currentIndex < list.value.length - 1 ? list.value[currentIndex + 1].id : 0 - drawerVisible.value = true } -/** 处理上一条/下一条切换 */ -const handlePrevNextClick = (type: 'prev' | 'next') => { - if (customerId.value === undefined) return - - handlePrevNext(type, { - list: list.value, - currentId: customerId.value, - onUpdateIds: ({ currentId, prevId: newPrevId, nextId: newNextId }) => { - customerId.value = currentId - prevId.value = newPrevId - nextId.value = newNextId - } - }) -} - /** 打开转公海弹窗 */ const openTransferForm = () => { if (multipleSelection.value.length === 0) { diff --git a/src/views/crm/customer/my/tables/import.vue b/src/views/crm/customer/my/tables/import.vue index b9b5155e..582b6c55 100644 --- a/src/views/crm/customer/my/tables/import.vue +++ b/src/views/crm/customer/my/tables/import.vue @@ -281,13 +281,7 @@ - + @@ -299,7 +293,6 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import { buildTree } from '@/utils/tree' -import { handlePrevNext } from '@/utils/crm' import { CustomerInforApi, CustomerInforVO } from '@/api/crm/customer/customer' import CustomerDetail from '@/views/crm/components/Customer/Detail.vue' import TransferForm from '@/views/crm/components/Transfer/TransferForm.vue' @@ -349,8 +342,6 @@ let customerSourceOptions = ref() let customerTypeOptions = ref() const drawerVisible = ref(false) // 抽屉是否显示 const customerId = ref() // 当前查看的客户ID -const prevId = ref(0) // 上一条记录ID -const nextId = ref(0) // 下一条记录ID const cascaderProps= { emitPath: false, } @@ -384,31 +375,9 @@ const resetQuery = () => { /** 打开跟进抽屉 */ const openInforForm = (id?: number) => { customerId.value = id - // 找到当前记录在列表中的索引 - const currentIndex = list.value.findIndex(item => item.id === id) - - // 获取上一条和下一条记录的ID - prevId.value = currentIndex > 0 ? list.value[currentIndex - 1].id : 0 - nextId.value = currentIndex < list.value.length - 1 ? list.value[currentIndex + 1].id : 0 - drawerVisible.value = true } -/** 处理上一条/下一条切换 */ -const handlePrevNextClick = (type: 'prev' | 'next') => { - if (customerId.value === undefined) return - - handlePrevNext(type, { - list: list.value, - currentId: customerId.value, - onUpdateIds: ({ currentId, prevId: newPrevId, nextId: newNextId }) => { - customerId.value = currentId - prevId.value = newPrevId - nextId.value = newNextId - } - }) -} - /** 打开转公海弹窗 */ const openTransferForm = () => { if (multipleSelection.value.length === 0) { diff --git a/src/views/crm/customer/my/tables/seven.vue b/src/views/crm/customer/my/tables/seven.vue index 657a9136..508da240 100644 --- a/src/views/crm/customer/my/tables/seven.vue +++ b/src/views/crm/customer/my/tables/seven.vue @@ -280,13 +280,7 @@ - + @@ -298,7 +292,6 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import { buildTree } from '@/utils/tree' -import { handlePrevNext } from '@/utils/crm' import { CustomerInforApi, CustomerInforVO } from '@/api/crm/customer/customer' import CustomerDetail from '@/views/crm/components/Customer/Detail.vue' import TransferForm from '@/views/crm/components/Transfer/TransferForm.vue' @@ -349,8 +342,6 @@ let customerSourceOptions = ref() let customerTypeOptions = ref() const drawerVisible = ref(false) // 抽屉是否显示 const customerId = ref() // 当前查看的客户ID -const prevId = ref(0) // 上一条记录ID -const nextId = ref(0) // 下一条记录ID const cascaderProps= { emitPath: false, } @@ -389,31 +380,9 @@ const resetQuery = () => { /** 打开跟进抽屉 */ const openInforForm = (id?: number) => { customerId.value = id - // 找到当前记录在列表中的索引 - const currentIndex = list.value.findIndex(item => item.id === id) - - // 获取上一条和下一条记录的ID - prevId.value = currentIndex > 0 ? list.value[currentIndex - 1].id : 0 - nextId.value = currentIndex < list.value.length - 1 ? list.value[currentIndex + 1].id : 0 - drawerVisible.value = true } -/** 处理上一条/下一条切换 */ -const handlePrevNextClick = (type: 'prev' | 'next') => { - if (customerId.value === undefined) return - - handlePrevNext(type, { - list: list.value, - currentId: customerId.value, - onUpdateIds: ({ currentId, prevId: newPrevId, nextId: newNextId }) => { - customerId.value = currentId - prevId.value = newPrevId - nextId.value = newNextId - } - }) -} - /** 打开转公海弹窗 */ const openTransferForm = () => { if (multipleSelection.value.length === 0) { diff --git a/src/views/crm/customer/my/tables/today.vue b/src/views/crm/customer/my/tables/today.vue index 00d28532..37f7016d 100644 --- a/src/views/crm/customer/my/tables/today.vue +++ b/src/views/crm/customer/my/tables/today.vue @@ -280,13 +280,7 @@ - + @@ -298,7 +292,6 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import { buildTree } from '@/utils/tree' -import { handlePrevNext } from '@/utils/crm' import { CustomerInforApi, CustomerInforVO } from '@/api/crm/customer/customer' import CustomerDetail from '@/views/crm/components/Customer/Detail.vue' import TransferForm from '@/views/crm/components/Transfer/TransferForm.vue' @@ -349,8 +342,6 @@ let customerSourceOptions = ref() let customerTypeOptions = ref() const drawerVisible = ref(false) // 抽屉是否显示 const customerId = ref() // 当前查看的客户ID -const prevId = ref(0) // 上一条记录ID -const nextId = ref(0) // 下一条记录ID const cascaderProps= { emitPath: false, } @@ -389,31 +380,9 @@ const resetQuery = () => { /** 打开跟进抽屉 */ const openInforForm = (id?: number) => { customerId.value = id - // 找到当前记录在列表中的索引 - const currentIndex = list.value.findIndex(item => item.id === id) - - // 获取上一条和下一条记录的ID - prevId.value = currentIndex > 0 ? list.value[currentIndex - 1].id : 0 - nextId.value = currentIndex < list.value.length - 1 ? list.value[currentIndex + 1].id : 0 - drawerVisible.value = true } -/** 处理上一条/下一条切换 */ -const handlePrevNextClick = (type: 'prev' | 'next') => { - if (customerId.value === undefined) return - - handlePrevNext(type, { - list: list.value, - currentId: customerId.value, - onUpdateIds: ({ currentId, prevId: newPrevId, nextId: newNextId }) => { - customerId.value = currentId - prevId.value = newPrevId - nextId.value = newNextId - } - }) -} - /** 打开转公海弹窗 */ const openTransferForm = () => { if (multipleSelection.value.length === 0) { diff --git a/src/views/crm/customer/my/tables/unfollow.vue b/src/views/crm/customer/my/tables/unfollow.vue index cb415061..18891911 100644 --- a/src/views/crm/customer/my/tables/unfollow.vue +++ b/src/views/crm/customer/my/tables/unfollow.vue @@ -277,13 +277,7 @@ - + @@ -295,7 +289,6 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import { buildTree } from '@/utils/tree' -import { handlePrevNext } from '@/utils/crm' import { CustomerInforApi, CustomerInforVO } from '@/api/crm/customer/customer' import CustomerDetail from '@/views/crm/components/Customer/Detail.vue' import TransferForm from '@/views/crm/components/Transfer/TransferForm.vue' @@ -345,8 +338,6 @@ let customerSourceOptions = ref() let customerTypeOptions = ref() const drawerVisible = ref(false) // 抽屉是否显示 const customerId = ref() // 当前查看的客户ID -const prevId = ref(0) // 上一条记录ID -const nextId = ref(0) // 下一条记录ID const cascaderProps= { emitPath: false, } @@ -381,31 +372,9 @@ const resetQuery = () => { /** 打开跟进抽屉 */ const openInforForm = (id?: number) => { customerId.value = id - // 找到当前记录在列表中的索引 - const currentIndex = list.value.findIndex(item => item.id === id) - - // 获取上一条和下一条记录的ID - prevId.value = currentIndex > 0 ? list.value[currentIndex - 1].id : 0 - nextId.value = currentIndex < list.value.length - 1 ? list.value[currentIndex + 1].id : 0 - drawerVisible.value = true } -/** 处理上一条/下一条切换 */ -const handlePrevNextClick = (type: 'prev' | 'next') => { - if (customerId.value === undefined) return - - handlePrevNext(type, { - list: list.value, - currentId: customerId.value, - onUpdateIds: ({ currentId, prevId: newPrevId, nextId: newNextId }) => { - customerId.value = currentId - prevId.value = newPrevId - nextId.value = newNextId - } - }) -} - /** 打开转公海弹窗 */ const openTransferForm = () => { if (multipleSelection.value.length === 0) { diff --git a/src/views/crm/customer/team/tables/unfollow.vue b/src/views/crm/customer/team/tables/unfollow.vue index 5fa81b35..177b2e05 100644 --- a/src/views/crm/customer/team/tables/unfollow.vue +++ b/src/views/crm/customer/team/tables/unfollow.vue @@ -9,12 +9,12 @@ :inline="true" label-width="68px" > - + @@ -22,17 +22,10 @@ v-model="queryParams.mobile" placeholder="请输入手机号码" clearable - @keyup.enter="handleQuery" - /> - - - + - + @@ -281,8 +275,7 @@ \ No newline at end of file diff --git a/src/views/crm/opensea/customer/myopensea.vue b/src/views/crm/opensea/customer/myopensea.vue index 70450e85..4c3590a4 100644 --- a/src/views/crm/opensea/customer/myopensea.vue +++ b/src/views/crm/opensea/customer/myopensea.vue @@ -265,13 +265,7 @@ - + @@ -281,8 +275,7 @@ \ No newline at end of file