From a1fd3afc3226889617b48591dde42927bd9f502b Mon Sep 17 00:00:00 2001 From: zyna Date: Sun, 17 Dec 2023 17:34:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?crm=E8=81=94=E7=B3=BB=E4=BA=BA=E5=95=86?= =?UTF-8?q?=E6=9C=BA=E4=BF=AE=E6=94=B9?= 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 | 16 +++++- src/api/crm/contactbusinesslink/index.ts | 47 ------------------ src/views/crm/business/BusinessForm.vue | 3 +- .../components/BusinessForContactLink.vue} | 49 +++++++++---------- .../crm/business/components/BusinessList.vue | 4 ++ .../components/BusinessListByContact.vue | 35 +++++++------ .../contact/detail/ContactDetailsHeader.vue | 12 +---- src/views/crm/contact/detail/index.vue | 4 +- 9 files changed, 75 insertions(+), 107 deletions(-) delete mode 100644 src/api/crm/contactbusinesslink/index.ts rename src/views/crm/{contactBusinessLink/components/BusinessLinkContactList.vue => business/components/BusinessForContactLink.vue} (79%) rename src/views/crm/{contactBusinessLink => business}/components/BusinessListByContact.vue (78%) diff --git a/src/api/crm/business/index.ts b/src/api/crm/business/index.ts index 8af2a697..41ec35d8 100644 --- a/src/api/crm/business/index.ts +++ b/src/api/crm/business/index.ts @@ -1,3 +1,10 @@ +/* + * @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 { @@ -55,3 +62,8 @@ export const deleteBusiness = async (id: number) => { export const exportBusiness = async (params) => { return await request.download({ url: `/crm/business/export-excel`, params }) } + +//联系人关联商机列表 +export const getBusinessPageByContact = async (params) => { + return await request.get({ url: `/crm/business/page-by-contact`, params }) +} diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts index f983cb12..ac0bb112 100644 --- a/src/api/crm/contact/index.ts +++ b/src/api/crm/contact/index.ts @@ -25,7 +25,11 @@ export interface ContactVO { areaName: string ownerUserName: string } - +export interface ContactBusinessLinkVO { + id: number + contactId: number + businessId: number +} // 查询 CRM 联系人列表 export const getContactPage = async (params) => { return await request.get({ url: `/crm/contact/page`, params }) @@ -65,3 +69,13 @@ export const exportContact = async (params) => { export const getSimpleContactList = async () => { return await request.get({ url: `/crm/contact/simple-all-list` }) } + +//批量新增联系人商机关联 +export const createContactBusinessLinkBatch = async (data: ContactBusinessLinkVO[]) => { + return await request.post({ url: `/crm/contact/create-batch-business`, data }) +} + +//解除联系人商机关联 +export const deleteContactBusinessLink = async (data: ContactBusinessLinkVO) => { + return await request.delete({ url: `/crm/contact/delete-batch-business`, data }) +} \ No newline at end of file diff --git a/src/api/crm/contactbusinesslink/index.ts b/src/api/crm/contactbusinesslink/index.ts deleted file mode 100644 index 45935abe..00000000 --- a/src/api/crm/contactbusinesslink/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -import request from '@/config/axios' - -export interface ContactBusinessLinkVO { - id: number - contactId: number - businessId: number -} - -// 查询联系人商机关联分页 -export const getContactBusinessLinkPage = async (params) => { - return await request.get({ url: `/crm/contact-business-link/page`, params }) -} - -// 查询联系人商机关联详情 -export const getContactBusinessLink = async (id: number) => { - return await request.get({ url: `/crm/contact-business-link/get?id=` + id }) -} - -// 新增联系人商机关联 -export const createContactBusinessLink = async (data: ContactBusinessLinkVO) => { - return await request.post({ url: `/crm/contact-business-link/create`, data }) -} - -// 修改联系人商机关联 -export const updateContactBusinessLink = async (data: ContactBusinessLinkVO) => { - return await request.put({ url: `/crm/contact-business-link/update`, data }) -} - -// 删除联系人商机关联 -export const deleteContactBusinessLink = async (data: ContactBusinessLinkVO) => { - return await request.delete({ url: `/crm/contact-business-link/delete-batch`, data }) -} - -// 导出联系人商机关联 Excel -export const exportContactBusinessLink = async (params) => { - return await request.download({ url: `/crm/contact-business-link/export-excel`, params }) -} - -//批量新增联系人商机关联 -export const createContactBusinessLinkBatch = async (data: ContactBusinessLinkVO[]) => { - return await request.post({ url: `/crm/contact-business-link/create-batch`, data }) -} -// 查询联系人关联商机列表 -export const getBusinessByContactPage = async (params) => { - return await request.get({ url: `/crm/contact-business-link/page-by-contact`, params }) -} -// TODO @zyna:根据后端,调整下请求 diff --git a/src/views/crm/business/BusinessForm.vue b/src/views/crm/business/BusinessForm.vue index 53f5cb8d..d2c10b35 100644 --- a/src/views/crm/business/BusinessForm.vue +++ b/src/views/crm/business/BusinessForm.vue @@ -242,7 +242,8 @@ const queryParams = reactive({ mobile: null, industryId: null, level: null, - source: null + source: null, + pool:false }) // 选择客户 const showCustomer = ref(false) diff --git a/src/views/crm/contactBusinessLink/components/BusinessLinkContactList.vue b/src/views/crm/business/components/BusinessForContactLink.vue similarity index 79% rename from src/views/crm/contactBusinessLink/components/BusinessLinkContactList.vue rename to src/views/crm/business/components/BusinessForContactLink.vue index 5d62b1d0..4a8a401a 100644 --- a/src/views/crm/contactBusinessLink/components/BusinessLinkContactList.vue +++ b/src/views/crm/business/components/BusinessForContactLink.vue @@ -29,7 +29,6 @@ -