From cce1fadc33ea9731990d8f15b290681e9d5407d0 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 24 Mar 2024 22:22:09 +0800 Subject: [PATCH] =?UTF-8?q?CRM:=20=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E8=A1=8C=E4=B8=9A=E3=80=81=E6=9D=A5=E6=BA=90=E3=80=81=E7=BA=A7?= =?UTF-8?q?=E5=88=AB=E7=BB=9F=E8=AE=A1=E3=80=81=E5=8C=BA=E5=9F=9F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/statistics/customer.ts | 58 ++++++ src/api/mall/statistics/member.ts | 2 +- .../customer/components/CustomerAddress.vue | 150 +++++++++++++++ .../customer/components/CustomerIndustry.vue | 171 ++++++++++++++++++ .../customer/components/CustomerLevel.vue | 171 ++++++++++++++++++ .../customer/components/CustomerSource.vue | 171 ++++++++++++++++++ src/views/crm/statistics/customer/index.vue | 82 +++++++-- 7 files changed, 785 insertions(+), 20 deletions(-) create mode 100644 src/views/crm/statistics/customer/components/CustomerAddress.vue create mode 100644 src/views/crm/statistics/customer/components/CustomerIndustry.vue create mode 100644 src/views/crm/statistics/customer/components/CustomerLevel.vue create mode 100644 src/views/crm/statistics/customer/components/CustomerSource.vue 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 } }