diff --git a/src/api/crm/backlog/index.ts b/src/api/crm/backlog/index.ts index 6a5fda3c..614b0ef2 100644 --- a/src/api/crm/backlog/index.ts +++ b/src/api/crm/backlog/index.ts @@ -1,21 +1,11 @@ import request from '@/config/axios' // TODO 芋艿:融合下 -// 1. 获得今日需联系客户数量 -export const getTodayCustomerCount = async () => { - return await request.get({ url: '/crm/customer/today-customer-count' }) -} - // 3. 获得分配给我的客户数量 export const getFollowCustomerCount = async () => { return await request.get({ url: '/crm/customer/follow-customer-count' }) } -// 4. 获得待进入公海的客户数量 -export const getPutInPoolCustomerRemindCount = async () => { - return await request.get({ url: '/crm/customer/put-in-pool-remind-count' }) -} - // 5. 获得待审核合同数量 export const getCheckContractCount = async () => { return await request.get({ url: '/crm/contract/check-contract-count' }) diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index 49ccb08a..cc15eb5e 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -35,6 +35,26 @@ export const getCustomerPage = async (params) => { return await request.get({ url: `/crm/customer/page`, params }) } +// 进入公海客户提醒的客户列表 +export const getPutPoolRemindCustomerPage = async (params) => { + return await request.get({ url: `/crm/customer/put-pool-remind-page`, params }) +} + +// 获得待进入公海客户数量 +export const getPutPoolRemindCustomerCount = async () => { + return await request.get({ url: `/crm/customer/put-pool-remind-count` }) +} + +// 获得今日需联系客户数量 +export const getTodayContactCustomerCount = async () => { + return await request.get({ url: `/crm/customer/today-contact-count` }) +} + +// 获得分配给我、待跟进的线索数量的客户数量 +export const getFollowCustomerCount = async () => { + return await request.get({ url: `/crm/customer/follow-count` }) +} + // 查询客户详情 export const getCustomer = async (id: number) => { return await request.get({ url: `/crm/customer/get?id=` + id }) @@ -71,8 +91,8 @@ export const importCustomerTemplate = () => { } // 客户列表 -export const getSimpleCustomerList = async () => { - return await request.get({ url: `/crm/customer/list-all-simple` }) +export const getCustomerSimpleList = async () => { + return await request.get({ url: `/crm/customer/simple-list` }) } // ======================= 业务操作 ======================= @@ -98,12 +118,15 @@ export const receiveCustomer = async (ids: any[]) => { return await request.put({ url: '/crm/customer/receive', params: { ids: ids.join(',') } }) } +// 分配公海给对应负责人 +export const distributeCustomer = async (ids: any[], ownerUserId: number) => { + return await request.put({ + url: '/crm/customer/distribute', + data: { ids: ids, ownerUserId } + }) +} + // 客户放入公海 export const putCustomerPool = async (id: number) => { return await request.put({ url: `/crm/customer/put-pool?id=${id}` }) } - -// 进入公海客户提醒 -export const getPutInPoolRemindCustomerPage = async (params) => { - return await request.get({ url: `/crm/customer/put-in-pool-remind-page`, params }) -} diff --git a/src/views/crm/backlog/tables/FollowCustomer.vue b/src/views/crm/backlog/components/CustomerFollowList.vue similarity index 80% rename from src/views/crm/backlog/tables/FollowCustomer.vue rename to src/views/crm/backlog/components/CustomerFollowList.vue index e82c808d..8e1017a3 100644 --- a/src/views/crm/backlog/tables/FollowCustomer.vue +++ b/src/views/crm/backlog/components/CustomerFollowList.vue @@ -31,32 +31,31 @@ - - + - - - - - - + + + + - + + + + + + - - - + + + + + + + @@ -94,8 +102,6 @@ prop="createTime" width="180px" /> - - @@ -108,12 +114,14 @@ - diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue index b0425f17..16ebafe6 100644 --- a/src/views/crm/contract/ContractForm.vue +++ b/src/views/crm/contract/ContractForm.vue @@ -257,7 +257,7 @@ const getAllApi = async () => { /** 获取客户 */ const customerList = ref([]) const getCustomerList = async () => { - customerList.value = await CustomerApi.getSimpleCustomerList() + customerList.value = await CustomerApi.getCustomerSimpleList() } /** 动态获取客户联系人 */ diff --git a/src/views/crm/contract/oa/ContractDetail/index.vue b/src/views/crm/contract/oa/ContractDetail/index.vue index bd427fc5..25089653 100644 --- a/src/views/crm/contract/oa/ContractDetail/index.vue +++ b/src/views/crm/contract/oa/ContractDetail/index.vue @@ -194,7 +194,7 @@ const getAllApi = async () => { const customerList = ref([]) /** 获取客户 */ const getCustomerList = async () => { - customerList.value = await CustomerApi.getSimpleCustomerList() + customerList.value = await CustomerApi.getCustomerSimpleList() } const contactList = ref([]) /** 动态获取客户联系人 */ diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index 12e4957a..e249b8cc 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -26,14 +26,15 @@ > 锁定 - - 领取客户 + 领取 + + 分配 - 客户放入公海 + 放入公海 @@ -74,7 +75,8 @@ - + + diff --git a/src/views/crm/customer/pool/index.vue b/src/views/crm/customer/pool/index.vue index fbde4156..2e4f3d16 100644 --- a/src/views/crm/customer/pool/index.vue +++ b/src/views/crm/customer/pool/index.vue @@ -257,7 +257,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await CustomerApi.exportCustomer(queryParams.value) - download.excel(data, '客户.xls') + download.excel(data, '客户公海.xls') } catch { } finally { exportLoading.value = false