diff --git a/src/api/crm/statistics/customer.ts b/src/api/crm/statistics/customer.ts index f048d174..2c801bb6 100644 --- a/src/api/crm/statistics/customer.ts +++ b/src/api/crm/statistics/customer.ts @@ -1,53 +1,116 @@ import request from '@/config/axios' -export interface StatisticsCustomerRespVO { - count: number - cycle: number - category: string +export interface CrmStatisticsCustomerSummaryByDateRespVO { + time: string + customerCreateCount: number + customerDealCount: number } -// 客户总量分析 API -export const StatisticsCustomerApi = { - // 客户总量(新建) - getTotalCustomerCount: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-total-customer-count', - params - }) - }, - // 客户总量(成交) - getDealTotalCustomerCount: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-deal-total-customer-count', - params - }) - }, - // 获取客户跟进次数 - getRecordCount: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-record-count', - params - }) - }, - // 获取客户跟进次数 - getDistinctRecordCount: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-distinct-record-count', - params - }) - }, - // 获取客户跟进方式统计数 - getRecordTypeCount: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-record-type-count', - params - }) - }, - // 获取客户成交周期 - getCustomerCycle: (params: any) => { - return request.get({ - url: '/crm/statistics-customer/get-customer-cycle', - params - }) - }, +export interface CrmStatisticsCustomerSummaryByUserRespVO { + ownerUserName: string + customerCreateCount: number + customerDealCount: number + contractPrice: number + receivablePrice: number +} + +export interface CrmStatisticsFollowupSummaryByDateRespVO { + time: string + followupRecordCount: number + followupCustomerCount: number +} + +export interface CrmStatisticsFollowupSummaryByUserRespVO { + ownerUserName: string + followupRecordCount: number + followupCustomerCount: number +} + +export interface CrmStatisticsFollowupSummaryByTypeRespVO { + followupType: string + followupRecordCount: number +} + +export interface CrmStatisticsCustomerContractSummaryRespVO { + customerName: string + contractName: string + totalPrice: number + receivablePrice: number + customerType: string + customerSource: string + ownerUserName: string + creatorUserName: string + createTime: Date + orderDate: Date +} + +export interface CrmStatisticsCustomerDealCycleByDateRespVO { + time: string + customerDealCycle: number +} + +export interface CrmStatisticsCustomerDealCycleByUserRespVO { + ownerUserName: string + customerDealCycle: number + customerDealCount: number +} + +// 客户分析 API +export const StatisticsCustomerApi = { + // 1.1 客户总量分析(按日期) + getCustomerSummaryByDate: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-summary-by-date', + params + }) + }, + // 1.2 客户总量分析(按用户) + getCustomerSummaryByUser: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-summary-by-user', + params + }) + }, + // 2.1 客户跟进次数分析(按日期) + getFollowupSummaryByDate: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-followup-summary-by-date', + params + }) + }, + // 2.2 客户跟进次数分析(按用户) + getFollowupSummaryByUser: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-followup-summary-by-user', + params + }) + }, + // 3.1 获取客户跟进方式统计数 + getFollowupSummaryByType: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-followup-summary-by-type', + params + }) + }, + // 4.1 合同摘要信息(客户转化率页面) + getContractSummary: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-followup-summary-by-type', + params + }) + }, + // 5.1 获取客户成交周期(按日期) + getCustomerDealCycleByDate: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-deal-cycle-by-date', + params + }) + }, + // 5.2 获取客户成交周期(按用户) + getCustomerDealCycleByUser: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-deal-cycle-by-user', + params + }) + } } diff --git a/src/views/crm/statistics/customer/components/ConversionRate.vue b/src/views/crm/statistics/customer/components/ConversionRate.vue deleted file mode 100644 index 5f3ad591..00000000 --- a/src/views/crm/statistics/customer/components/ConversionRate.vue +++ /dev/null @@ -1,112 +0,0 @@ - - - diff --git a/src/views/crm/statistics/customer/components/CustomerConversionStat.vue b/src/views/crm/statistics/customer/components/CustomerConversionStat.vue new file mode 100644 index 00000000..fbef26b8 --- /dev/null +++ b/src/views/crm/statistics/customer/components/CustomerConversionStat.vue @@ -0,0 +1,130 @@ + + + diff --git a/src/views/crm/statistics/customer/components/CustomerCycle.vue b/src/views/crm/statistics/customer/components/CustomerDealCycle.vue similarity index 60% rename from src/views/crm/statistics/customer/components/CustomerCycle.vue rename to src/views/crm/statistics/customer/components/CustomerDealCycle.vue index d28f345d..9243e6a3 100644 --- a/src/views/crm/statistics/customer/components/CustomerCycle.vue +++ b/src/views/crm/statistics/customer/components/CustomerDealCycle.vue @@ -11,21 +11,30 @@ - - - + + + diff --git a/src/views/crm/statistics/customer/components/TotalCustomerCount.vue b/src/views/crm/statistics/customer/components/TotalCustomerCount.vue deleted file mode 100644 index 84c50d04..00000000 --- a/src/views/crm/statistics/customer/components/TotalCustomerCount.vue +++ /dev/null @@ -1,112 +0,0 @@ - - - diff --git a/src/views/crm/statistics/customer/index.vue b/src/views/crm/statistics/customer/index.vue index 89e2d009..8096814f 100644 --- a/src/views/crm/statistics/customer/index.vue +++ b/src/views/crm/statistics/customer/index.vue @@ -49,44 +49,44 @@ - + - - + + - - + + - + - - + + - - + + +