From 37e6775282265ce441fda8709e1ecfaa51bf9a8e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 18 Nov 2025 22:17:29 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90ele=E3=80=91=E3=80=90crm?= =?UTF-8?q?=E3=80=91business=20=E7=9A=84=E8=BF=81=E7=A7=BB=E9=83=A8?= =?UTF-8?q?=E5=88=86=EF=BC=88list=E3=80=81form=E3=80=81detail=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-ele/src/router/routes/modules/crm.ts | 48 +++++++++++++++++++ apps/web-ele/src/views/crm/business/index.vue | 8 +++- packages/@core/base/shared/src/utils/date.ts | 4 ++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/apps/web-ele/src/router/routes/modules/crm.ts b/apps/web-ele/src/router/routes/modules/crm.ts index b7ce01f94..dbf83bc60 100644 --- a/apps/web-ele/src/router/routes/modules/crm.ts +++ b/apps/web-ele/src/router/routes/modules/crm.ts @@ -83,6 +83,54 @@ const routes: RouteRecordRaw[] = [ }, component: () => import('#/views/crm/product/detail/index.vue'), }, + { + path: 'statistics/customer', + name: 'CrmStatisticsCustomer', + meta: { + title: '客户统计', + activePath: '/crm/statistics/customer', + }, + component: () => + import('#/views/crm/statistics/customer/index.vue'), + }, + { + path: 'statistics/funnel', + name: 'CrmStatisticsFunnel', + meta: { + title: '销售漏斗', + activePath: '/crm/statistics/funnel', + }, + component: () => import('#/views/crm/statistics/funnel/index.vue'), + }, + { + path: 'statistics/performance', + name: 'CrmStatisticsPerformance', + meta: { + title: '员工业绩', + activePath: '/crm/statistics/performance', + }, + component: () => + import('#/views/crm/statistics/performance/index.vue'), + }, + { + path: 'statistics/portrait', + name: 'CrmStatisticsPortrait', + meta: { + title: '客户画像', + activePath: '/crm/statistics/portrait', + }, + component: () => + import('#/views/crm/statistics/portrait/index.vue'), + }, + { + path: 'statistics/rank', + name: 'CrmStatisticsRank', + meta: { + title: '排行榜', + activePath: '/crm/statistics/rank', + }, + component: () => import('#/views/crm/statistics/rank/index.vue'), + }, ], }, ]; diff --git a/apps/web-ele/src/views/crm/business/index.vue b/apps/web-ele/src/views/crm/business/index.vue index 377fbf978..f5eae10bf 100644 --- a/apps/web-ele/src/views/crm/business/index.vue +++ b/apps/web-ele/src/views/crm/business/index.vue @@ -8,7 +8,13 @@ import { useRouter } from 'vue-router'; import { DocAlert, Page, useVbenModal } from '@vben/common-ui'; import { downloadFileFromBlobPart } from '@vben/utils'; -import { ElButton, ElLoading, ElMessage, ElTabPane, ElTabs } from 'element-plus'; +import { + ElButton, + ElLoading, + ElMessage, + ElTabPane, + ElTabs, +} from 'element-plus'; import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { diff --git a/packages/@core/base/shared/src/utils/date.ts b/packages/@core/base/shared/src/utils/date.ts index 2f53041f1..7fb678f9d 100644 --- a/packages/@core/base/shared/src/utils/date.ts +++ b/packages/@core/base/shared/src/utils/date.ts @@ -20,6 +20,10 @@ type Format = | (string & {}); export function formatDate(time?: FormatDate, format: Format = 'YYYY-MM-DD') { + // 日期不存在,则返回空 + if (!time) { + return ''; + } try { const date = dayjs.isDayjs(time) ? time : dayjs(time); if (!date.isValid()) {