diff --git a/src/api/crm/statistics/funnel.ts b/src/api/crm/statistics/funnel.ts
index 91093c35..0ba322b8 100644
--- a/src/api/crm/statistics/funnel.ts
+++ b/src/api/crm/statistics/funnel.ts
@@ -6,6 +6,12 @@ export interface CrmStatisticFunnelRespVO {
winCount: number // 赢单数
}
+export interface CrmStatisticsBusinessSummaryByDateRespVO {
+ time: string // 时间
+ businessCreateCount: number // 商机数
+ businessDealCount: number // 商机金额
+}
+
// 客户分析 API
export const StatisticFunnelApi = {
// 1. 获取销售漏斗统计数据
@@ -21,5 +27,19 @@ export const StatisticFunnelApi = {
url: '/crm/statistics-funnel/get-business-end-status-summary',
params
})
+ },
+ // 3. 获取新增商机分析(按日期)
+ getBusinessSummaryByDate: (params: any) => {
+ return request.get({
+ url: '/crm/statistics-funnel/get-business-summary-by-date',
+ params
+ })
+ },
+ // 4. 获取商机列表(按日期)
+ getBusinessPageByDate: (params: any) => {
+ return request.get({
+ url: '/crm/statistics-funnel/get-business-page-by-date',
+ params
+ })
}
}
diff --git a/src/views/crm/business/index.vue b/src/views/crm/business/index.vue
index 793f187c..84e447c0 100644
--- a/src/views/crm/business/index.vue
+++ b/src/views/crm/business/index.vue
@@ -5,35 +5,43 @@
- 搜索
- 重置
-
- 新增
+
+
+ 搜索
+
+
+
+ 重置
+
+
+
+ 新增
- 导出
+
+ 导出
@@ -46,8 +54,8 @@
-
-
+
+
{{ scope.row.name }}
@@ -66,17 +74,17 @@
@@ -97,49 +105,49 @@
width="180px"
/>
-
+
编辑
删除
@@ -148,9 +156,9 @@
@@ -159,7 +167,7 @@
-
diff --git a/src/views/crm/statistics/funnel/index.vue b/src/views/crm/statistics/funnel/index.vue
index dff2b514..b8cddf8d 100644
--- a/src/views/crm/statistics/funnel/index.vue
+++ b/src/views/crm/statistics/funnel/index.vue
@@ -19,8 +19,24 @@
start-placeholder="开始日期"
type="daterange"
value-format="YYYY-MM-DD HH:mm:ss"
+ @change="handleQuery"
/>
+
+
+
+
+
-
+
- 搜索
+ 查询
@@ -62,7 +84,9 @@
-
+
+
+
@@ -75,10 +99,13 @@ import { useUserStore } from '@/store/modules/user'
import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/formatTime'
import { defaultProps, handleTree } from '@/utils/tree'
import FunnelBusiness from './components/FunnelBusiness.vue'
+import BusinessSummary from './components/BusinessSummary.vue'
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
defineOptions({ name: 'CrmStatisticsFunnel' })
const queryParams = reactive({
+ interval: 2, // WEEK, 周
deptId: useUserStore().getUser.deptId,
userId: undefined,
times: [
@@ -100,8 +127,8 @@ const userListByDeptId = computed(() =>
)
const activeTab = ref('funnelRef') // 活跃标签
-const funnelRef = ref() // 客户地区分布
-const levelRef = ref() // 客户级别
+const funnelRef = ref() // 销售漏斗
+const businessSummaryRef = ref() // 新增商机分析
const sourceRef = ref() // 客户来源
/** 搜索按钮操作 */
@@ -110,8 +137,8 @@ const handleQuery = () => {
case 'funnelRef':
funnelRef.value?.loadData?.()
break
- case 'levelRef':
- levelRef.value?.loadData?.()
+ case 'businessSummaryRef':
+ businessSummaryRef.value?.loadData?.()
break
case 'sourceRef':
sourceRef.value?.loadData?.()