diff --git a/src/api/crm/statistics/customer.ts b/src/api/crm/statistics/customer.ts
index ebb9dfb3..815fe653 100644
--- a/src/api/crm/statistics/customer.ts
+++ b/src/api/crm/statistics/customer.ts
@@ -44,6 +44,18 @@ export interface CrmStatisticsCustomerContractSummaryRespVO {
orderDate: Date
}
+export interface CrmStatisticsPoolSummaryByDateRespVO {
+ time: string
+ customerPutCount: number
+ customerTakeCount: number
+}
+
+export interface CrmStatisticsPoolSummaryByUserRespVO {
+ ownerUserName: string
+ customerPutCount: number
+ customerTakeCount: number
+}
+
export interface CrmStatisticsCustomerDealCycleByDateRespVO {
time: string
customerDealCycle: number
@@ -99,14 +111,28 @@ export const StatisticsCustomerApi = {
params
})
},
- // 5.1 获取客户成交周期(按日期)
+ // 5.1 获取客户公海分析(按日期)
+ getPoolSummaryByDate: (param: any) => {
+ return request.get({
+ url: '/crm/statistics-customer/get-pool-summary-by-date',
+ params: param
+ })
+ },
+ // 5.2 获取客户公海分析(按用户)
+ getPoolSummaryByUser: (param: any) => {
+ return request.get({
+ url: '/crm/statistics-customer/get-pool-summary-by-user',
+ params: param
+ })
+ },
+ // 6.1 获取客户成交周期(按日期)
getCustomerDealCycleByDate: (params: any) => {
return request.get({
url: '/crm/statistics-customer/get-customer-deal-cycle-by-date',
params
})
},
- // 5.2 获取客户成交周期(按用户)
+ // 6.2 获取客户成交周期(按用户)
getCustomerDealCycleByUser: (params: any) => {
return request.get({
url: '/crm/statistics-customer/get-customer-deal-cycle-by-user',
diff --git a/src/views/crm/statistics/customer/components/PoolSummary.vue b/src/views/crm/statistics/customer/components/PoolSummary.vue
new file mode 100644
index 00000000..fdb54d03
--- /dev/null
+++ b/src/views/crm/statistics/customer/components/PoolSummary.vue
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/crm/statistics/customer/index.vue b/src/views/crm/statistics/customer/index.vue
index fe3aa555..e84b0850 100644
--- a/src/views/crm/statistics/customer/index.vue
+++ b/src/views/crm/statistics/customer/index.vue
@@ -19,10 +19,16 @@
start-placeholder="开始日期"
type="daterange"
value-format="YYYY-MM-DD HH:mm:ss"
+ @change="handleQuery"
/>
-
+
-
+
- 搜索
+ 查询
@@ -85,6 +98,10 @@
+
+
+
+
@@ -97,19 +114,20 @@
import * as DeptApi from '@/api/system/dept'
import * as UserApi from '@/api/system/user'
import { useUserStore } from '@/store/modules/user'
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { beginOfDay, defaultShortcuts, endOfDay, formatDate } from '@/utils/formatTime'
import { defaultProps, handleTree } from '@/utils/tree'
-import CustomerSummary from './components/CustomerSummary.vue'
-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 { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
+import CustomerFollowUpSummary from './components/CustomerFollowUpSummary.vue'
+import CustomerFollowUpType from './components/CustomerFollowUpType.vue'
+import CustomerSummary from './components/CustomerSummary.vue'
+import PoolSummary from './components/PoolSummary.vue'
defineOptions({ name: 'CrmStatisticsCustomer' })
const queryParams = reactive({
- interval: 1,
+ interval: 2, // WEEK, 周
deptId: useUserStore().getUser.deptId,
userId: undefined,
times: [
@@ -135,8 +153,7 @@ const customerSummaryRef = ref() // 1. 客户总量分析
const followUpSummaryRef = ref() // 2. 客户跟进次数分析
const followUpTypeRef = ref() // 3. 客户跟进方式分析
const conversionStatRef = ref() // 4. 客户转化率分析
-// 5. TODO 公海客户分析
-// 缺 crm_owner_record 表 TODO @dhb52:可以先做界面 + 接口,接口数据直接写死返回,相当于 mock 出来
+const poolSummaryRef = ref() // 5. 客户公海分析
const dealCycleRef = ref() // 6. 成交周期分析
/** 搜索按钮操作 */
@@ -154,6 +171,9 @@ const handleQuery = () => {
case 'conversionStat': // 客户转化率分析
conversionStatRef.value?.loadData?.()
break
+ case 'poolSummary': // 公海客户分析
+ poolSummaryRef.value?.loadData?.()
+ break
case 'dealCycle': // 成交周期分析
dealCycleRef.value?.loadData?.()
break