diff --git a/src/api/crm/statistics/customer.ts b/src/api/crm/statistics/customer.ts index 4358db77..aeb3b3a2 100644 --- a/src/api/crm/statistics/customer.ts +++ b/src/api/crm/statistics/customer.ts @@ -49,6 +49,36 @@ export interface CrmStatisticsCustomerDealCycleByDateRespVO { customerDealCycle: number } +export interface CrmStatisticCustomerBaseRespVO { + customerCount: number + dealCount: number + dealPortion: number +} + +export interface CrmStatisticCustomerIndustryRespVO extends CrmStatisticCustomerBaseRespVO { + industryId: number + industryName: string + industryPortion: number +} + +export interface CrmStatisticCustomerSourceRespVO extends CrmStatisticCustomerBaseRespVO { + source: number + sourceName: string + sourcePortion: number +} + +export interface CrmStatisticCustomerLevelRespVO extends CrmStatisticCustomerBaseRespVO { + level: number + levelName: string + levelPortion: number +} + +export interface CrmStatisticCustomerAreaRespVO extends CrmStatisticCustomerBaseRespVO { + areaId: number + areaName: string + areaPortion: number +} + export interface CrmStatisticsCustomerDealCycleByUserRespVO { ownerUserName: string customerDealCycle: number @@ -112,5 +142,33 @@ export const StatisticsCustomerApi = { url: '/crm/statistics-customer/get-customer-deal-cycle-by-user', params }) + }, + // 6.1 获取客户行业统计数据 + getCustomerIndustry: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-industry-summary', + params + }) + }, + // 6.1 获取客户来源统计数据 + getCustomerSource: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-source-summary', + params + }) + }, + // 6.1 获取客户行业统计数据 + getCustomerLevel: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-level-summary', + params + }) + }, + // 6.1 获取客户行业统计数据 + getCustomerArea: (params: any) => { + return request.get({ + url: '/crm/statistics-customer/get-customer-area-summary', + params + }) } } diff --git a/src/api/mall/statistics/member.ts b/src/api/mall/statistics/member.ts index 92af031e..d9accf92 100644 --- a/src/api/mall/statistics/member.ts +++ b/src/api/mall/statistics/member.ts @@ -5,7 +5,7 @@ import { formatDate } from '@/utils/formatTime' /** 会员分析 Request VO */ export interface MemberAnalyseReqVO { - times: [dayjs.ConfigType, dayjs.ConfigType] + times: dayjs.ConfigType[] } /** 会员分析 Response VO */ diff --git a/src/views/crm/statistics/customer/components/CustomerAddress.vue b/src/views/crm/statistics/customer/components/CustomerAddress.vue new file mode 100644 index 00000000..c35638a6 --- /dev/null +++ b/src/views/crm/statistics/customer/components/CustomerAddress.vue @@ -0,0 +1,150 @@ + + + diff --git a/src/views/crm/statistics/customer/components/CustomerIndustry.vue b/src/views/crm/statistics/customer/components/CustomerIndustry.vue new file mode 100644 index 00000000..d505a41b --- /dev/null +++ b/src/views/crm/statistics/customer/components/CustomerIndustry.vue @@ -0,0 +1,171 @@ + + + diff --git a/src/views/crm/statistics/customer/components/CustomerLevel.vue b/src/views/crm/statistics/customer/components/CustomerLevel.vue new file mode 100644 index 00000000..6afd5647 --- /dev/null +++ b/src/views/crm/statistics/customer/components/CustomerLevel.vue @@ -0,0 +1,171 @@ + + + diff --git a/src/views/crm/statistics/customer/components/CustomerSource.vue b/src/views/crm/statistics/customer/components/CustomerSource.vue new file mode 100644 index 00000000..11a5c68f --- /dev/null +++ b/src/views/crm/statistics/customer/components/CustomerSource.vue @@ -0,0 +1,171 @@ + + + diff --git a/src/views/crm/statistics/customer/index.vue b/src/views/crm/statistics/customer/index.vue index 9d804e31..37a9e999 100644 --- a/src/views/crm/statistics/customer/index.vue +++ b/src/views/crm/statistics/customer/index.vue @@ -3,49 +3,55 @@ - + - 搜索 - 重置 + + + 搜索 + + + + 重置 + @@ -54,24 +60,40 @@ - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + @@ -88,6 +110,10 @@ import CustomerFollowupSummary from './components/CustomerFollowupSummary.vue' import CustomerFollowupType from './components/CustomerFollowupType.vue' import CustomerConversionStat from './components/CustomerConversionStat.vue' import CustomerDealCycle from './components/CustomerDealCycle.vue' +import CustomerAddress from './components/CustomerAddress.vue' +import CustomerIndustry from './components/CustomerIndustry.vue' +import CustomerSource from './components/CustomerSource.vue' +import CustomerLevel from './components/CustomerLevel.vue' defineOptions({ name: 'CrmStatisticsCustomer' }) @@ -125,7 +151,13 @@ const conversionStatRef = ref() // 缺 crm_owner_record 表 // 6.成交周期分析 const dealCycleRef = ref() - +const addressRef = ref() +// 客户级别 +const levelRef = ref() +// 客户来源 +const sourceRef = ref() +// 客户行业 +const industryRef = ref() /** 搜索按钮操作 */ const handleQuery = () => { switch (activeTab.value) { @@ -144,6 +176,18 @@ const handleQuery = () => { case 'dealCycle': dealCycleRef.value?.loadData?.() break + case 'addressRef': + addressRef.value?.loadData?.() + break + case 'levelRef': + levelRef.value?.loadData?.() + break + case 'sourceRef': + sourceRef.value?.loadData?.() + break + case 'industryRef': + industryRef.value?.loadData?.() + break } }