refactor(概览): 汇总字段 totalCost 重命名为 orderCost,列名统一为订单成本

This commit is contained in:
小蟑螂
2026-06-01 00:29:35 +08:00
parent c3447eab86
commit e1d90ccba3
28 changed files with 1636 additions and 235 deletions
@@ -51,8 +51,8 @@ export namespace ProductOverviewVO {
shippingCost: number;
/** 其他成本 */
otherCost: number;
/** 总成本(商品成本+运费+其他成本) */
totalCost?: number;
/** 订单成本(商品成本+运费+其他成本,不含推广费、刷单费) */
orderCost?: number;
/** 退款金额 */
refundAmount: number;
/** 推广费 */
@@ -85,8 +85,8 @@ export namespace ProductOverviewVO {
shippingCost: number;
/** 其他成本 */
otherCost: number;
/** 总成本(商品成本+运费+其他成本) */
totalCost?: number;
/** 订单成本(商品成本+运费+其他成本,不含推广费、刷单费) */
orderCost?: number;
/** 退款金额 */
refundAmount: number;
/** 推广费 */
@@ -132,8 +132,8 @@ export namespace ShopVO {
shippingCost?: number;
/** 其他成本 */
otherCost?: number;
/** 总成本(商品成本+运费+其他成本) */
totalCost?: number;
/** 订单成本(商品成本+运费+其他成本,不含推广费、刷单费) */
orderCost?: number;
/** 退款金额 */
refundAmount?: number;
/** 推广费 */
@@ -170,8 +170,8 @@ export namespace ShopVO {
shippingCost?: number;
/** 其他成本 */
otherCost?: number;
/** 总成本(商品成本+运费+其他成本) */
totalCost?: number;
/** 订单成本(商品成本+运费+其他成本,不含推广费、刷单费) */
orderCost?: number;
/** 退款金额 */
refundAmount?: number;
/** 推广费 */
@@ -107,6 +107,8 @@ export namespace CompanyOverviewVO {
salesAmountAchievementRate?: number;
/** 销售额 */
salesAmount: number;
/** GMV(全订单状态商家实收合计) */
gmv?: number;
/** 单量 */
orderCount?: number;
/** 客单价 */
@@ -117,8 +119,8 @@ export namespace CompanyOverviewVO {
shippingCost?: number;
/** 其他成本 */
otherCost?: number;
/** 总成本(商品成本+运费+其他成本) */
totalCost?: number;
/** 订单成本(商品成本+运费+其他成本,不含推广费、刷单费) */
orderCost?: number;
/** 退款金额 */
refundAmount?: number;
/** 推广费 */
@@ -127,11 +129,13 @@ export namespace CompanyOverviewVO {
brushFee?: number;
/** 费比 */
feeRatio?: number;
/** 税前盈亏 */
/** 毛利 */
grossProfit?: number;
/** 税前净利 */
totalProfitBeforeTax?: number;
/** 销售额4%税额 */
salesTaxAmount?: number;
/** 税后盈亏 */
/** 税后净利 */
profitAfterTax?: number;
/** ROI */
roi?: number;
@@ -145,6 +149,8 @@ export namespace CompanyOverviewVO {
categoryName: string;
/** 销售额 */
salesAmount: number;
/** GMV(全订单状态商家实收合计) */
gmv?: number;
/** 单量 */
orderCount?: number;
/** 客单价 */
@@ -155,8 +161,8 @@ export namespace CompanyOverviewVO {
shippingCost?: number;
/** 其他成本 */
otherCost?: number;
/** 总成本(商品成本+运费+其他成本) */
totalCost?: number;
/** 订单成本(商品成本+运费+其他成本,不含推广费、刷单费) */
orderCost?: number;
/** 退款金额 */
refundAmount?: number;
/** 推广费 */
@@ -165,11 +171,13 @@ export namespace CompanyOverviewVO {
brushFee?: number;
/** 费比 */
feeRatio?: number;
/** 税前盈亏 */
/** 毛利 */
grossProfit?: number;
/** 税前净利 */
totalProfitBeforeTax?: number;
/** 销售额4%税额 */
salesTaxAmount?: number;
/** 税后盈亏 */
/** 税后净利 */
profitAfterTax?: number;
/** ROI */
roi?: number;
@@ -191,6 +199,8 @@ export namespace CompanyOverviewVO {
salesAmountAchievementRate?: number;
/** 销售额 */
salesAmount: number;
/** GMV(全订单状态商家实收合计) */
gmv?: number;
/** 单量 */
orderCount?: number;
/** 客单价 */
@@ -201,8 +211,8 @@ export namespace CompanyOverviewVO {
shippingCost?: number;
/** 其他成本 */
otherCost?: number;
/** 总成本(商品成本+运费+其他成本) */
totalCost?: number;
/** 订单成本(商品成本+运费+其他成本,不含推广费、刷单费) */
orderCost?: number;
/** 退款金额 */
refundAmount?: number;
/** 推广费 */
@@ -211,13 +221,15 @@ export namespace CompanyOverviewVO {
brushFee?: number;
/** 费比 */
feeRatio?: number;
/** 税前盈亏 */
/** 毛利 */
grossProfit?: number;
/** 税前净利 */
totalProfitBeforeTax?: number;
/** 销售额4%税额 */
salesTaxAmount?: number;
/** ROI */
roi?: number;
/** 税后盈亏 */
/** 税后净利 */
profitAfterTax?: number;
}
@@ -11,6 +11,10 @@ export const overviewTableHints = {
salesAmountAchievementRate: '实际销售额 ÷ 目标额 × 100%。',
salesAmount:
'统计口径下,计入销售额的订单实收金额合计(与后端订单状态统计一致)。',
gmv:
'GMV = 所选时间范围内全部订单状态的商家实收金额合计(不按订单状态过滤)。',
grossProfit:
'毛利 = 实际销售额 − 订单成本 − 退款金额(未扣推广费、刷单费与税额)。',
/** 与 salesAmount 同口径,表头文案为「销售额」时使用 */
salesAmountShort:
'统计口径下,计入销售额的订单实收金额合计(与后端订单状态统计一致)。',
@@ -21,7 +25,8 @@ export const overviewTableHints = {
productCost: '订单维度「商品成本」字段汇总。',
shippingCost: '订单维度「运费成本」字段汇总。',
otherCost: '订单维度「其他成本」字段汇总。',
totalCost: '总成本 = 商品成本 + 运费 + 其他成本。',
orderCost:
'订单成本 = 商品成本 + 运费 + 其他成本(订单维度汇总,不含推广费、刷单费)。',
refundAmount: '统计口径下,计入退款的实收金额合计。',
totalPromotionFee: '该维度下推广费金额合计(来自推广费单据)。',
promotionFeeSpec:
@@ -38,12 +43,12 @@ export const overviewTableHints = {
feeRatioSpec:
'费比(%)= 推广费 ÷ 销售额;接口字段已为百分数数值(0–100),与店铺商品表费比展示方式不同。',
totalProfitBeforeTax:
'税前盈亏 = 实际销售额 − 总成本 − 退款金额 − 推广费 − 刷单费用。',
'税前净利 = 毛利 − 推广费 − 刷单费用。',
profitBeforeTaxSpec:
'税前盈亏 = 销售额 − 总成本 − 退款金额 − 推广费(规格维度不含刷单费)。',
'税前净利 = 销售额 − 订单成本 − 退款金额 − 推广费(规格维度不含刷单费)。',
roi: 'ROI =(实际销售额 − 退款金额)÷ 推广费;推广费为 0 时后端记为 0。',
profitAfterTax: '税后盈亏 = 税前盈亏 − 税额。',
profitAfterTaxNet: '税后净利 = 税前盈亏 − 税额(与「税后盈亏」同口径,表头名称不同)。',
profitAfterTax: '税后净利 = 税前净利 − 税额。',
profitAfterTaxNet: '税后净利 = 税前净利 − 税额(与「税后盈亏」同口径,表头名称不同)。',
} as const;
/** @deprecated 使用 overviewTableHints */
@@ -181,7 +181,7 @@ const cellRoi = (v: number | null | undefined) =>
<OverviewColumnHint :title="storeOverviewHints.otherCost">其他成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-orange-800 dark:text-orange-300">
<OverviewColumnHint :title="storeOverviewHints.totalCost">总成本</OverviewColumnHint>
<OverviewColumnHint :title="storeOverviewHints.orderCost">订单成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-rose-600 dark:text-rose-400">
<OverviewColumnHint :title="storeOverviewHints.refundAmount">退款金额</OverviewColumnHint>
@@ -256,7 +256,7 @@ const cellRoi = (v: number | null | undefined) =>
<td class="p-6">{{ cellMoney(cat.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(cat.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">
{{ cellMoney(cat.totalCost) }}
{{ cellMoney(cat.orderCost) }}
</td>
<td class="p-6 font-bold text-rose-600 dark:text-rose-400">
{{ cellMoney(cat.refundAmount) }}
@@ -301,7 +301,7 @@ const cellRoi = (v: number | null | undefined) =>
<td class="p-6">{{ cellMoney(categorySummary?.total?.productCost) }}</td>
<td class="p-6">{{ cellMoney(categorySummary?.total?.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(categorySummary?.total?.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(categorySummary?.total?.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(categorySummary?.total?.orderCost) }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ cellMoney(categorySummary?.total?.refundAmount) }}</td>
<td class="p-6">{{ cellMoney(categorySummary?.total?.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoney(categorySummary?.total?.brushFee) }}</td>
@@ -75,7 +75,7 @@ const platformData = computed(() => {
productCost: p.productCost ?? 0,
shippingCost: p.shippingCost ?? 0,
otherCost: p.otherCost ?? 0,
totalCost: p.totalCost ?? 0,
orderCost: p.orderCost ?? 0,
refundAmount: p.refundAmount ?? 0,
totalPromotionFee: p.totalPromotionFee ?? 0,
brushFee: p.brushFee ?? 0,
@@ -265,7 +265,7 @@ const sortedData = computed(() => {
<OverviewColumnHint :title="storeOverviewHints.otherCost">其他成本</OverviewColumnHint>
</th>
<th class="border-b border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] px-6 py-4 font-bold text-orange-800 dark:text-orange-300">
<OverviewColumnHint :title="storeOverviewHints.totalCost">总成本</OverviewColumnHint>
<OverviewColumnHint :title="storeOverviewHints.orderCost">订单成本</OverviewColumnHint>
</th>
<th class="border-b border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] px-6 py-4 font-bold text-rose-600 dark:text-rose-400">
<OverviewColumnHint :title="storeOverviewHints.refundAmount">退款金额</OverviewColumnHint>
@@ -346,7 +346,7 @@ const sortedData = computed(() => {
<td class="p-6">{{ formatAmount(p.productCost) }}</td>
<td class="p-6">{{ formatAmount(p.shippingCost) }}</td>
<td class="p-6">{{ formatAmount(p.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ formatAmount(p.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ formatAmount(p.orderCost) }}</td>
<td class="p-6 font-bold text-rose-600 dark:text-rose-400">{{ formatAmount(p.refundAmount) }}</td>
<td class="p-6">{{ formatAmount(p.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ formatAmount(p.brushFee) }}</td>
@@ -388,7 +388,7 @@ const sortedData = computed(() => {
<td class="p-6">{{ cellMoney(totalData.productCost) }}</td>
<td class="p-6">{{ cellMoney(totalData.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(totalData.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(totalData.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(totalData.orderCost) }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ cellMoney(totalData.refundAmount) }}</td>
<td class="p-6">{{ cellMoney(totalData.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoney(totalData.brushFee) }}</td>
@@ -220,7 +220,7 @@ const cellRoi = (v: number | null | undefined) =>
<OverviewColumnHint :title="storeOverviewHints.otherCost">其他成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-orange-800 dark:text-orange-300">
<OverviewColumnHint :title="storeOverviewHints.totalCost">总成本</OverviewColumnHint>
<OverviewColumnHint :title="storeOverviewHints.orderCost">订单成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-rose-600 dark:text-rose-400">
<OverviewColumnHint :title="storeOverviewHints.refundAmount">退款金额</OverviewColumnHint>
@@ -334,7 +334,7 @@ const cellRoi = (v: number | null | undefined) =>
{{ cellMoney(shop.otherCost) }}
</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">
{{ cellMoney(shop.totalCost) }}
{{ cellMoney(shop.orderCost) }}
</td>
<td class="p-6 font-bold text-rose-600 dark:text-rose-400">
{{ cellMoney(shop.refundAmount) }}
@@ -403,7 +403,7 @@ const cellRoi = (v: number | null | undefined) =>
<td class="p-6">{{ cellMoney(shopSummary?.total?.productCost) }}</td>
<td class="p-6">{{ cellMoney(shopSummary?.total?.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(shopSummary?.total?.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(shopSummary?.total?.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(shopSummary?.total?.orderCost) }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ cellMoney(shopSummary?.total?.refundAmount) }}</td>
<td class="p-6">{{ cellMoney(shopSummary?.total?.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoney(shopSummary?.total?.brushFee) }}</td>
@@ -109,6 +109,14 @@ function buildCompareMetrics(
valueA: z(a, (r) => r.salesAmount),
valueB: z(b, (r) => r.salesAmount),
},
{
key: 'gmv',
label: 'GMV',
hint: overviewTableHints.gmv,
format: 'money',
valueA: z(a, (r) => r.gmv),
valueB: z(b, (r) => r.gmv),
},
{
key: 'orderCount',
label: '单量',
@@ -150,12 +158,12 @@ function buildCompareMetrics(
valueB: z(b, (r) => r.otherCost),
},
{
key: 'totalCost',
label: '总成本',
hint: overviewTableHints.totalCost,
key: 'orderCost',
label: '订单成本',
hint: overviewTableHints.orderCost,
format: 'money',
valueA: z(a, (r) => r.totalCost),
valueB: z(b, (r) => r.totalCost),
valueA: z(a, (r) => r.orderCost),
valueB: z(b, (r) => r.orderCost),
},
{
key: 'refundAmount',
@@ -189,9 +197,17 @@ function buildCompareMetrics(
valueA: feeRatioAsPercent(a),
valueB: feeRatioAsPercent(b),
},
{
key: 'grossProfit',
label: '毛利',
hint: overviewTableHints.grossProfit,
format: 'money',
valueA: z(a, (r) => r.grossProfit),
valueB: z(b, (r) => r.grossProfit),
},
{
key: 'totalProfitBeforeTax',
label: '税前盈亏',
label: '税前净利',
hint: overviewTableHints.totalProfitBeforeTax,
format: 'money',
valueA: z(a, (r) => r.totalProfitBeforeTax),
@@ -215,7 +231,7 @@ function buildCompareMetrics(
},
{
key: 'profitAfterTax',
label: '税后盈亏',
label: '税后净利',
hint: overviewTableHints.profitAfterTax,
format: 'money',
valueA: z(a, (r) => r.profitAfterTax),
@@ -148,7 +148,7 @@ const cellRoi = (v: number | null | undefined) =>
{{ props.firstColumnLabel }}
</th>
<th
colspan="3"
colspan="4"
class="border-b border-l border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] dark:border-l-[hsl(240deg_3.7%_22%)] dark:border-[hsl(240deg_3.7%_22%)] bg-slate-100/50 dark:bg-[hsl(240deg_3.7%_22%/50%)] p-3 text-center"
>
经营规模维度
@@ -160,7 +160,7 @@ const cellRoi = (v: number | null | undefined) =>
成本费用维度
</th>
<th
colspan="5"
colspan="6"
class="border-b border-l border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] dark:border-l-[hsl(240deg_3.7%_22%)] dark:border-[hsl(240deg_3.7%_22%)] bg-emerald-50/50 dark:bg-[hsl(142deg_71.8%_29%)] p-3 text-center text-emerald-700 dark:text-emerald-200"
>
盈利分析维度
@@ -172,6 +172,9 @@ const cellRoi = (v: number | null | undefined) =>
实际销售额
</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-black text-amber-700 dark:text-amber-400">
<OverviewColumnHint :title="storeOverviewHints.gmv">GMV</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4">
<OverviewColumnHint :title="storeOverviewHints.orderCount">单量</OverviewColumnHint>
</th>
@@ -188,7 +191,7 @@ const cellRoi = (v: number | null | undefined) =>
<OverviewColumnHint :title="storeOverviewHints.otherCost">其他成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-orange-800 dark:text-orange-300">
<OverviewColumnHint :title="storeOverviewHints.totalCost">总成本</OverviewColumnHint>
<OverviewColumnHint :title="storeOverviewHints.orderCost">订单成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-rose-600 dark:text-rose-400">
<OverviewColumnHint :title="storeOverviewHints.refundAmount">退款金额</OverviewColumnHint>
@@ -202,9 +205,12 @@ const cellRoi = (v: number | null | undefined) =>
<th class="border-b px-6 py-4 text-slate-400 dark:text-[hsl(240deg_5%_64.9%)]">
<OverviewColumnHint :title="storeOverviewHints.feeRatioCategoryRow">费比%</OverviewColumnHint>
</th>
<th class="border-b border-l px-6 py-4 font-bold">
<th class="border-b border-l px-6 py-4 font-bold text-emerald-700 dark:text-emerald-400">
<OverviewColumnHint :title="storeOverviewHints.grossProfit">毛利</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold">
<OverviewColumnHint :title="storeOverviewHints.totalProfitBeforeTax">
税前盈亏
税前净利
</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 italic text-rose-500 dark:text-rose-400">
@@ -217,7 +223,7 @@ const cellRoi = (v: number | null | undefined) =>
</th>
<th class="border-b bg-emerald-600 dark:bg-emerald-600 px-6 py-4 font-black text-white">
<OverviewColumnHint light :title="storeOverviewHints.profitAfterTax">
税后盈亏
税后净利
</OverviewColumnHint>
</th>
</tr>
@@ -266,6 +272,7 @@ const cellRoi = (v: number | null | undefined) =>
</span>
</td>
<td class="p-6 font-black">{{ formatAmount(cat.salesAmount) }}</td>
<td class="p-6 font-black text-amber-700 dark:text-amber-400">{{ formatAmount(cat.gmv) }}</td>
<td class="p-6 font-medium">{{ formatIntCell(cat.orderCount) }}</td>
<td class="p-6 font-medium">
{{ cellMoney(cat.averageOrderValue) }}
@@ -274,7 +281,7 @@ const cellRoi = (v: number | null | undefined) =>
<td class="p-6">{{ cellMoney(cat.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(cat.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">
{{ cellMoney(cat.totalCost) }}
{{ cellMoney(cat.orderCost) }}
</td>
<td class="p-6 font-bold text-rose-600 dark:text-rose-400">
{{ cellMoney(cat.refundAmount) }}
@@ -286,6 +293,9 @@ const cellRoi = (v: number | null | undefined) =>
<td class="p-6 text-slate-400 dark:text-[hsl(240deg_5%_64.9%)]">
{{ cat.feeRatio !== undefined ? formatFeeRatioPercent(cat.feeRatio) : '-' }}
</td>
<td class="p-6 font-bold text-emerald-700 dark:text-emerald-400">
{{ cellMoney(cat.grossProfit) }}
</td>
<td class="p-6 font-bold">
{{ cellMoney(cat.totalProfitBeforeTax) }}
</td>
@@ -300,7 +310,7 @@ const cellRoi = (v: number | null | undefined) =>
</td>
</tr>
<tr v-if="!categorySummary?.categories?.length">
<td :colspan="categoryExportMode ? 18 : 17" class="p-8 text-center text-gray-400">
<td :colspan="categoryExportMode ? 20 : 19" class="p-8 text-center text-gray-400">
暂无数据
</td>
</tr>
@@ -311,6 +321,7 @@ const cellRoi = (v: number | null | undefined) =>
<td class="sticky-col bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)] p-6 text-base">合计</td>
<!-- 规模 -->
<td class="p-6">{{ cellMoney(categorySummary?.total?.salesAmount) }}</td>
<td class="p-6 text-amber-700 dark:text-amber-400">{{ cellMoney(categorySummary?.total?.gmv) }}</td>
<td class="p-6">{{ formatIntCell(categorySummary?.total?.orderCount) }}</td>
<td class="p-6">
{{ cellMoney(categorySummary?.total?.averageOrderValue) }}
@@ -319,12 +330,13 @@ const cellRoi = (v: number | null | undefined) =>
<td class="p-6">{{ cellMoney(categorySummary?.total?.productCost) }}</td>
<td class="p-6">{{ cellMoney(categorySummary?.total?.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(categorySummary?.total?.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(categorySummary?.total?.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(categorySummary?.total?.orderCost) }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ cellMoney(categorySummary?.total?.refundAmount) }}</td>
<td class="p-6">{{ cellMoney(categorySummary?.total?.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoney(categorySummary?.total?.brushFee) }}</td>
<td class="p-6 text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ categorySummary?.total?.feeRatio !== undefined ? formatFeeRatioPercent(categorySummary?.total?.feeRatio) : '-' }}</td>
<!-- 盈利 -->
<td class="p-6 text-emerald-700 dark:text-emerald-400">{{ cellMoney(categorySummary?.total?.grossProfit) }}</td>
<td class="p-6">{{ cellMoney(categorySummary?.total?.totalProfitBeforeTax) }}</td>
<td class="p-6 italic text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ cellMoney(categorySummary?.total?.salesTaxAmount) }}</td>
<td class="p-6 text-indigo-700 dark:text-indigo-400">{{ cellRoi(categorySummary?.total?.roi) }}</td>
@@ -70,16 +70,18 @@ const platformData = computed(() => {
targetAmount: p.targetAmount ?? 0,
salesAmountAchievementRate: p.salesAmountAchievementRate ?? 0,
salesAmount: p.salesAmount ?? 0,
gmv: p.gmv ?? 0,
orderCount: p.orderCount ?? 0,
averageOrderValue: p.averageOrderValue ?? 0,
productCost: p.productCost ?? 0,
shippingCost: p.shippingCost ?? 0,
otherCost: p.otherCost ?? 0,
totalCost: p.totalCost ?? 0,
orderCost: p.orderCost ?? 0,
refundAmount: p.refundAmount ?? 0,
totalPromotionFee: p.totalPromotionFee ?? 0,
brushFee: p.brushFee ?? 0,
feeRatio: p.feeRatio ?? 0,
grossProfit: p.grossProfit ?? 0,
totalProfitBeforeTax: p.totalProfitBeforeTax ?? 0,
salesTaxAmount: p.salesTaxAmount ?? 0,
roi: p.roi ?? 0,
@@ -202,7 +204,7 @@ const sortedData = computed(() => {
</th>
<!-- 规模 -->
<th
colspan="3"
colspan="4"
class="border-b border-l border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] dark:border-l-[hsl(240deg_3.7%_22%)] p-3 text-center bg-slate-100/50 dark:bg-[hsl(240deg_3.7%_22%/50%)]"
>
经营规模维度
@@ -216,7 +218,7 @@ const sortedData = computed(() => {
</th>
<!-- 盈利 -->
<th
colspan="5"
colspan="6"
class="border-b border-l border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] dark:border-l-[hsl(240deg_3.7%_22%)] p-3 text-center bg-emerald-50/50 dark:bg-[hsl(142deg_71.8%_29%)] text-emerald-700 dark:text-emerald-200"
>
盈利分析维度
@@ -248,6 +250,9 @@ const sortedData = computed(() => {
实际销售额
</OverviewColumnHint>
</th>
<th class="border-b border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] px-6 py-4 font-black text-amber-700 dark:text-amber-400">
<OverviewColumnHint :title="storeOverviewHints.gmv">GMV</OverviewColumnHint>
</th>
<th class="border-b border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] px-6 py-4">
<OverviewColumnHint :title="storeOverviewHints.orderCount">单量</OverviewColumnHint>
</th>
@@ -265,7 +270,7 @@ const sortedData = computed(() => {
<OverviewColumnHint :title="storeOverviewHints.otherCost">其他成本</OverviewColumnHint>
</th>
<th class="border-b border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] px-6 py-4 font-bold text-orange-800 dark:text-orange-300">
<OverviewColumnHint :title="storeOverviewHints.totalCost">总成本</OverviewColumnHint>
<OverviewColumnHint :title="storeOverviewHints.orderCost">订单成本</OverviewColumnHint>
</th>
<th class="border-b border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] px-6 py-4 font-bold text-rose-600 dark:text-rose-400">
<OverviewColumnHint :title="storeOverviewHints.refundAmount">退款金额</OverviewColumnHint>
@@ -280,9 +285,12 @@ const sortedData = computed(() => {
<OverviewColumnHint :title="storeOverviewHints.feeRatioPlatform">费比%</OverviewColumnHint>
</th>
<!-- 盈利子列 -->
<th class="border-b border-l border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] px-6 py-4 font-bold text-emerald-700 dark:text-emerald-400">
<OverviewColumnHint :title="storeOverviewHints.grossProfit">毛利</OverviewColumnHint>
</th>
<th class="border-b border-l border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] px-6 py-4 font-bold">
<OverviewColumnHint :title="storeOverviewHints.totalProfitBeforeTax">
税前盈亏
税前净利
</OverviewColumnHint>
</th>
<th class="border-b border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] px-6 py-4 italic text-slate-400 dark:text-[hsl(240deg_5%_64.9%)]">
@@ -295,7 +303,7 @@ const sortedData = computed(() => {
</th>
<th class="border-b bg-emerald-600 dark:bg-emerald-600 px-6 py-4 font-black text-white">
<OverviewColumnHint light :title="storeOverviewHints.profitAfterTax">
税后盈亏
税后净利
</OverviewColumnHint>
</th>
</tr>
@@ -340,18 +348,22 @@ const sortedData = computed(() => {
<td class="p-6 font-black text-blue-600 dark:text-blue-400">{{ formatPercentPlain(p.salesAmountAchievementRate) }}</td>
<!-- 规模 -->
<td class="p-6 font-black">{{ formatAmount(p.salesAmount) }}</td>
<td class="p-6 font-black text-amber-700 dark:text-amber-400">{{ formatAmount(p.gmv) }}</td>
<td class="p-6 font-medium">{{ p.orderCount.toLocaleString('zh-CN') }}</td>
<td class="p-6 font-medium">{{ formatAmount(p.averageOrderValue) }}</td>
<!-- 成本 -->
<td class="p-6">{{ formatAmount(p.productCost) }}</td>
<td class="p-6">{{ formatAmount(p.shippingCost) }}</td>
<td class="p-6">{{ formatAmount(p.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ formatAmount(p.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ formatAmount(p.orderCost) }}</td>
<td class="p-6 font-bold text-rose-600 dark:text-rose-400">{{ formatAmount(p.refundAmount) }}</td>
<td class="p-6">{{ formatAmount(p.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ formatAmount(p.brushFee) }}</td>
<td class="p-6 text-slate-400 dark:text-[hsl(240deg_5%_64.9%)]">{{ formatFeeRatioPercent(p.feeRatio) }}</td>
<!-- 盈利 -->
<td class="p-6 font-bold text-emerald-700 dark:text-emerald-400">
{{ formatAmount(p.grossProfit) }}
</td>
<td class="p-6 font-bold" :class="p.totalProfitBeforeTax >= 0 ? 'text-slate-800 dark:text-[hsl(0deg_0%_95%)]' : 'text-rose-600 dark:text-rose-400'">
{{ formatAmount(p.totalProfitBeforeTax) }}
</td>
@@ -380,6 +392,7 @@ const sortedData = computed(() => {
</td>
<!-- 规模 -->
<td class="p-6">{{ cellMoney(totalData.salesAmount) }}</td>
<td class="p-6 text-amber-700 dark:text-amber-400">{{ cellMoney(totalData.gmv) }}</td>
<td class="p-6">{{ formatIntCell(totalData.orderCount) }}</td>
<td class="p-6">
{{ cellMoney(totalData.averageOrderValue) }}
@@ -388,7 +401,7 @@ const sortedData = computed(() => {
<td class="p-6">{{ cellMoney(totalData.productCost) }}</td>
<td class="p-6">{{ cellMoney(totalData.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(totalData.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(totalData.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(totalData.orderCost) }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ cellMoney(totalData.refundAmount) }}</td>
<td class="p-6">{{ cellMoney(totalData.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoney(totalData.brushFee) }}</td>
@@ -396,6 +409,9 @@ const sortedData = computed(() => {
{{ totalData.feeRatio !== undefined ? formatFeeRatioPercent(totalData.feeRatio) : '-' }}
</td>
<!-- 盈利 -->
<td class="p-6 text-emerald-700 dark:text-emerald-400">
{{ cellMoney(totalData.grossProfit) }}
</td>
<td class="p-6">
{{ cellMoney(totalData.totalProfitBeforeTax) }}
</td>
@@ -415,7 +431,7 @@ const sortedData = computed(() => {
</tfoot>
<tfoot v-else class="bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)]">
<tr class="text-center text-slate-400 dark:text-[hsl(240deg_5%_64.9%)]">
<td :colspan="platformExportMode ? 22 : 21" class="p-6">暂无数据</td>
<td :colspan="platformExportMode ? 24 : 23" class="p-6">暂无数据</td>
</tr>
</tfoot>
</table>
@@ -159,7 +159,7 @@ const cellRoi = (v: number | null | undefined) =>
目标达成维度
</th>
<th
colspan="3"
colspan="4"
class="border-b border-l border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] dark:border-l-[hsl(240deg_3.7%_22%)] dark:border-[hsl(240deg_3.7%_22%)] bg-slate-100/50 dark:bg-[hsl(240deg_3.7%_22%/50%)] p-3 text-center"
>
经营规模维度
@@ -171,7 +171,7 @@ const cellRoi = (v: number | null | undefined) =>
成本费用维度
</th>
<th
colspan="5"
colspan="6"
class="border-b border-l border-slate-200 dark:border-b-[hsl(240deg_3.7%_22%)] dark:border-l-[hsl(240deg_3.7%_22%)] dark:border-[hsl(240deg_3.7%_22%)] bg-emerald-50/50 dark:bg-[hsl(142deg_71.8%_29%)] p-3 text-center text-emerald-700 dark:text-emerald-200"
>
盈利分析维度
@@ -203,6 +203,9 @@ const cellRoi = (v: number | null | undefined) =>
实际销售额
</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-black text-amber-700 dark:text-amber-400">
<OverviewColumnHint :title="storeOverviewHints.gmv">GMV</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4">
<OverviewColumnHint :title="storeOverviewHints.orderCount">单量</OverviewColumnHint>
</th>
@@ -220,7 +223,7 @@ const cellRoi = (v: number | null | undefined) =>
<OverviewColumnHint :title="storeOverviewHints.otherCost">其他成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-orange-800 dark:text-orange-300">
<OverviewColumnHint :title="storeOverviewHints.totalCost">总成本</OverviewColumnHint>
<OverviewColumnHint :title="storeOverviewHints.orderCost">订单成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-rose-600 dark:text-rose-400">
<OverviewColumnHint :title="storeOverviewHints.refundAmount">退款金额</OverviewColumnHint>
@@ -235,9 +238,12 @@ const cellRoi = (v: number | null | undefined) =>
<OverviewColumnHint :title="storeOverviewHints.feeRatioShopRow">费比%</OverviewColumnHint>
</th>
<!-- 盈利 -->
<th class="border-b border-l border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] px-6 py-4 font-bold">
<th class="border-b border-l border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] px-6 py-4 font-bold text-emerald-700 dark:text-emerald-400">
<OverviewColumnHint :title="storeOverviewHints.grossProfit">毛利</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold">
<OverviewColumnHint :title="storeOverviewHints.totalProfitBeforeTax">
税前盈亏
税前净利
</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 italic text-rose-500 dark:text-rose-400">
@@ -250,7 +256,7 @@ const cellRoi = (v: number | null | undefined) =>
</th>
<th class="border-b bg-emerald-600 dark:bg-emerald-600 px-6 py-4 font-black text-white">
<OverviewColumnHint light :title="storeOverviewHints.profitAfterTax">
税后盈亏
税后净利
</OverviewColumnHint>
</th>
</tr>
@@ -317,6 +323,9 @@ const cellRoi = (v: number | null | undefined) =>
<td class="p-6 font-black">
{{ formatAmount(shop.salesAmount) }}
</td>
<td class="p-6 font-black text-amber-700 dark:text-amber-400">
{{ formatAmount(shop.gmv) }}
</td>
<td class="p-6 font-medium">
{{ formatIntCell(shop.orderCount) }}
</td>
@@ -334,7 +343,7 @@ const cellRoi = (v: number | null | undefined) =>
{{ cellMoney(shop.otherCost) }}
</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">
{{ cellMoney(shop.totalCost) }}
{{ cellMoney(shop.orderCost) }}
</td>
<td class="p-6 font-bold text-rose-600 dark:text-rose-400">
{{ cellMoney(shop.refundAmount) }}
@@ -353,6 +362,9 @@ const cellRoi = (v: number | null | undefined) =>
}}
</td>
<!-- 盈利 -->
<td class="p-6 font-bold text-emerald-700 dark:text-emerald-400">
{{ cellMoney(shop.grossProfit) }}
</td>
<td class="p-6 font-bold">
{{ cellMoney(shop.totalProfitBeforeTax) }}
</td>
@@ -367,7 +379,7 @@ const cellRoi = (v: number | null | undefined) =>
</td>
</tr>
<tr v-if="!shopSummary?.shops?.length">
<td :colspan="shopExportMode ? 22 : 21" class="p-8 text-center text-gray-400">
<td :colspan="shopExportMode ? 24 : 23" class="p-8 text-center text-gray-400">
暂无数据
</td>
</tr>
@@ -400,6 +412,7 @@ const cellRoi = (v: number | null | undefined) =>
</td>
<!-- 规模 -->
<td class="p-6">{{ cellMoney(shopSummary?.total?.salesAmount) }}</td>
<td class="p-6 text-amber-700 dark:text-amber-400">{{ cellMoney(shopSummary?.total?.gmv) }}</td>
<td class="p-6">{{ formatIntCell(shopSummary?.total?.orderCount) }}</td>
<td class="p-6">
{{ cellMoney(shopSummary?.total?.averageOrderValue) }}
@@ -408,12 +421,13 @@ const cellRoi = (v: number | null | undefined) =>
<td class="p-6">{{ cellMoney(shopSummary?.total?.productCost) }}</td>
<td class="p-6">{{ cellMoney(shopSummary?.total?.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(shopSummary?.total?.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(shopSummary?.total?.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(shopSummary?.total?.orderCost) }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ cellMoney(shopSummary?.total?.refundAmount) }}</td>
<td class="p-6">{{ cellMoney(shopSummary?.total?.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoney(shopSummary?.total?.brushFee) }}</td>
<td class="p-6 text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ shopSummary?.total?.feeRatio !== undefined ? formatFeeRatioPercent(shopSummary?.total?.feeRatio) : '-' }}</td>
<!-- 盈利 -->
<td class="p-6 text-emerald-700 dark:text-emerald-400">{{ cellMoney(shopSummary?.total?.grossProfit) }}</td>
<td class="p-6">{{ cellMoney(shopSummary?.total?.totalProfitBeforeTax) }}</td>
<td class="p-6 italic text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ cellMoney(shopSummary?.total?.salesTaxAmount) }}</td>
<td class="p-6 text-indigo-700 dark:text-indigo-400">{{ cellRoi(shopSummary?.total?.roi) }}</td>
@@ -446,7 +460,7 @@ thead {
z-index: 20;
}
/* 最后一列(税后盈亏)固定在右侧 */
/* 最后一列(税后净利)固定在右侧 */
thead tr:last-child th:last-child,
tbody td:last-child:not([colspan]),
tfoot td:last-child:not([colspan]) {
@@ -12,17 +12,19 @@ function dimRowToShopSummary(row: WorkbenchVO.DimRow): CompanyOverviewVO.ShopSum
const refundAmount = yuanField(row.refundYuan);
const grossYuan = yuanField(row.grossProfitYuan);
const profitAfterTax = yuanField(row.netProfitYuan);
const totalCost = Math.max(0, salesAmount - refundAmount - grossYuan);
const orderCost = Math.max(0, salesAmount - refundAmount - grossYuan);
const shopId = Number(row.key);
return {
shopId: Number.isFinite(shopId) ? shopId : 0,
shopName: row.name,
salesAmount,
gmv: 0,
refundAmount,
totalCost,
productCost: totalCost,
orderCost,
productCost: orderCost,
shippingCost: 0,
otherCost: 0,
grossProfit: grossYuan,
totalProfitBeforeTax: grossYuan,
profitAfterTax,
};
@@ -46,16 +48,19 @@ function aggregateShopTotal(
targetAmount: sum('targetAmount'),
salesAmountAchievementRate: sum('salesAmountAchievementRate'),
salesAmount,
gmv: sum('gmv'),
orderCount: sum('orderCount'),
averageOrderValue,
productCost: sum('productCost'),
shippingCost: sum('shippingCost'),
otherCost: sum('otherCost'),
totalCost: sum('totalCost'),
orderCost: sum('orderCost'),
refundAmount: sum('refundAmount'),
totalPromotionFee,
brushFee: sum('brushFee'),
feeRatio,
gmv: 0,
grossProfit: sum('grossProfit'),
totalProfitBeforeTax: sum('totalProfitBeforeTax'),
salesTaxAmount: sum('salesTaxAmount'),
roi: totalPromotionFee ? salesAmount / totalPromotionFee : 0,
@@ -77,7 +82,7 @@ function dimRowToCategorySummary(
const refundAmount = yuanField(row.refundYuan);
const grossYuan = yuanField(row.grossProfitYuan);
const profitAfterTax = yuanField(row.netProfitYuan);
const totalCost = Math.max(0, salesAmount - refundAmount - grossYuan);
const orderCost = Math.max(0, salesAmount - refundAmount - grossYuan);
const rawId = Number(row.key);
const categoryId =
row.key === '0' || !Number.isFinite(rawId) ? undefined : rawId;
@@ -85,11 +90,13 @@ function dimRowToCategorySummary(
categoryId,
categoryName: row.name,
salesAmount,
gmv: 0,
refundAmount,
totalCost,
productCost: totalCost,
orderCost,
productCost: orderCost,
shippingCost: 0,
otherCost: 0,
grossProfit: grossYuan,
totalProfitBeforeTax: grossYuan,
profitAfterTax,
};
@@ -108,16 +115,19 @@ function aggregateCategoryTotal(
return {
categoryName: '合计',
salesAmount,
gmv: sum('gmv'),
orderCount: sum('orderCount'),
averageOrderValue,
productCost: sum('productCost'),
shippingCost: sum('shippingCost'),
otherCost: sum('otherCost'),
totalCost: sum('totalCost'),
orderCost: sum('orderCost'),
refundAmount: sum('refundAmount'),
totalPromotionFee,
brushFee: sum('brushFee'),
feeRatio,
gmv: 0,
grossProfit: sum('grossProfit'),
totalProfitBeforeTax: sum('totalProfitBeforeTax'),
salesTaxAmount: sum('salesTaxAmount'),
roi: totalPromotionFee ? salesAmount / totalPromotionFee : 0,
@@ -139,17 +149,19 @@ function dimRowToPlatformSummary(
const refundAmount = yuanField(row.refundYuan);
const grossYuan = yuanField(row.grossProfitYuan);
const profitAfterTax = yuanField(row.netProfitYuan);
const totalCost = Math.max(0, salesAmount - refundAmount - grossYuan);
const orderCost = Math.max(0, salesAmount - refundAmount - grossYuan);
const platformId = Number(row.key);
return {
platformId: Number.isFinite(platformId) ? platformId : 0,
platformName: row.name,
salesAmount,
gmv: 0,
refundAmount,
totalCost,
productCost: totalCost,
orderCost,
productCost: orderCost,
shippingCost: 0,
otherCost: 0,
grossProfit: grossYuan,
totalProfitBeforeTax: grossYuan,
profitAfterTax,
};
@@ -173,16 +185,19 @@ function aggregatePlatformTotal(
targetAmount: sum('targetAmount'),
salesAmountAchievementRate: sum('salesAmountAchievementRate'),
salesAmount,
gmv: sum('gmv'),
orderCount: sum('orderCount'),
averageOrderValue,
productCost: sum('productCost'),
shippingCost: sum('shippingCost'),
otherCost: sum('otherCost'),
totalCost: sum('totalCost'),
orderCost: sum('orderCost'),
refundAmount: sum('refundAmount'),
totalPromotionFee,
brushFee: sum('brushFee'),
feeRatio,
gmv: 0,
grossProfit: sum('grossProfit'),
totalProfitBeforeTax: sum('totalProfitBeforeTax'),
salesTaxAmount: sum('salesTaxAmount'),
roi: totalPromotionFee ? salesAmount / totalPromotionFee : 0,
@@ -21,7 +21,7 @@ interface SpecData {
productCost: number;
shippingCost: number;
otherCost: number;
totalCost?: number;
orderCost?: number;
refundAmount: number;
promotionFee: number;
feeRatio: number;
@@ -33,7 +33,7 @@ interface SpecData {
interface Props {
data: SpecData[];
/** 后端合计行(含 totalCost),优先展示 */
/** 后端合计行(含 orderCost),优先展示 */
footerTotal?: ProductOverviewVO.SpecSummaryTotal | null;
taxRate?: number;
}
@@ -78,7 +78,7 @@ const computedFooter = computed(() => {
productCost: 0,
shippingCost: 0,
otherCost: 0,
totalCost: 0,
orderCost: 0,
refundAmount: 0,
promotionFee: 0,
feeRatio: 0,
@@ -95,9 +95,9 @@ const computedFooter = computed(() => {
total.shippingCost += item.shippingCost || 0;
total.otherCost += item.otherCost || 0;
const lineTotalCost =
item.totalCost ??
item.orderCost ??
(item.productCost || 0) + (item.shippingCost || 0) + (item.otherCost || 0);
total.totalCost = (total.totalCost || 0) + lineTotalCost;
total.orderCost = (total.orderCost || 0) + lineTotalCost;
total.refundAmount += item.refundAmount || 0;
total.promotionFee += item.promotionFee || 0;
total.profitBeforeTax += item.profitBeforeTax || 0;
@@ -107,7 +107,7 @@ const computedFooter = computed(() => {
if (total.salesAmount > 0) {
total.averageOrderValue = total.salesAmount / total.orderCount;
total.feeRatio = (total.promotionFee / total.salesAmount) * 100;
const costBase = total.totalCost ?? total.productCost + total.shippingCost + total.otherCost;
const costBase = total.orderCost ?? total.productCost + total.shippingCost + total.otherCost;
total.roi =
costBase + total.promotionFee > 0
? (total.profitAfterTax / (costBase + total.promotionFee)) * 100
@@ -191,7 +191,7 @@ const footerRow = computed(() => props.footerTotal ?? computedFooter.value);
<OverviewColumnHint :title="overviewTableHints.otherCost">其他成本</OverviewColumnHint>
</th>
<th class="border-b px-5 py-3 font-bold text-orange-800 dark:text-orange-300">
<OverviewColumnHint :title="overviewTableHints.totalCost">总成本</OverviewColumnHint>
<OverviewColumnHint :title="overviewTableHints.orderCost">订单成本</OverviewColumnHint>
</th>
<th class="border-b px-5 py-3 font-bold text-rose-600 dark:text-rose-400">
<OverviewColumnHint :title="overviewTableHints.refundAmount">退款金额</OverviewColumnHint>
@@ -244,7 +244,7 @@ const footerRow = computed(() => props.footerTotal ?? computedFooter.value);
<td class="p-5">{{ cellMoney(item.shippingCost) }}</td>
<td class="p-5">{{ cellMoney(item.otherCost) }}</td>
<td class="p-5 font-bold text-orange-800 dark:text-orange-300">
{{ cellMoney(item.totalCost) }}
{{ cellMoney(item.orderCost) }}
</td>
<td class="p-5 font-bold text-rose-600 dark:text-rose-400">
{{ cellMoney(item.refundAmount) }}
@@ -279,7 +279,7 @@ const footerRow = computed(() => props.footerTotal ?? computedFooter.value);
<td class="p-5">{{ formatAmount(footerRow.shippingCost) }}</td>
<td class="p-5">{{ formatAmount(footerRow.otherCost) }}</td>
<td class="p-5 font-bold text-orange-800 dark:text-orange-300">
{{ footerRow.totalCost != null ? formatAmount(footerRow.totalCost) : formatAmount((footerRow.productCost || 0) + (footerRow.shippingCost || 0) + (footerRow.otherCost || 0)) }}
{{ footerRow.orderCost != null ? formatAmount(footerRow.orderCost) : formatAmount((footerRow.productCost || 0) + (footerRow.shippingCost || 0) + (footerRow.otherCost || 0)) }}
</td>
<td class="p-5 text-rose-600 dark:text-rose-400">{{ formatAmount(footerRow.refundAmount) }}</td>
<td class="p-5">{{ formatAmount(footerRow.promotionFee) }}</td>
@@ -149,7 +149,7 @@ const cellMoneyApi = (v: number | null | undefined) =>
<OverviewColumnHint :title="overviewTableHints.otherCost">其他成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-orange-800 dark:text-orange-300 dark:bg-[hsl(24deg_9.8%_15%/50%)]">
<OverviewColumnHint :title="overviewTableHints.totalCost">总成本</OverviewColumnHint>
<OverviewColumnHint :title="overviewTableHints.orderCost">订单成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-rose-600 dark:bg-[hsl(24deg_9.8%_15%/50%)] dark:text-rose-400">
<OverviewColumnHint :title="overviewTableHints.refundAmount">退款金额</OverviewColumnHint>
@@ -212,7 +212,7 @@ const cellMoneyApi = (v: number | null | undefined) =>
<td class="border-l dark:border-l-[hsl(240deg_3.7%_22%)] p-6 text-slate-600 dark:text-[hsl(240deg_5%_64.9%)]">{{ cellMoneyApi(cat.productCost) }}</td>
<td class="p-6 text-slate-600 dark:text-[hsl(240deg_5%_64.9%)]">{{ cellMoneyApi(cat.shippingCost) }}</td>
<td class="p-6 text-slate-600 dark:text-[hsl(240deg_5%_64.9%)]">{{ cellMoneyApi(cat.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoneyApi(cat.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoneyApi(cat.orderCost) }}</td>
<td class="border-l dark:border-l-[hsl(240deg_3.7%_22%)] p-6 font-bold text-rose-600 dark:text-rose-400">{{ cellMoneyApi(cat.refundAmount) }}</td>
<td class="p-6 text-amber-600 dark:text-amber-400">{{ cellMoneyApi(cat.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoneyApi(cat.brushFee) }}</td>
@@ -247,7 +247,7 @@ const cellMoneyApi = (v: number | null | undefined) =>
<td class="p-6">{{ cellMoneyApi(props.data.categoryOverview.total.productCost) }}</td>
<td class="p-6">{{ cellMoneyApi(props.data.categoryOverview.total.shippingCost) }}</td>
<td class="p-6">{{ cellMoneyApi(props.data.categoryOverview.total.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoneyApi(props.data.categoryOverview.total.totalCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoneyApi(props.data.categoryOverview.total.orderCost) }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ cellMoneyApi(props.data.categoryOverview.total.refundAmount) }}</td>
<td class="p-6">{{ cellMoneyApi(props.data.categoryOverview.total.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoneyApi(props.data.categoryOverview.total.brushFee) }}</td>
@@ -173,7 +173,7 @@ function goToProductOverview(productId: number) {
<OverviewColumnHint :title="overviewTableHints.otherCost">其他成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 font-bold text-orange-800 dark:text-orange-300">
<OverviewColumnHint :title="overviewTableHints.totalCost">总成本</OverviewColumnHint>
<OverviewColumnHint :title="overviewTableHints.orderCost">订单成本</OverviewColumnHint>
</th>
<th class="border-b px-6 py-4 text-rose-600">
<OverviewColumnHint :title="overviewTableHints.refundAmount">退款金额</OverviewColumnHint>
@@ -235,7 +235,7 @@ function goToProductOverview(productId: number) {
<td class="px-6 py-4">{{ cellMoneyApi(product.shippingCost) }}</td>
<td class="px-6 py-4">{{ cellMoneyApi(product.otherCost) }}</td>
<td class="px-6 py-4 font-bold text-orange-800 dark:text-orange-300">
{{ cellMoneyApi(product.totalCost) }}
{{ cellMoneyApi(product.orderCost) }}
</td>
<td class="px-6 py-4 font-bold text-rose-500 dark:text-rose-400">
{{ cellMoneyApi(product.refundAmount) }}
@@ -278,7 +278,7 @@ function goToProductOverview(productId: number) {
<td class="sticky bottom-0 bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)] px-6 py-4">{{ cellMoneyApi(data.productOverview.total.productCost) }}</td>
<td class="sticky bottom-0 bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)] px-6 py-4">{{ cellMoneyApi(data.productOverview.total.shippingCost) }}</td>
<td class="sticky bottom-0 bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)] px-6 py-4">{{ cellMoneyApi(data.productOverview.total.otherCost) }}</td>
<td class="sticky bottom-0 bg-slate-100 font-bold text-orange-800 dark:text-orange-300 dark:bg-[hsl(240deg_3.7%_22%)] px-6 py-4">{{ cellMoneyApi(data.productOverview.total.totalCost) }}</td>
<td class="sticky bottom-0 bg-slate-100 font-bold text-orange-800 dark:text-orange-300 dark:bg-[hsl(240deg_3.7%_22%)] px-6 py-4">{{ cellMoneyApi(data.productOverview.total.orderCost) }}</td>
<td class="sticky bottom-0 bg-slate-100 text-rose-500 dark:bg-[hsl(240deg_3.7%_22%)] dark:text-rose-400 px-6 py-4">{{ cellMoneyApi(data.productOverview.total.refundAmount) }}</td>
<td class="sticky bottom-0 bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)] px-6 py-4">{{ cellMoneyApi(data.productOverview.total.totalPromotionFee) }}</td>
<td class="sticky bottom-0 bg-slate-100 text-amber-500 dark:bg-[hsl(240deg_3.7%_22%)] dark:text-amber-400 px-6 py-4">{{ cellMoneyApi(data.productOverview.total.brushFee) }}</td>