import { requestClient } from '#/api/request';
|
|
export namespace FinStatisticsApi {
|
/** 会计核算看板查询参数 */
|
export interface StatisticsParams {
|
startMonth?: string; // 起始月份 yyyy-MM,留空默认本年 1 月
|
endMonth?: string; // 结束月份 yyyy-MM,留空默认当前月
|
}
|
|
/** 会计核算看板总览 */
|
export interface StatisticsOverview {
|
startDate: string; // 实际统计起始日期
|
endDate: string; // 实际统计结束日期
|
receiptPrice: number; // 收款金额(ERP 已审核收款单)
|
paymentPrice: number; // 付款金额(ERP 已审核付款单)
|
netProfit: number; // 净利润 = 收款 - 付款
|
saleOrderPrice: number; // 销售订单金额(已审核)
|
purchaseOrderPrice: number; // 采购订单金额(已审核)
|
|
fixedAssetOriginalValue: number; // 固定资产原值合计
|
fixedAssetAccumulatedDepreciation: number; // 固定资产累计折旧合计
|
fixedAssetNetValue: number; // 固定资产净值合计
|
intangibleAssetOriginalValue: number; // 无形资产原值合计
|
intangibleAssetAccumulatedAmortization: number; // 无形资产累计摊销合计
|
intangibleAssetNetValue: number; // 无形资产净值合计
|
totalAssetNetValue: number; // 资产净值合计
|
|
subjectCount: number; // 会计科目数量
|
voucherCount: number; // 凭证总数
|
voucherUnpostedCount: number; // 未过账凭证数量
|
voucherPostedCount: number; // 已过账凭证数量
|
voucherCancelledCount: number; // 已作废凭证数量
|
}
|
|
/** 月度趋势 */
|
export interface StatisticsTrend {
|
month: string; // 月份 yyyy-MM
|
receiptPrice: number; // 收款金额
|
paymentPrice: number; // 付款金额
|
netProfit: number; // 净利润
|
saleOrderPrice: number; // 销售订单金额
|
purchaseOrderPrice: number; // 采购订单金额
|
}
|
}
|
|
/** 获取会计核算看板总览 */
|
export function getStatisticsOverview(params?: FinStatisticsApi.StatisticsParams) {
|
return requestClient.get<FinStatisticsApi.StatisticsOverview>(
|
'/finance/statistics/overview',
|
{ params },
|
);
|
}
|
|
/** 获取月度收支趋势(期间内无数据的月份补 0) */
|
export function getStatisticsTrend(params?: FinStatisticsApi.StatisticsParams) {
|
return requestClient.get<FinStatisticsApi.StatisticsTrend[]>(
|
'/finance/statistics/trend',
|
{ params },
|
);
|
}
|