diff --git a/src/api/crm/statistics/customer.ts b/src/api/crm/statistics/customer.ts index 8d5b09f8..ebb9dfb3 100644 --- a/src/api/crm/statistics/customer.ts +++ b/src/api/crm/statistics/customer.ts @@ -14,21 +14,21 @@ export interface CrmStatisticsCustomerSummaryByUserRespVO { receivablePrice: number } -export interface CrmStatisticsFollowupSummaryByDateRespVO { +export interface CrmStatisticsFollowUpSummaryByDateRespVO { time: string - followupRecordCount: number - followupCustomerCount: number + followUpRecordCount: number + followUpCustomerCount: number } -export interface CrmStatisticsFollowupSummaryByUserRespVO { +export interface CrmStatisticsFollowUpSummaryByUserRespVO { ownerUserName: string followupRecordCount: number followupCustomerCount: number } -export interface CrmStatisticsFollowupSummaryByTypeRespVO { - followupType: string - followupRecordCount: number +export interface CrmStatisticsFollowUpSummaryByTypeRespVO { + followUpType: string + followUpRecordCount: number } export interface CrmStatisticsCustomerContractSummaryRespVO { @@ -55,22 +55,6 @@ export interface CrmStatisticsCustomerDealCycleByUserRespVO { customerDealCount: number } -export const DATE_INTERVAL_OPTIONS = [ - { value: 1, name: '今天' }, - { value: 2, name: '昨天' }, - { value: 3, name: '本周' }, - { value: 4, name: '上周' }, - { value: 5, name: '本月' }, - { value: 6, name: '上月' }, - { value: 7, name: '本季度' }, - { value: 8, name: '上季度' }, - { value: 9, name: '本年' }, - { value: 10, name: '去年' }, - { value: 11, name: '自定义' } -] - -export const CUSTOMER_INTERVAL = 11 - // 客户分析 API export const StatisticsCustomerApi = { // 1.1 客户总量分析(按日期) @@ -88,23 +72,23 @@ export const StatisticsCustomerApi = { }) }, // 2.1 客户跟进次数分析(按日期) - getFollowupSummaryByDate: (params: any) => { + getFollowUpSummaryByDate: (params: any) => { return request.get({ - url: '/crm/statistics-customer/get-followup-summary-by-date', + url: '/crm/statistics-customer/get-follow-up-summary-by-date', params }) }, // 2.2 客户跟进次数分析(按用户) - getFollowupSummaryByUser: (params: any) => { + getFollowUpSummaryByUser: (params: any) => { return request.get({ - url: '/crm/statistics-customer/get-followup-summary-by-user', + url: '/crm/statistics-customer/get-follow-up-summary-by-user', params }) }, // 3.1 获取客户跟进方式统计数 - getFollowupSummaryByType: (params: any) => { + getFollowUpSummaryByType: (params: any) => { return request.get({ - url: '/crm/statistics-customer/get-followup-summary-by-type', + url: '/crm/statistics-customer/get-follow-up-summary-by-type', params }) }, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 2284ff13..1c94df38 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -104,6 +104,7 @@ export enum DICT_TYPE { USER_TYPE = 'user_type', COMMON_STATUS = 'common_status', TERMINAL = 'terminal', // 终端 + DATE_INTERVAL = 'date_interval', // 数据间隔 // ========== SYSTEM 模块 ========== SYSTEM_USER_SEX = 'system_user_sex', diff --git a/src/views/crm/statistics/customer/components/CustomerConversionStat.vue b/src/views/crm/statistics/customer/components/CustomerConversionStat.vue index fbef26b8..17893cf9 100644 --- a/src/views/crm/statistics/customer/components/CustomerConversionStat.vue +++ b/src/views/crm/statistics/customer/components/CustomerConversionStat.vue @@ -10,11 +10,39 @@ - - + + - - + + + + + + + + @@ -41,7 +70,9 @@ import { } from '@/api/crm/statistics/customer' import { EChartsOption } from 'echarts' import { round } from 'lodash-es' -import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' +import { dateFormatter } from '@/utils/formatTime' +import { erpPriceTableColumnFormatter } from '@/utils' +import { DICT_TYPE } from '@/utils/dict' defineOptions({ name: 'CustomerConversionStat' }) const props = defineProps<{ queryParams: any }>() // 搜索参数 @@ -97,6 +128,7 @@ const echartsOption = reactive({ const loadData = async () => { // 1. 加载统计数据 loading.value = true + // TODO @ddhb52:这里调用 StatisticsCustomerApi.getCustomerSummaryByDate 好像不太对??? const customerCount = await StatisticsCustomerApi.getCustomerSummaryByDate(props.queryParams) const contractSummary = await StatisticsCustomerApi.getContractSummary(props.queryParams) // 2.1 更新 Echarts 数据 diff --git a/src/views/crm/statistics/customer/components/CustomerFollowupSummary.vue b/src/views/crm/statistics/customer/components/CustomerFollowUpSummary.vue similarity index 77% rename from src/views/crm/statistics/customer/components/CustomerFollowupSummary.vue rename to src/views/crm/statistics/customer/components/CustomerFollowUpSummary.vue index cfb025f5..5dc6215a 100644 --- a/src/views/crm/statistics/customer/components/CustomerFollowupSummary.vue +++ b/src/views/crm/statistics/customer/components/CustomerFollowUpSummary.vue @@ -12,11 +12,11 @@ - + @@ -25,8 +25,8 @@