diff --git a/src/api/crm/contact/index.ts b/src/api/crm/contact/index.ts index ac0bb112..43fb9745 100644 --- a/src/api/crm/contact/index.ts +++ b/src/api/crm/contact/index.ts @@ -25,11 +25,12 @@ export interface ContactVO { areaName: string ownerUserName: string } -export interface ContactBusinessLinkVO { - id: number + +export interface ContactBusinessReqVO { contactId: number - businessId: number + businessIds: number[] } + // 查询 CRM 联系人列表 export const getContactPage = async (params) => { return await request.get({ url: `/crm/contact/page`, params }) @@ -70,12 +71,12 @@ 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 createContactBusinessList = async (data: ContactBusinessReqVO) => { + return await request.post({ url: `/crm/contact/create-business-list`, data }) } -//解除联系人商机关联 -export const deleteContactBusinessLink = async (data: ContactBusinessLinkVO) => { - return await request.delete({ url: `/crm/contact/delete-batch-business`, data }) -} \ No newline at end of file +// 解除联系人商机关联 +export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => { + return await request.delete({ url: `/crm/contact/delete-business-list`, data }) +} diff --git a/src/views/crm/business/BusinessForm.vue b/src/views/crm/business/BusinessForm.vue index d2c10b35..31905972 100644 --- a/src/views/crm/business/BusinessForm.vue +++ b/src/views/crm/business/BusinessForm.vue @@ -62,12 +62,12 @@ + - + { queryParams.pageNo = 1 getCustomerList() } + /** 查询客户列表 */ const getCustomerList = async () => { loading.value = true try { const data = await CustomerApi.getCustomerPage(queryParams) - console.log(JSON.stringify(data)) customerList.value = data.list total.value = data.total } finally { diff --git a/src/views/crm/business/components/BusinessList.vue b/src/views/crm/business/components/BusinessList.vue index e51cad20..ca7d02c6 100644 --- a/src/views/crm/business/components/BusinessList.vue +++ b/src/views/crm/business/components/BusinessList.vue @@ -5,11 +5,32 @@ 创建商机 + + 关联 + + + 解除关联 + - + + diff --git a/src/views/crm/business/components/BusinessForContactLink.vue b/src/views/crm/business/components/BusinessListModal.vue similarity index 85% rename from src/views/crm/business/components/BusinessForContactLink.vue rename to src/views/crm/business/components/BusinessListModal.vue index dd66c55a..1abfdc7c 100644 --- a/src/views/crm/business/components/BusinessForContactLink.vue +++ b/src/views/crm/business/components/BusinessListModal.vue @@ -1,5 +1,5 @@