mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 09:49:20 +08:00
fix: 财务tab表格首列固定、表头固定及最大高度限制
This commit is contained in:
+22
-3
@@ -108,7 +108,7 @@ const cellRoi = (v: number | null | undefined) =>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-container overflow-x-auto">
|
<div class="table-container">
|
||||||
<table class="w-full whitespace-nowrap text-left text-sm">
|
<table class="w-full whitespace-nowrap text-left text-sm">
|
||||||
<thead
|
<thead
|
||||||
class="bg-slate-50 dark:bg-[hsl(240deg_3.7%_15.9%)] text-xs font-black uppercase text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]"
|
class="bg-slate-50 dark:bg-[hsl(240deg_3.7%_15.9%)] text-xs font-black uppercase text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]"
|
||||||
@@ -159,7 +159,7 @@ const cellRoi = (v: number | null | undefined) =>
|
|||||||
盈利分析维度
|
盈利分析维度
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="bg-slate-50/80 dark:bg-[hsl(240deg_3.7%_15.9%/80)] text-sm">
|
<tr class="bg-slate-50 dark:bg-[hsl(240deg_3.7%_15.9%)] text-sm">
|
||||||
<th class="border-b border-l px-6 py-4 font-black text-slate-900 dark:text-[hsl(0deg_0%_95%)]">
|
<th class="border-b border-l px-6 py-4 font-black text-slate-900 dark:text-[hsl(0deg_0%_95%)]">
|
||||||
<OverviewColumnHint :title="storeOverviewHints.salesAmount">
|
<OverviewColumnHint :title="storeOverviewHints.salesAmount">
|
||||||
实际销售额
|
实际销售额
|
||||||
@@ -290,7 +290,7 @@ const cellRoi = (v: number | null | undefined) =>
|
|||||||
<!-- 合计行 -->
|
<!-- 合计行 -->
|
||||||
<tfoot v-if="categorySummary?.total" class="bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)]">
|
<tfoot v-if="categorySummary?.total" class="bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)]">
|
||||||
<tr class="font-black text-slate-900 dark:text-[hsl(0deg_0%_95%)]">
|
<tr class="font-black text-slate-900 dark:text-[hsl(0deg_0%_95%)]">
|
||||||
<td class="p-6 text-base">合计</td>
|
<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">{{ cellMoney(categorySummary?.total?.salesAmount) }}</td>
|
||||||
<td class="p-6">{{ formatIntCell(categorySummary?.total?.orderCount) }}</td>
|
<td class="p-6">{{ formatIntCell(categorySummary?.total?.orderCount) }}</td>
|
||||||
@@ -320,3 +320,22 @@ const cellRoi = (v: number | null | undefined) =>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.sticky-col {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-container {
|
||||||
|
max-height: 1000px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
+22
-3
@@ -156,7 +156,7 @@ const sortedData = computed(() => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="overflow-x-auto">
|
<div class="table-container">
|
||||||
<table class="w-full whitespace-nowrap text-left text-sm">
|
<table class="w-full whitespace-nowrap text-left text-sm">
|
||||||
<thead
|
<thead
|
||||||
class="bg-slate-50 dark:bg-[hsl(240deg_3.7%_15.9%)] text-xs font-black uppercase text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]"
|
class="bg-slate-50 dark:bg-[hsl(240deg_3.7%_15.9%)] text-xs font-black uppercase text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]"
|
||||||
@@ -222,7 +222,7 @@ const sortedData = computed(() => {
|
|||||||
盈利分析维度
|
盈利分析维度
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="bg-slate-50/80 dark:bg-[hsl(240deg_3.7%_15.9%/80)] text-sm">
|
<tr class="bg-slate-50 dark:bg-[hsl(240deg_3.7%_15.9%)] text-sm">
|
||||||
<!-- 目标子列 -->
|
<!-- 目标子列 -->
|
||||||
<th class="border-b border-l border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] px-6 py-4">
|
<th class="border-b border-l border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] px-6 py-4">
|
||||||
<OverviewColumnHint :title="storeOverviewHints.targetOrderCount">
|
<OverviewColumnHint :title="storeOverviewHints.targetOrderCount">
|
||||||
@@ -368,7 +368,7 @@ const sortedData = computed(() => {
|
|||||||
<!-- 合计行 -->
|
<!-- 合计行 -->
|
||||||
<tfoot v-if="totalData" class="bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)]">
|
<tfoot v-if="totalData" class="bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)]">
|
||||||
<tr class="font-black text-slate-900 dark:text-[hsl(0deg_0%_95%)]">
|
<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="sticky-col bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)] border-r-2 border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] p-6 text-base">合计</td>
|
||||||
<!-- 目标 -->
|
<!-- 目标 -->
|
||||||
<td class="p-6">{{ formatIntCell(totalData.targetOrderCount) }}</td>
|
<td class="p-6">{{ formatIntCell(totalData.targetOrderCount) }}</td>
|
||||||
<td class="p-6 text-blue-600 dark:text-blue-400">
|
<td class="p-6 text-blue-600 dark:text-blue-400">
|
||||||
@@ -422,3 +422,22 @@ const sortedData = computed(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.sticky-col {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-container {
|
||||||
|
max-height: 1000px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
+27
-3
@@ -111,7 +111,7 @@ const cellRoi = (v: number | null | undefined) =>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-container overflow-x-auto">
|
<div class="table-container">
|
||||||
<table class="w-full whitespace-nowrap text-left text-sm">
|
<table class="w-full whitespace-nowrap text-left text-sm">
|
||||||
<thead
|
<thead
|
||||||
class="bg-slate-50 dark:bg-[hsl(240deg_3.7%_15.9%)] text-xs font-black uppercase text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]"
|
class="bg-slate-50 dark:bg-[hsl(240deg_3.7%_15.9%)] text-xs font-black uppercase text-slate-500 dark:text-[hsl(240deg_5%_64.9%)]"
|
||||||
@@ -177,7 +177,7 @@ const cellRoi = (v: number | null | undefined) =>
|
|||||||
盈利分析维度
|
盈利分析维度
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="bg-slate-50/80 dark:bg-[hsl(240deg_3.7%_15.9%/80)] text-sm">
|
<tr class="bg-slate-50 dark:bg-[hsl(240deg_3.7%_15.9%)] text-sm">
|
||||||
<!-- 目标 -->
|
<!-- 目标 -->
|
||||||
<th class="border-b border-l border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] px-6 py-4">
|
<th class="border-b border-l border-slate-200 dark:border-[hsl(240deg_3.7%_22%)] px-6 py-4">
|
||||||
<OverviewColumnHint :title="storeOverviewHints.targetOrderCount">
|
<OverviewColumnHint :title="storeOverviewHints.targetOrderCount">
|
||||||
@@ -375,7 +375,12 @@ const cellRoi = (v: number | null | undefined) =>
|
|||||||
<!-- 合计行 -->
|
<!-- 合计行 -->
|
||||||
<tfoot v-if="shopSummary?.total" class="bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)]">
|
<tfoot v-if="shopSummary?.total" class="bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)]">
|
||||||
<tr class="font-black text-slate-900 dark:text-[hsl(0deg_0%_95%)]">
|
<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="sticky-col bg-slate-100 dark:bg-[hsl(240deg_3.7%_22%)] p-6 text-base"
|
||||||
|
:class="shopExportMode ? 'border-l-0' : ''"
|
||||||
|
>
|
||||||
|
合计
|
||||||
|
</td>
|
||||||
<!-- 目标 -->
|
<!-- 目标 -->
|
||||||
<td class="p-6">{{ formatIntCell(shopSummary?.total?.targetOrderCount) }}</td>
|
<td class="p-6">{{ formatIntCell(shopSummary?.total?.targetOrderCount) }}</td>
|
||||||
<td class="p-6 text-blue-600 dark:text-blue-400">
|
<td class="p-6 text-blue-600 dark:text-blue-400">
|
||||||
@@ -422,3 +427,22 @@ const cellRoi = (v: number | null | undefined) =>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.sticky-col {
|
||||||
|
position: sticky;
|
||||||
|
left: 0;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-container {
|
||||||
|
max-height: 1000px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user