diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/CategoryComparisonTable.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/CategoryComparisonTable.vue index a73cfdb3..bf8c4f70 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/CategoryComparisonTable.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/CategoryComparisonTable.vue @@ -154,7 +154,7 @@ const cellRoi = (v: number | null | undefined) => 盈利分析维度 @@ -277,7 +277,7 @@ const cellRoi = (v: number | null | undefined) => {{ cellRoi(cat.roi) }} - + {{ cellMoney(cat.profitAfterTax) }} @@ -338,4 +338,12 @@ thead { top: 0; z-index: 20; } + +thead tr:last-child th:last-child, +tbody td:last-child:not([colspan]), +tfoot td:last-child:not([colspan]) { + position: sticky; + right: 0; + z-index: 10; +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/PlatformSummaryCard.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/PlatformSummaryCard.vue index e4825dfb..0fab8a1a 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/PlatformSummaryCard.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/PlatformSummaryCard.vue @@ -217,7 +217,7 @@ const sortedData = computed(() => { 盈利分析维度 @@ -358,8 +358,8 @@ const sortedData = computed(() => { {{ formatAmount(p.salesTaxAmount) }} {{ p.roi.toFixed(2) }} {{ formatAmount(p.profitAfterTax) }} @@ -440,4 +440,12 @@ thead { top: 0; z-index: 20; } + +thead tr:last-child th:last-child, +tbody td:last-child:not([colspan]), +tfoot td:last-child:not([colspan]) { + position: sticky; + right: 0; + z-index: 10; +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/ShopComparisonTable.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/ShopComparisonTable.vue index 0e0dc6e9..13f2d7a2 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/ShopComparisonTable.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/workbench/tabs/finance/components/ShopComparisonTable.vue @@ -172,7 +172,7 @@ const cellRoi = (v: number | null | undefined) => 盈利分析维度 @@ -362,7 +362,7 @@ const cellRoi = (v: number | null | undefined) => {{ cellRoi(shop.roi) }} - + {{ cellMoney(shop.profitAfterTax) }} @@ -440,6 +440,32 @@ const cellRoi = (v: number | null | undefined) => overflow: auto; } +thead { + position: sticky; + top: 0; + z-index: 20; +} + +/* 最后一列(税后盈亏)固定在右侧 */ +thead tr:last-child th:last-child, +tbody td:last-child:not([colspan]), +tfoot td:last-child:not([colspan]) { + position: sticky; + right: 0; + z-index: 10; +} + +.sticky-right { + position: sticky; + right: 0; + z-index: 10; +} + +.table-container { + max-height: 1000px; + overflow: auto; +} + thead { position: sticky; top: 0;