import type { PageParam, PageResult } from '@vben/request';
|
|
import { requestClient } from '#/api/request';
|
|
export namespace ErpPurchaseStatisticsApi {
|
/** 采购汇总统计 */
|
export interface Summary {
|
totalOrderCount?: number; // 总订单数
|
totalOrderAmount?: number; // 总订单金额
|
totalInCount?: number; // 总入库数
|
totalInAmount?: number; // 总入库金额
|
totalReturnCount?: number; // 总退货数
|
totalReturnAmount?: number; // 总退货金额
|
}
|
|
/** 供应商供货统计 */
|
export interface SupplierStatistics {
|
supplierId?: number; // 供应商编号
|
supplierName?: string; // 供应商名称
|
orderCount?: number; // 订单数
|
orderAmount?: number; // 订单金额
|
inCount?: number; // 入库数
|
inAmount?: number; // 入库金额
|
returnCount?: number; // 退货数
|
returnAmount?: number; // 退货金额
|
}
|
|
/** 采购价格分析 */
|
export interface PriceAnalysis {
|
productId?: number; // 产品编号
|
productName?: string; // 产品名称
|
productBarCode?: string; // 产品条码
|
avgPrice?: number; // 平均价格
|
minPrice?: number; // 最低价格
|
maxPrice?: number; // 最高价格
|
latestPrice?: number; // 最近价格
|
priceChangeRate?: number; // 价格变化率
|
}
|
|
/** 未完成订单跟踪 */
|
export interface UncompletedOrder {
|
orderId?: number; // 订单编号
|
orderNo?: string; // 订单号
|
supplierName?: string; // 供应商名称
|
orderTime?: string; // 订单时间
|
productNames?: string; // 产品名称
|
orderAmount?: number; // 订单金额
|
inAmount?: number; // 入库金额
|
uncompletedAmount?: number; // 未完成金额
|
daysOverdue?: number; // 超期天数
|
}
|
}
|
|
/** 采购汇总统计 */
|
export function getPurchaseSummary(params?: any) {
|
return requestClient.get<ErpPurchaseStatisticsApi.Summary>(
|
'/erp/purchase-statistics/summary',
|
{ params },
|
);
|
}
|
|
/** 供应商供货统计 */
|
export function getSupplierStatistics(params: PageParam) {
|
return requestClient.get<PageResult<ErpPurchaseStatisticsApi.SupplierStatistics>>(
|
'/erp/purchase-statistics/supplier',
|
{ params },
|
);
|
}
|
|
/** 采购价格分析 */
|
export function getPriceAnalysis(params: PageParam) {
|
return requestClient.get<PageResult<ErpPurchaseStatisticsApi.PriceAnalysis>>(
|
'/erp/purchase-statistics/price',
|
{ params },
|
);
|
}
|
|
/** 未完成订单跟踪 */
|
export function getUncompletedOrders(params: PageParam) {
|
return requestClient.get<PageResult<ErpPurchaseStatisticsApi.UncompletedOrder>>(
|
'/erp/purchase-statistics/uncompleted',
|
{ params },
|
);
|
}
|