This commit is contained in:
van
2026-04-06 17:40:09 +08:00
parent 2a53f8bbff
commit f7d078f885

View File

@@ -141,7 +141,7 @@
<!-- 表格区域 --> <!-- 表格区域 -->
<template #table> <template #table>
<div v-if="!isMobile" class="profit-summary-bar"> <div v-if="!isMobile" ref="profitSummaryBar" class="profit-summary-bar sticky-summary">
<span class="profit-summary-item">统计范围<b>{{ profitSummaryLabel }}</b></span> <span class="profit-summary-item">统计范围<b>{{ profitSummaryLabel }}</b></span>
<span class="profit-summary-item">后返合计<b>{{ toYuan(profitSummaryRebateTotal) }}</b></span> <span class="profit-summary-item">后返合计<b>{{ toYuan(profitSummaryRebateTotal) }}</b></span>
<span class="profit-summary-item">利润合计<b>{{ profitSummaryProfitTotal === '' ? '—' : toYuan(profitSummaryProfitTotal) }}</b></span> <span class="profit-summary-item">利润合计<b>{{ profitSummaryProfitTotal === '' ? '—' : toYuan(profitSummaryProfitTotal) }}</b></span>
@@ -790,7 +790,7 @@
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="handleMainPagination"
class="list-pagination" class="list-pagination"
/> />
</template> </template>
@@ -1243,6 +1243,17 @@ export default {
} }
}, },
methods: { methods: {
handleMainPagination() {
this.getList()
this.$nextTick(() => {
const el = this.$refs.profitSummaryBar
if (el && typeof el.scrollIntoView === 'function') {
el.scrollIntoView({ behavior: 'smooth', block: 'start' })
} else if (typeof window !== 'undefined') {
window.scrollTo({ top: 0, behavior: 'smooth' })
}
})
},
/** 处理移动端操作菜单命令 */ /** 处理移动端操作菜单命令 */
handleActionCommand({ action, row }) { handleActionCommand({ action, row }) {
switch (action) { switch (action) {
@@ -3265,6 +3276,17 @@ export default {
font-size: 13px; font-size: 13px;
color: #606266; color: #606266;
} }
.sticky-summary {
position: sticky;
top: 0;
z-index: 21;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.order-table ::v-deep .el-table__header-wrapper {
position: sticky;
top: 46px;
z-index: 20;
}
.profit-summary-item { .profit-summary-item {
margin-right: 20px; margin-right: 20px;
} }