feat: crm statistics performance

This commit is contained in:
xingyu4j
2025-06-23 21:14:48 +08:00
parent b2310b226c
commit 62655e23e5
4 changed files with 631 additions and 26 deletions

View File

@@ -1,5 +1,3 @@
import type { PageParam } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace CrmStatisticsPerformanceApi {
@@ -10,10 +8,17 @@ export namespace CrmStatisticsPerformanceApi {
lastMonthCount: number;
lastYearCount: number;
}
export interface PerformanceParams {
times: string[];
deptId: number;
userId: number;
}
}
/** 员工获得合同金额统计 */
export function getContractPricePerformance(params: PageParam) {
export function getContractPricePerformance(
params: CrmStatisticsPerformanceApi.PerformanceParams,
) {
return requestClient.get<CrmStatisticsPerformanceApi.Performance[]>(
'/crm/statistics-performance/get-contract-price-performance',
{ params },
@@ -21,7 +26,9 @@ export function getContractPricePerformance(params: PageParam) {
}
/** 员工获得回款统计 */
export function getReceivablePricePerformance(params: PageParam) {
export function getReceivablePricePerformance(
params: CrmStatisticsPerformanceApi.PerformanceParams,
) {
return requestClient.get<CrmStatisticsPerformanceApi.Performance[]>(
'/crm/statistics-performance/get-receivable-price-performance',
{ params },
@@ -29,7 +36,9 @@ export function getReceivablePricePerformance(params: PageParam) {
}
/** 员工获得签约合同数量统计 */
export function getContractCountPerformance(params: PageParam) {
export function getContractCountPerformance(
params: CrmStatisticsPerformanceApi.PerformanceParams,
) {
return requestClient.get<CrmStatisticsPerformanceApi.Performance[]>(
'/crm/statistics-performance/get-contract-count-performance',
{ params },