fix: 统一表格数字单元格显示逻辑,0值显示为数字而非'-'

This commit is contained in:
小蟑螂
2026-05-07 22:54:18 +08:00
parent 103c94cd7b
commit 92f1e26977
8 changed files with 188 additions and 199 deletions
@@ -4,6 +4,7 @@ import type { CompanyOverviewVO } from '#/api/ecommerce/store-overview';
import { computed } from 'vue';
import { formatFeeRatioPercent } from '#/utils/overview-fee-ratio';
import { formatIntCell, formatNumberCell } from '#/utils/overview-table-cells';
import OverviewColumnHint from '#/components/overview/OverviewColumnHint.vue';
import {
@@ -46,6 +47,10 @@ const formatAmount = (amount: number) => {
return `¥${amount.toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
};
const cellMoney = (v: number | null | undefined) => formatNumberCell(v, formatAmount);
const cellRoi = (v: number | null | undefined) =>
formatNumberCell(v, (n) => n.toFixed(2));
</script>
<template>
@@ -236,39 +241,37 @@ const formatAmount = (amount: number) => {
</span>
</td>
<td class="p-6 font-black">{{ formatAmount(cat.salesAmount) }}</td>
<td class="p-6 font-medium">{{ cat.orderCount?.toLocaleString('zh-CN') || '-' }}</td>
<td class="p-6 font-medium">{{ formatIntCell(cat.orderCount) }}</td>
<td class="p-6 font-medium">
{{
cat.averageOrderValue ? formatAmount(cat.averageOrderValue) : '-'
}}
{{ cellMoney(cat.averageOrderValue) }}
</td>
<td class="p-6">{{ cat.productCost ? formatAmount(cat.productCost) : '-' }}</td>
<td class="p-6">{{ cat.shippingCost ? formatAmount(cat.shippingCost) : '-' }}</td>
<td class="p-6">{{ cat.otherCost ? formatAmount(cat.otherCost) : '-' }}</td>
<td class="p-6">{{ cellMoney(cat.productCost) }}</td>
<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">
{{ cat.totalCost != null ? formatAmount(cat.totalCost) : '-' }}
{{ cellMoney(cat.totalCost) }}
</td>
<td class="p-6 font-bold text-rose-600 dark:text-rose-400">
{{ cat.refundAmount ? formatAmount(cat.refundAmount) : '-' }}
{{ cellMoney(cat.refundAmount) }}
</td>
<td class="p-6">{{ cat.totalPromotionFee ? formatAmount(cat.totalPromotionFee) : '-' }}</td>
<td class="p-6">{{ cellMoney(cat.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">
{{ cat.brushFee ? formatAmount(cat.brushFee) : '-' }}
{{ cellMoney(cat.brushFee) }}
</td>
<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">
{{ cat.totalProfitBeforeTax ? formatAmount(cat.totalProfitBeforeTax) : '-' }}
{{ cellMoney(cat.totalProfitBeforeTax) }}
</td>
<td class="p-6 italic text-slate-400 dark:text-[hsl(240deg_5%_64.9%)]">
{{ cat.salesTaxAmount ? formatAmount(cat.salesTaxAmount) : '-' }}
{{ cellMoney(cat.salesTaxAmount) }}
</td>
<td class="p-6 font-black text-indigo-700 dark:text-indigo-400">
{{ cat.roi?.toFixed(2) || '-' }}
{{ cellRoi(cat.roi) }}
</td>
<td class="bg-emerald-50 dark:bg-[hsl(142deg_71.8%_29%/20%)] p-6 text-base font-black text-emerald-600">
{{ cat.profitAfterTax ? formatAmount(cat.profitAfterTax) : '-' }}
{{ cellMoney(cat.profitAfterTax) }}
</td>
</tr>
<tr v-if="!categoryComparisons?.categories?.length">
@@ -282,32 +285,28 @@ const formatAmount = (amount: number) => {
<tr class="font-black text-slate-900 dark:text-[hsl(0deg_0%_95%)]">
<td class="p-6 text-base">合计</td>
<!-- 规模 -->
<td class="p-6">{{ categoryComparisons?.total?.salesAmount ? formatAmount(categoryComparisons?.total?.salesAmount) : '-' }}</td>
<td class="p-6">{{ categoryComparisons?.total?.orderCount ? categoryComparisons?.total?.orderCount.toLocaleString() : '-' }}</td>
<td class="p-6">{{ cellMoney(categoryComparisons?.total?.salesAmount) }}</td>
<td class="p-6">{{ formatIntCell(categoryComparisons?.total?.orderCount) }}</td>
<td class="p-6">
{{
categoryComparisons?.total?.averageOrderValue
? formatAmount(categoryComparisons?.total?.averageOrderValue)
: '-'
}}
{{ cellMoney(categoryComparisons?.total?.averageOrderValue) }}
</td>
<!-- 成本 -->
<td class="p-6">{{ categoryComparisons?.total?.productCost ? formatAmount(categoryComparisons?.total?.productCost) : '-' }}</td>
<td class="p-6">{{ categoryComparisons?.total?.shippingCost ? formatAmount(categoryComparisons?.total?.shippingCost) : '-' }}</td>
<td class="p-6">{{ categoryComparisons?.total?.otherCost ? formatAmount(categoryComparisons?.total?.otherCost) : '-' }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ categoryComparisons?.total?.totalCost != null ? formatAmount(categoryComparisons?.total?.totalCost) : '-' }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ categoryComparisons?.total?.refundAmount ? formatAmount(categoryComparisons?.total?.refundAmount) : '-' }}</td>
<td class="p-6">{{ categoryComparisons?.total?.totalPromotionFee ? formatAmount(categoryComparisons?.total?.totalPromotionFee) : '-' }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ categoryComparisons?.total?.brushFee ? formatAmount(categoryComparisons?.total?.brushFee) : '-' }}</td>
<td class="p-6">{{ cellMoney(categoryComparisons?.total?.productCost) }}</td>
<td class="p-6">{{ cellMoney(categoryComparisons?.total?.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(categoryComparisons?.total?.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(categoryComparisons?.total?.totalCost) }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ cellMoney(categoryComparisons?.total?.refundAmount) }}</td>
<td class="p-6">{{ cellMoney(categoryComparisons?.total?.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoney(categoryComparisons?.total?.brushFee) }}</td>
<td class="p-6 text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ categoryComparisons?.total?.feeRatio !== undefined ? formatFeeRatioPercent(categoryComparisons?.total?.feeRatio) : '-' }}</td>
<!-- 盈利 -->
<td class="p-6">{{ categoryComparisons?.total?.totalProfitBeforeTax ? formatAmount(categoryComparisons?.total?.totalProfitBeforeTax) : '-' }}</td>
<td class="p-6 italic text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ categoryComparisons?.total?.salesTaxAmount ? formatAmount(categoryComparisons?.total?.salesTaxAmount) : '-' }}</td>
<td class="p-6 text-indigo-700 dark:text-indigo-400">{{ categoryComparisons?.total?.roi?.toFixed(2) || '-' }}</td>
<td class="p-6">{{ cellMoney(categoryComparisons?.total?.totalProfitBeforeTax) }}</td>
<td class="p-6 italic text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ cellMoney(categoryComparisons?.total?.salesTaxAmount) }}</td>
<td class="p-6 text-indigo-700 dark:text-indigo-400">{{ cellRoi(categoryComparisons?.total?.roi) }}</td>
<td
class="bg-emerald-100 p-6 text-base dark:bg-emerald-950"
:class="(categoryComparisons?.total?.profitAfterTax ?? 0) < 0 ? 'text-rose-600 dark:text-rose-400' : 'text-emerald-700 dark:text-emerald-300'"
>{{ categoryComparisons?.total?.profitAfterTax ? formatAmount(categoryComparisons?.total?.profitAfterTax) : '-' }}</td>
>{{ cellMoney(categoryComparisons?.total?.profitAfterTax) }}</td>
</tr>
</tfoot>
</table>
@@ -3,6 +3,7 @@ import { computed, ref } from 'vue';
import type { CompanyOverviewVO } from '#/api/ecommerce/store-overview';
import { formatFeeRatioPercent } from '#/utils/overview-fee-ratio';
import { formatIntCell, formatNumberCell } from '#/utils/overview-table-cells';
import OverviewColumnHint from '#/components/overview/OverviewColumnHint.vue';
import {
@@ -43,6 +44,10 @@ const formatAmount = (amount: number) => {
return `¥${amount.toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
};
const cellMoney = (v: number | null | undefined) => formatNumberCell(v, formatAmount);
const cellRoi = (v: number | null | undefined) =>
formatNumberCell(v, (n) => n.toFixed(2));
const formatPercentPlain = (value: number | undefined) => {
if (value === undefined) return '-';
return `${value.toFixed(1)}%`;
@@ -361,46 +366,46 @@ const sortedData = computed(() => {
<tr class="font-black text-slate-900 dark:text-[hsl(0deg_0%_95%)]">
<td class="sticky-col border-r-2 border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] p-6 text-base">合计</td>
<!-- 目标 -->
<td class="p-6">{{ totalData.targetOrderCount?.toLocaleString() }}</td>
<td class="p-6">{{ formatIntCell(totalData.targetOrderCount) }}</td>
<td class="p-6 text-blue-600 dark:text-blue-400">
{{ totalData.orderCountAchievementRate !== undefined ? formatPercentPlain(totalData.orderCountAchievementRate) : '-' }}
</td>
<td class="p-6">{{ totalData.targetAmount ? formatAmount(totalData.targetAmount) : '-' }}</td>
<td class="p-6">{{ cellMoney(totalData.targetAmount) }}</td>
<td class="p-6 text-blue-600 dark:text-blue-400">
{{ totalData.salesAmountAchievementRate !== undefined ? formatPercentPlain(totalData.salesAmountAchievementRate) : '-' }}
</td>
<!-- 规模 -->
<td class="p-6">{{ totalData.salesAmount ? formatAmount(totalData.salesAmount) : '-' }}</td>
<td class="p-6">{{ totalData.orderCount ? totalData.orderCount.toLocaleString() : '-' }}</td>
<td class="p-6">{{ cellMoney(totalData.salesAmount) }}</td>
<td class="p-6">{{ formatIntCell(totalData.orderCount) }}</td>
<td class="p-6">
{{ totalData.averageOrderValue ? formatAmount(totalData.averageOrderValue) : '-' }}
{{ cellMoney(totalData.averageOrderValue) }}
</td>
<!-- 成本 -->
<td class="p-6">{{ totalData.productCost ? formatAmount(totalData.productCost) : '-' }}</td>
<td class="p-6">{{ totalData.shippingCost ? formatAmount(totalData.shippingCost) : '-' }}</td>
<td class="p-6">{{ totalData.otherCost ? formatAmount(totalData.otherCost) : '-' }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ totalData.totalCost != null ? formatAmount(totalData.totalCost) : '-' }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ totalData.refundAmount ? formatAmount(totalData.refundAmount) : '-' }}</td>
<td class="p-6">{{ totalData.totalPromotionFee ? formatAmount(totalData.totalPromotionFee) : '-' }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ totalData.brushFee ? formatAmount(totalData.brushFee) : '-' }}</td>
<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 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>
<td class="p-6 text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">
{{ totalData.feeRatio !== undefined ? formatFeeRatioPercent(totalData.feeRatio) : '-' }}
</td>
<!-- 盈利 -->
<td class="p-6">
{{ totalData.totalProfitBeforeTax ? formatAmount(totalData.totalProfitBeforeTax) : '-' }}
{{ cellMoney(totalData.totalProfitBeforeTax) }}
</td>
<td class="p-6 italic text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">
{{ totalData.salesTaxAmount ? formatAmount(totalData.salesTaxAmount) : '-' }}
{{ cellMoney(totalData.salesTaxAmount) }}
</td>
<td class="p-6 text-indigo-700 dark:text-indigo-400">
{{ totalData.roi !== undefined ? totalData.roi.toFixed(2) : '-' }}
{{ cellRoi(totalData.roi) }}
</td>
<td
class="bg-emerald-100 p-6 text-base dark:bg-emerald-950"
:class="(totalData.profitAfterTax ?? 0) >= 0 ? 'text-emerald-700 dark:text-emerald-300' : 'text-rose-600 dark:text-rose-400'"
>
{{ totalData.profitAfterTax ? formatAmount(totalData.profitAfterTax) : '-' }}
{{ cellMoney(totalData.profitAfterTax) }}
</td>
</tr>
</tfoot>
@@ -4,6 +4,7 @@ import type { CompanyOverviewVO } from '#/api/ecommerce/store-overview';
import { computed } from 'vue';
import { formatFeeRatioPercent } from '#/utils/overview-fee-ratio';
import { formatIntCell, formatNumberCell } from '#/utils/overview-table-cells';
import OverviewColumnHint from '#/components/overview/OverviewColumnHint.vue';
import {
@@ -46,6 +47,10 @@ const formatPercentPlain = (value: number | undefined) => {
if (value === undefined) return '-';
return `${value.toFixed(1)}%`;
};
const cellMoney = (v: number | null | undefined) => formatNumberCell(v, formatAmount);
const cellRoi = (v: number | null | undefined) =>
formatNumberCell(v, (n) => n.toFixed(2));
</script>
<template>
@@ -278,7 +283,7 @@ const formatPercentPlain = (value: number | undefined) => {
</td>
<!-- 目标 -->
<td class="p-6 font-medium">
{{ shop.targetOrderCount?.toLocaleString('zh-CN') || '-' }}
{{ formatIntCell(shop.targetOrderCount) }}
</td>
<td class="p-6 font-black text-blue-600 dark:text-blue-400">
{{
@@ -288,9 +293,7 @@ const formatPercentPlain = (value: number | undefined) => {
}}
</td>
<td class="p-6 font-medium">
{{
shop.targetAmount ? formatAmount(shop.targetAmount) : '-'
}}
{{ cellMoney(shop.targetAmount) }}
</td>
<td class="p-6 font-black text-blue-600 dark:text-blue-400">
{{
@@ -304,50 +307,32 @@ const formatPercentPlain = (value: number | undefined) => {
{{ formatAmount(shop.salesAmount) }}
</td>
<td class="p-6 font-medium">
{{ shop.orderCount?.toLocaleString('zh-CN') || '-' }}
{{ formatIntCell(shop.orderCount) }}
</td>
<td class="p-6 font-medium">
{{
shop.averageOrderValue
? formatAmount(shop.averageOrderValue)
: '-'
}}
{{ cellMoney(shop.averageOrderValue) }}
</td>
<!-- 成本 -->
<td class="p-6">
{{
shop.productCost ? formatAmount(shop.productCost) : '-'
}}
{{ cellMoney(shop.productCost) }}
</td>
<td class="p-6">
{{
shop.shippingCost ? formatAmount(shop.shippingCost) : '-'
}}
{{ cellMoney(shop.shippingCost) }}
</td>
<td class="p-6">
{{
shop.otherCost ? formatAmount(shop.otherCost) : '-'
}}
{{ cellMoney(shop.otherCost) }}
</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">
{{
shop.totalCost != null ? formatAmount(shop.totalCost) : '-'
}}
{{ cellMoney(shop.totalCost) }}
</td>
<td class="p-6 font-bold text-rose-600 dark:text-rose-400">
{{
shop.refundAmount ? formatAmount(shop.refundAmount) : '-'
}}
{{ cellMoney(shop.refundAmount) }}
</td>
<td class="p-6">
{{
shop.totalPromotionFee
? formatAmount(shop.totalPromotionFee)
: '-'
}}
{{ cellMoney(shop.totalPromotionFee) }}
</td>
<td class="p-6 text-orange-600 dark:text-orange-400">
{{ shop.brushFee ? formatAmount(shop.brushFee) : '-' }}
{{ cellMoney(shop.brushFee) }}
</td>
<td class="p-6 text-slate-400 dark:text-[hsl(240deg_5%_64.9%)]">
{{
@@ -358,28 +343,16 @@ const formatPercentPlain = (value: number | undefined) => {
</td>
<!-- 盈利 -->
<td class="p-6 font-bold">
{{
shop.totalProfitBeforeTax
? formatAmount(shop.totalProfitBeforeTax)
: '-'
}}
{{ cellMoney(shop.totalProfitBeforeTax) }}
</td>
<td class="p-6 italic text-slate-400 dark:text-[hsl(240deg_5%_64.9%)]">
{{
shop.salesTaxAmount
? formatAmount(shop.salesTaxAmount)
: '-'
}}
{{ cellMoney(shop.salesTaxAmount) }}
</td>
<td class="p-6 font-black text-indigo-700 dark:text-indigo-400">
{{ shop.roi?.toFixed(2) || '-' }}
{{ cellRoi(shop.roi) }}
</td>
<td class="bg-emerald-50 dark:bg-[hsl(142deg_71.8%_29%/20%)] p-6 text-base font-black text-emerald-600">
{{
shop.profitAfterTax
? formatAmount(shop.profitAfterTax)
: '-'
}}
{{ cellMoney(shop.profitAfterTax) }}
</td>
</tr>
<tr v-if="!shopComparisons?.shops?.length">
@@ -393,7 +366,7 @@ const formatPercentPlain = (value: number | undefined) => {
<tr class="font-black text-slate-900 dark:text-[hsl(0deg_0%_95%)]">
<td class="p-6 text-base" :class="shopExportMode ? 'border-l-0' : ''">合计</td>
<!-- 目标 -->
<td class="p-6">{{ shopComparisons?.total?.targetOrderCount?.toLocaleString() }}</td>
<td class="p-6">{{ formatIntCell(shopComparisons?.total?.targetOrderCount) }}</td>
<td class="p-6 text-blue-600 dark:text-blue-400">
{{
shopComparisons?.total?.orderCountAchievementRate !== undefined
@@ -401,7 +374,7 @@ const formatPercentPlain = (value: number | undefined) => {
: '-'
}}
</td>
<td class="p-6">{{ shopComparisons?.total?.targetAmount ? formatAmount(shopComparisons?.total?.targetAmount) : '-' }}</td>
<td class="p-6">{{ cellMoney(shopComparisons?.total?.targetAmount) }}</td>
<td class="p-6 text-blue-600 dark:text-blue-400">
{{
shopComparisons?.total?.salesAmountAchievementRate !== undefined
@@ -410,32 +383,28 @@ const formatPercentPlain = (value: number | undefined) => {
}}
</td>
<!-- 规模 -->
<td class="p-6">{{ shopComparisons?.total?.salesAmount ? formatAmount(shopComparisons?.total?.salesAmount) : '-' }}</td>
<td class="p-6">{{ shopComparisons?.total?.orderCount ? shopComparisons?.total?.orderCount.toLocaleString() : '-' }}</td>
<td class="p-6">{{ cellMoney(shopComparisons?.total?.salesAmount) }}</td>
<td class="p-6">{{ formatIntCell(shopComparisons?.total?.orderCount) }}</td>
<td class="p-6">
{{
shopComparisons?.total?.averageOrderValue
? formatAmount(shopComparisons?.total?.averageOrderValue)
: '-'
}}
{{ cellMoney(shopComparisons?.total?.averageOrderValue) }}
</td>
<!-- 成本 -->
<td class="p-6">{{ shopComparisons?.total?.productCost ? formatAmount(shopComparisons?.total?.productCost) : '-' }}</td>
<td class="p-6">{{ shopComparisons?.total?.shippingCost ? formatAmount(shopComparisons?.total?.shippingCost) : '-' }}</td>
<td class="p-6">{{ shopComparisons?.total?.otherCost ? formatAmount(shopComparisons?.total?.otherCost) : '-' }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ shopComparisons?.total?.totalCost != null ? formatAmount(shopComparisons?.total?.totalCost) : '-' }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ shopComparisons?.total?.refundAmount ? formatAmount(shopComparisons?.total?.refundAmount) : '-' }}</td>
<td class="p-6">{{ shopComparisons?.total?.totalPromotionFee ? formatAmount(shopComparisons?.total?.totalPromotionFee) : '-' }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ shopComparisons?.total?.brushFee ? formatAmount(shopComparisons?.total?.brushFee) : '-' }}</td>
<td class="p-6">{{ cellMoney(shopComparisons?.total?.productCost) }}</td>
<td class="p-6">{{ cellMoney(shopComparisons?.total?.shippingCost) }}</td>
<td class="p-6">{{ cellMoney(shopComparisons?.total?.otherCost) }}</td>
<td class="p-6 font-bold text-orange-800 dark:text-orange-300">{{ cellMoney(shopComparisons?.total?.totalCost) }}</td>
<td class="p-6 text-rose-600 dark:text-rose-400">{{ cellMoney(shopComparisons?.total?.refundAmount) }}</td>
<td class="p-6">{{ cellMoney(shopComparisons?.total?.totalPromotionFee) }}</td>
<td class="p-6 text-orange-600 dark:text-orange-400">{{ cellMoney(shopComparisons?.total?.brushFee) }}</td>
<td class="p-6 text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ shopComparisons?.total?.feeRatio !== undefined ? formatFeeRatioPercent(shopComparisons?.total?.feeRatio) : '-' }}</td>
<!-- 盈利 -->
<td class="p-6">{{ shopComparisons?.total?.totalProfitBeforeTax ? formatAmount(shopComparisons?.total?.totalProfitBeforeTax) : '-' }}</td>
<td class="p-6 italic text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ shopComparisons?.total?.salesTaxAmount ? formatAmount(shopComparisons?.total?.salesTaxAmount) : '-' }}</td>
<td class="p-6 text-indigo-700 dark:text-indigo-400">{{ shopComparisons?.total?.roi !== undefined ? shopComparisons?.total?.roi.toFixed(2) : '-' }}</td>
<td class="p-6">{{ cellMoney(shopComparisons?.total?.totalProfitBeforeTax) }}</td>
<td class="p-6 italic text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]">{{ cellMoney(shopComparisons?.total?.salesTaxAmount) }}</td>
<td class="p-6 text-indigo-700 dark:text-indigo-400">{{ cellRoi(shopComparisons?.total?.roi) }}</td>
<td
class="bg-emerald-100 p-6 text-base dark:bg-emerald-950"
:class="(shopComparisons?.total?.profitAfterTax ?? 0) < 0 ? 'text-rose-600 dark:text-rose-400' : 'text-emerald-700 dark:text-emerald-300'"
>{{ shopComparisons?.total?.profitAfterTax ? formatAmount(shopComparisons?.total?.profitAfterTax) : '-' }}</td>
>{{ cellMoney(shopComparisons?.total?.profitAfterTax) }}</td>
</tr>
</tfoot>
</table>