mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-03-13 14:49:10 +08:00
133 lines
3.4 KiB
TypeScript
133 lines
3.4 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
export interface CrmStatisticsCustomerSummaryByDateRespVO {
|
|
time: string
|
|
customerCreateCount: number
|
|
customerDealCount: number
|
|
}
|
|
|
|
export interface CrmStatisticsCustomerSummaryByUserRespVO {
|
|
ownerUserName: string
|
|
customerCreateCount: number
|
|
customerDealCount: number
|
|
contractPrice: number
|
|
receivablePrice: number
|
|
}
|
|
|
|
export interface CrmStatisticsFollowupSummaryByDateRespVO {
|
|
time: string
|
|
followupRecordCount: number
|
|
followupCustomerCount: number
|
|
}
|
|
|
|
export interface CrmStatisticsFollowupSummaryByUserRespVO {
|
|
ownerUserName: string
|
|
followupRecordCount: number
|
|
followupCustomerCount: number
|
|
}
|
|
|
|
export interface CrmStatisticsFollowupSummaryByTypeRespVO {
|
|
followupType: string
|
|
followupRecordCount: number
|
|
}
|
|
|
|
export interface CrmStatisticsCustomerContractSummaryRespVO {
|
|
customerName: string
|
|
contractName: string
|
|
totalPrice: number
|
|
receivablePrice: number
|
|
customerType: string
|
|
customerSource: string
|
|
ownerUserName: string
|
|
creatorUserName: string
|
|
createTime: Date
|
|
orderDate: Date
|
|
}
|
|
|
|
export interface CrmStatisticsCustomerDealCycleByDateRespVO {
|
|
time: string
|
|
customerDealCycle: number
|
|
}
|
|
|
|
export interface CrmStatisticsCustomerDealCycleByUserRespVO {
|
|
ownerUserName: string
|
|
customerDealCycle: number
|
|
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 客户总量分析(按日期)
|
|
getCustomerSummaryByDate: (params: any) => {
|
|
return request.get({
|
|
url: '/crm/statistics-customer/get-customer-summary-by-date',
|
|
params
|
|
})
|
|
},
|
|
// 1.2 客户总量分析(按用户)
|
|
getCustomerSummaryByUser: (params: any) => {
|
|
return request.get({
|
|
url: '/crm/statistics-customer/get-customer-summary-by-user',
|
|
params
|
|
})
|
|
},
|
|
// 2.1 客户跟进次数分析(按日期)
|
|
getFollowupSummaryByDate: (params: any) => {
|
|
return request.get({
|
|
url: '/crm/statistics-customer/get-followup-summary-by-date',
|
|
params
|
|
})
|
|
},
|
|
// 2.2 客户跟进次数分析(按用户)
|
|
getFollowupSummaryByUser: (params: any) => {
|
|
return request.get({
|
|
url: '/crm/statistics-customer/get-followup-summary-by-user',
|
|
params
|
|
})
|
|
},
|
|
// 3.1 获取客户跟进方式统计数
|
|
getFollowupSummaryByType: (params: any) => {
|
|
return request.get({
|
|
url: '/crm/statistics-customer/get-followup-summary-by-type',
|
|
params
|
|
})
|
|
},
|
|
// 4.1 合同摘要信息(客户转化率页面)
|
|
getContractSummary: (params: any) => {
|
|
return request.get({
|
|
url: '/crm/statistics-customer/get-contract-summary',
|
|
params
|
|
})
|
|
},
|
|
// 5.1 获取客户成交周期(按日期)
|
|
getCustomerDealCycleByDate: (params: any) => {
|
|
return request.get({
|
|
url: '/crm/statistics-customer/get-customer-deal-cycle-by-date',
|
|
params
|
|
})
|
|
},
|
|
// 5.2 获取客户成交周期(按用户)
|
|
getCustomerDealCycleByUser: (params: any) => {
|
|
return request.get({
|
|
url: '/crm/statistics-customer/get-customer-deal-cycle-by-user',
|
|
params
|
|
})
|
|
}
|
|
}
|