From 014d1f8cd2c9a6b3e651d0e565ee9a5813e9db42 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 15 Apr 2024 16:32:48 +0800 Subject: [PATCH] =?UTF-8?q?CRM:=20=E6=96=B0=E5=A2=9E=E5=95=86=E6=9C=BA?= =?UTF-8?q?=E8=B5=A2=E5=8D=95=E8=BD=AC=E5=8C=96=E7=8E=87=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/crm/statistics/funnel.ts | 15 +- .../BusinessInversionRateSummary.vue | 278 ++++++++++++++++++ .../funnel/components/BusinessSummary.vue | 2 +- src/views/crm/statistics/funnel/index.vue | 14 +- .../components/PortraitCustomerArea.vue | 2 +- 5 files changed, 304 insertions(+), 7 deletions(-) create mode 100644 src/views/crm/statistics/funnel/components/BusinessInversionRateSummary.vue diff --git a/src/api/crm/statistics/funnel.ts b/src/api/crm/statistics/funnel.ts index ccfd7432..574a5f4f 100644 --- a/src/api/crm/statistics/funnel.ts +++ b/src/api/crm/statistics/funnel.ts @@ -12,6 +12,12 @@ export interface CrmStatisticsBusinessSummaryByDateRespVO { totalPrice: number | string // 商机金额 } +export interface CrmStatisticsBusinessInversionRateSummaryByDateRespVO { + time: string // 时间 + businessCount: number // 商机数量 + businessWinCount: number // 赢单商机数 +} + // 客户分析 API export const StatisticFunnelApi = { // 1. 获取销售漏斗统计数据 @@ -35,7 +41,14 @@ export const StatisticFunnelApi = { params }) }, - // 4. 获取商机列表(按日期) + // 4. 获取商机转化率分析(按日期) + getBusinessInversionRateSummaryByDate: (params: any) => { + return request.get({ + url: '/crm/statistics-funnel/get-business-inversion-rate-summary-by-date', + params + }) + }, + // 5. 获取商机列表(按日期) getBusinessPageByDate: (params: any) => { return request.get({ url: '/crm/statistics-funnel/get-business-page-by-date', diff --git a/src/views/crm/statistics/funnel/components/BusinessInversionRateSummary.vue b/src/views/crm/statistics/funnel/components/BusinessInversionRateSummary.vue new file mode 100644 index 00000000..47d53557 --- /dev/null +++ b/src/views/crm/statistics/funnel/components/BusinessInversionRateSummary.vue @@ -0,0 +1,278 @@ + + + diff --git a/src/views/crm/statistics/funnel/components/BusinessSummary.vue b/src/views/crm/statistics/funnel/components/BusinessSummary.vue index ae4b032a..942a7128 100644 --- a/src/views/crm/statistics/funnel/components/BusinessSummary.vue +++ b/src/views/crm/statistics/funnel/components/BusinessSummary.vue @@ -163,7 +163,7 @@ const echartsOption = reactive({ brush: { type: ['lineX', 'clear'] // 区域缩放按钮、还原按钮 }, - saveAsImage: { show: true, name: '客户总量分析' } // 保存为图片 + saveAsImage: { show: true, name: '新增商机分析' } // 保存为图片 } }, tooltip: { diff --git a/src/views/crm/statistics/funnel/index.vue b/src/views/crm/statistics/funnel/index.vue index b8cddf8d..804cb49b 100644 --- a/src/views/crm/statistics/funnel/index.vue +++ b/src/views/crm/statistics/funnel/index.vue @@ -87,7 +87,12 @@ - + + + @@ -100,6 +105,7 @@ import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/form import { defaultProps, handleTree } from '@/utils/tree' import FunnelBusiness from './components/FunnelBusiness.vue' import BusinessSummary from './components/BusinessSummary.vue' +import BusinessInversionRateSummary from './components/BusinessInversionRateSummary.vue' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' defineOptions({ name: 'CrmStatisticsFunnel' }) @@ -129,7 +135,7 @@ const userListByDeptId = computed(() => const activeTab = ref('funnelRef') // 活跃标签 const funnelRef = ref() // 销售漏斗 const businessSummaryRef = ref() // 新增商机分析 -const sourceRef = ref() // 客户来源 +const businessInversionRateSummaryRef = ref() // 商机转化率分析 /** 搜索按钮操作 */ const handleQuery = () => { @@ -140,8 +146,8 @@ const handleQuery = () => { case 'businessSummaryRef': businessSummaryRef.value?.loadData?.() break - case 'sourceRef': - sourceRef.value?.loadData?.() + case 'businessInversionRateSummaryRef': + businessInversionRateSummaryRef.value?.loadData?.() break } } diff --git a/src/views/crm/statistics/portrait/components/PortraitCustomerArea.vue b/src/views/crm/statistics/portrait/components/PortraitCustomerArea.vue index 8ccd52c8..112e6090 100644 --- a/src/views/crm/statistics/portrait/components/PortraitCustomerArea.vue +++ b/src/views/crm/statistics/portrait/components/PortraitCustomerArea.vue @@ -106,7 +106,7 @@ const loadData = async () => { areaStatisticsList.value = areaList.map((item: CrmStatisticCustomerAreaRespVO) => { return { ...item, - areaName: item.areaName // TODO @puhui999:这里最好注释下原因哈, 🤣 我从 mall copy 过来的 + areaName: item.areaName // .replace('维吾尔自治区', '') // .replace('壮族自治区', '') // .replace('回族自治区', '')