From d29dfef7c70c6f13b988586f00a4c8ec9168f856 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 14 Jan 2024 00:00:50 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E8=B7=9F=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/business/index.ts | 12 +- src/api/crm/contact/index.ts | 7 +- src/api/crm/followup/index.ts | 54 +++++++ .../OperateLogV2/src/OperateLogV2.vue | 4 +- src/utils/dict.ts | 7 +- src/views/crm/customer/detail/index.vue | 23 +-- src/views/crm/customer/index.vue | 38 ++--- src/views/crm/followup/FollowUpRecordForm.vue | 136 ++++++++++++++++++ .../crm/followup/components/BusinessList.vue | 71 +++++++++ .../components/BusinessListSelectForm.vue | 79 ++++++++++ .../crm/followup/components/ContactList.vue | 92 ++++++++++++ src/views/crm/followup/components/index.ts | 4 + src/views/crm/followup/index.vue | 135 +++++++++++++++++ 13 files changed, 610 insertions(+), 52 deletions(-) create mode 100644 src/api/crm/followup/index.ts create mode 100644 src/views/crm/followup/FollowUpRecordForm.vue create mode 100644 src/views/crm/followup/components/BusinessList.vue create mode 100644 src/views/crm/followup/components/BusinessListSelectForm.vue create mode 100644 src/views/crm/followup/components/ContactList.vue create mode 100644 src/views/crm/followup/components/index.ts create mode 100644 src/views/crm/followup/index.vue diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts index 41ec35d8..7a903c6a 100644 --- a/src/api/crm/business/index.ts +++ b/src/api/crm/business/index.ts @@ -1,10 +1,3 @@ -/* - * @Author: zyna - * @Date: 2023-12-02 13:08:56 - * @LastEditTime: 2023-12-17 16:28:20 - * @FilePath: \yudao-ui-admin-vue3\src\api\crm\business\index.ts - * @Description: - */ import request from '@/config/axios' export interface BusinessVO { @@ -67,3 +60,8 @@ export const exportBusiness = async (params) => { export const getBusinessPageByContact = async (params) => { return await request.get({ url: `/crm/business/page-by-contact`, params }) } + +// 获得 CRM 商机列表 +export const getBusinessListByIds = async (val: number[]) => { + return await request.get({ url: '/crm/business/list-by-ids', params: { ids: val } }) +} diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts index 44eebe80..dc3042ef 100644 --- a/src/api/crm/contact/index.ts +++ b/src/api/crm/contact/index.ts @@ -71,6 +71,11 @@ export const getSimpleContactList = async () => { return await request.get({ url: `/crm/contact/simple-all-list` }) } +// 获得 CRM 联系人列表 +export const getContactListByIds = async (val: number[]) => { + return await request.get({ url: '/crm/contact/list-by-ids', params: { ids: val } }) +} + // 批量新增联系人商机关联 export const createContactBusinessList = async (data: ContactBusinessReqVO) => { return await request.post({ url: `/crm/contact/create-business-list`, data }) @@ -84,4 +89,4 @@ export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => { // 查询联系人操作日志 export const getOperateLogPage = async (params: any) => { return await request.get({ url: '/crm/contact/operate-log-page', params }) -} \ No newline at end of file +} diff --git a/src/api/crm/followup/index.ts b/src/api/crm/followup/index.ts new file mode 100644 index 00000000..8a8c695a --- /dev/null +++ b/src/api/crm/followup/index.ts @@ -0,0 +1,54 @@ +import request from '@/config/axios' + +// 跟进记录 VO +export interface FollowUpRecordVO { + // 编号 + id: number + // 数据类型 + bizType: number + // 数据编号 + bizId: number + // 跟进类型 + type: number + // 跟进内容 + content: string + // 下次联系时间 + nextTime: Date + // 关联的商机编号数组 + businessIds: number[] + // 关联的联系人编号数组 + contactIds: number[] +} + +// 跟进记录 API +export const FollowUpRecordApi = { + // 查询跟进记录分页 + getFollowUpRecordPage: async (params: any) => { + return await request.get({ url: `/crm/follow-up-record/page`, params }) + }, + + // 查询跟进记录详情 + getFollowUpRecord: async (id: number) => { + return await request.get({ url: `/crm/follow-up-record/get?id=` + id }) + }, + + // 新增跟进记录 + createFollowUpRecord: async (data: FollowUpRecordVO) => { + return await request.post({ url: `/crm/follow-up-record/create`, data }) + }, + + // 修改跟进记录 + updateFollowUpRecord: async (data: FollowUpRecordVO) => { + return await request.put({ url: `/crm/follow-up-record/update`, data }) + }, + + // 删除跟进记录 + deleteFollowUpRecord: async (id: number) => { + return await request.delete({ url: `/crm/follow-up-record/delete?id=` + id }) + }, + + // 导出跟进记录 Excel + exportFollowUpRecord: async (params) => { + return await request.download({ url: `/crm/follow-up-record/export-excel`, params }) + } +} diff --git a/src/components/OperateLogV2/src/OperateLogV2.vue b/src/components/OperateLogV2/src/OperateLogV2.vue index ae8aad40..739e1fd1 100644 --- a/src/components/OperateLogV2/src/OperateLogV2.vue +++ b/src/components/OperateLogV2/src/OperateLogV2.vue @@ -1,6 +1,6 @@