feat: 公司概览新增各品类多维度经营明细对比表

- CompanyOverviewVO: 新增CategoryComparison品类对比数据VO
- CompanyOverviewServiceImpl: 新增calculateCategoryComparisons()按品类汇总订单数据
  - 按商品categoryId分组,未分配品类的归入其他品类
  - 推广费/刷单费按品类各店铺销售额占比分摊
- types.vo.ts: 新增CategoryComparison接口
- company-overview/index.vue: 新增品类经营明细对比表格
This commit is contained in:
小蟑螂
2026-04-20 20:08:55 +08:00
parent dd26732237
commit b270b7818a
4 changed files with 472 additions and 2 deletions
@@ -25,6 +25,8 @@ export namespace CompanyOverviewVO {
shopEfficiencyQuadrants?: ShopEfficiencyQuadrant[];
/** 多店铺数据横向对比(16维度) */
shopComparisons?: ShopComparison[];
/** 多品类数据横向对比 */
categoryComparisons?: CategoryComparison[];
/** 汇总ROI */
totalROI?: number;
/** 总税后盈亏 */
@@ -110,4 +112,40 @@ export namespace CompanyOverviewVO {
/** ROI */
roi?: number;
}
/** 品类对比数据 */
export interface CategoryComparison {
/** 品类ID(未分配为null) */
categoryId?: number;
/** 品类名称(未分配为"未分配品类") */
categoryName: string;
/** 销售额 */
salesAmount: number;
/** 单量 */
orderCount?: number;
/** 客单价 */
averageOrderValue?: number;
/** 商品成本 */
productCost?: number;
/** 运费 */
shippingCost?: number;
/** 其他成本 */
otherCost?: number;
/** 退款金额 */
refundAmount?: number;
/** 推广费 */
totalPromotionFee?: number;
/** 刷单费用 */
brushFee?: number;
/** 费比 */
feeRatio?: number;
/** 税前盈亏 */
totalProfitBeforeTax?: number;
/** 销售额4%税额 */
salesTaxAmount?: number;
/** 税后盈亏 */
profitAfterTax?: number;
/** ROI */
roi?: number;
}
}