fix(ui): 统一 payment 和 settlement 模块浮动底栏为 fixed 定位

- payment 模块所有表单页底栏按钮顺序及布局全量对齐,取消居中改为右对齐浮动
- settlement 模块弹窗及独立页 footer 添加 sticky 浮动,主操作按钮样式调整为 plain
- 彻底修复浮动底栏不吸底问题,所有相关 footer 由 position: sticky 改为 position: fixed
- 统一 fixed 底栏样式模板,包含左偏移支持侧栏折叠和横向布局切换
- 更新项目文档,明确浮动底栏必须用 fixed 定位,避免 overflow:hidden 祖先导致 sticky 失效
- 清理所有残留 sticky 样式,确保底栏始终固定在视口底部,提升用户体验
This commit is contained in:
2026-08-26 18:49:13 +08:00
parent 84c46b9312
commit 7f70052afd
12 changed files with 176 additions and 18 deletions
+51
View File
@@ -290,3 +290,54 @@ justify-content: center(居中)
background:#fff; border-top:1px solid #eff1f7; box-shadow:0 -2px 8px rgba(0,0,0,.06); gap:12px; padding:12px 24px`。 background:#fff; border-top:1px solid #eff1f7; box-shadow:0 -2px 8px rgba(0,0,0,.06); gap:12px; padding:12px 24px`。
**注意**: 之前首轮曾把这两个页「保存加 plain、返回挪到保存前面」,但当时没动 同步 的位置、没改居中/浮动,所以用户仍觉得没统一。本次彻底对齐。 **注意**: 之前首轮曾把这两个页「保存加 plain、返回挪到保存前面」,但当时没动 同步 的位置、没改居中/浮动,所以用户仍觉得没统一。本次彻底对齐。
## payment + settlement 模块底栏按钮全量统一
**背景**: 用户要求检查 payment 模块和 settlement 模块下所有页面底栏按钮是否统一。
### payment 模块(表单页 footer
| 文件 | 原状 | 修复 |
| --- | --- | --- |
| `payment/bill-ledger-form.vue` | `[确认 primary][取消 default]` + 居中 | `[取消 default][确认 primary]`footer flex-end + sticky 浮动 |
| `payment/bill-payment-form.vue` | `[保存 primary][提交 primary][取消 default]` | `[取消 default][保存 plain][提交 primary]`footer 加 sticky 浮动(已 flex-end |
| `payment/receipt-flow-form.vue` | `[确认 primary][取消 default]` + 居中(class 误用 `receipt-claim-form-page__actions` | `[取消 default][确认 primary]`footer flex-end + sticky 浮动 |
| `payment/receipt-claim-record-form.vue` | 单「关闭」按钮居中 | footer flex-end + sticky 浮动 |
| (此前已改)invoice/payment-application 各表单页 | — | 已合规 |
### settlement 模块
| 文件 | 原状 | 修复 |
| --- | --- | --- |
| `settlement/components/pre-settlement-editor.vue` | 两处 footer `[取消][保存 default][提交]`(弹窗 + pageMode | 保存加 `type="primary" plain``&__page-actions` 加 sticky 浮动 |
| `settlement/components/formal-settlement-editor.vue` | footer 已 `[取消][提交]` 合规,独立页未浮动 | `.formal-editor__page-actions` 加 sticky 浮动 |
| `settlement/receivable-payable-detail.vue` | 生成费用弹窗 `[取消][上一步 primary][提交 primary]` | 上一步改 `type="primary" plain` |
| (已合规未动)`transport-reconciliation-editor.vue` | `[取消][保存草稿 plain][按匹配结果更新账单 plain][完成对账 primary]` | 已符合次→主 |
| (已合规未动)`settlement-adjustment-editor.vue` | 弹窗 `[取消][保存 primary]` | 合规 |
**注意**: settlement 的 `*_editor.vue` 多为「弹窗(!pageMode) + 独立页(pageMode)」双模式;弹窗 footer 走 `.el-dialog__footer` 全局规则(已右对齐/浮动),仅 pageMode 的 `.xxx__page-actions` 需手动加 sticky。
**注意**: payment 表单页剩余的 `justify-content: center` 全在 `__links` 链接行(非 action footer),属正常布局,未改。
## 浮动底栏根本修复:sticky → fixed
**问题**: 用户反馈 `/settlement/formal-settlement/form?mode=add`「有些页面还没能固定在底部」。
**根因(关键)**: 之前给 9 个独立表单页 footer 写的都是 `position: sticky; bottom:0`,但本项目布局
`.app-main` / `.basic-container` 祖先带 `overflow:hidden`,sticky 的滚动容器判断失效 → footer 永不吸底。
customer-archive 当初就是因此改用 `position:fixed`,且要带侧栏左偏移。
**修复(9 个文件全部 sticky→fixed**:
- `business/components/master-order-editor.vue` `<footer>`2050 行,含 `:global(.avue--collapse footer)`/`horizontal`
- `payment/invoice-receipt-form.vue` / `bill-ledger-form.vue` / `receipt-claim-record-form.vue` /
`payment-application-form.vue` / `bill-payment-form.vue` / `invoice-application-form.vue` / `receipt-flow-form.vue`
各 `__actions`(均加 fixed + `:global(.avue--collapse .xxx)`/`horizontal` 左偏移 60px/0
- `settlement/components/pre-settlement-editor.vue` `&__page-actions`nested,全局覆盖放 style 末尾)
- `settlement/components/formal-settlement-editor.vue` `.formal-editor__page-actions`(上一轮已改 fixed,本轮复核确认)
**统一 fixed 模板**:
```scss
.xxx { position: fixed; right:0; left:230px; bottom:0; margin:0; z-index:10; flex-end + padding + border-top + 白底 + 上投影 }
:global(.avue--collapse .xxx) { left:60px; }
:global(.avue-layout--horizontal .xxx) { left:0; }
```
注意 `:global()` 要包整个选择器(customer-archive 写法),只包前缀会让 scoped 在中间选择器追加 data 属性而不匹配。
**验证**: 全仓 `position: sticky` 已清零(grep 无残留)。
+25 -8
View File
@@ -40,6 +40,16 @@
- **排序**:从左到右按次→主排(次要居左、主操作居右),主操作永远放最后。 - **排序**:从左到右按次→主排(次要居左、主操作居右),主操作永远放最后。
- 顺序模板:`[可选辅助工具(如同步/导入)][返回/取消][保存草稿][提交/确认]` - 顺序模板:`[可选辅助工具(如同步/导入)][返回/取消][保存草稿][提交/确认]`
- **容器布局**`display:flex; justify-content:flex-end; gap:12px;`。弹窗关闭按钮继承 Element Plus 自带 `.el-dialog__footer` 全局规则(见上条),独立页用 `.archive-form__footer``.archive-page-form & { position:fixed; right:0; left:230px; bottom:0; z-index:10; margin:0; padding:12px 24px; border-top:1px solid #eff1f7; background:#fff; box-shadow:0 -2px 8px rgba(0,0,0,.06); }` - **容器布局**`display:flex; justify-content:flex-end; gap:12px;`。弹窗关闭按钮继承 Element Plus 自带 `.el-dialog__footer` 全局规则(见上条),独立页用 `.archive-form__footer``.archive-page-form & { position:fixed; right:0; left:230px; bottom:0; z-index:10; margin:0; padding:12px 24px; border-top:1px solid #eff1f7; background:#fff; box-shadow:0 -2px 8px rgba(0,0,0,.06); }`
- **⚠️ 浮动底部必须用 `position:fixed`,不能用 `position:sticky`**:本项目布局 `.app-main` / `.basic-container` 祖先带 `overflow:hidden`,会导致 `sticky` 永不触发(footer 不吸底)。固定写法照搬 customer-archive
```scss
.xxx-actions {
position: fixed; right: 0; left: 230px; bottom: 0; margin: 0; z-index: 10;
/* flex-end + padding + border-top + 白底 + 上投影 */
}
:global(.avue--collapse .xxx-actions) { left: 60px; } /* 侧栏折叠 */
:global(.avue-layout--horizontal .xxx-actions) { left: 0; } /* 横向布局 */
```
注意 `:global()` 要把「整个选择器」包进去(customer-archive 写法),不要只包前缀,否则 scoped 会在中间选择器上追加 data 属性导致不匹配。
- **颜色层级 3 档** - **颜色层级 3 档**
| 语义 | type | 备注 | | 语义 | type | 备注 |
| --- | --- | --- | | --- | --- | --- |
@@ -49,16 +59,23 @@
- **禁区** - **禁区**
- 保存草稿和主操作不允许同为 `type="primary"`,否则两个蓝实心无视觉层级。 - 保存草稿和主操作不允许同为 `type="primary"`,否则两个蓝实心无视觉层级。
- 主操作禁止用 `type="success"`(绿)。全站统一深蓝实心。 - 主操作禁止用 `type="success"`(绿)。全站统一深蓝实心。
- **生效页面** - **生效页面(已按规则统一)**
- `business/project-apply.vue`footer + 变更 footer - `business/project-apply.vue`footer + 变更 footer
- `payment/invoice-receipt-form.vue``payment/invoice-application-form.vue`
- `vehicle/customer-archive.vue` 全部 5 处 footer`archive-form__footer` 主表单页 + `contact-dialog`/`receipt-dialog`/`invoice-dialog` 子弹窗 + `score-detail-dialog` 含总分合计) - `vehicle/customer-archive.vue` 全部 5 处 footer`archive-form__footer` 主表单页 + `contact-dialog`/`receipt-dialog`/`invoice-dialog` 子弹窗 + `score-detail-dialog` 含总分合计)
- `business/components/business-crud-page.vue` 的 PageAvueForm 独立表单页(`#menu-form-before` slot 新增 `关闭` 按钮,紧跟运费合计、置于保存草稿之前;shipping-template 模式验证通过) - `business/components/business-crud-page.vue` 的 PageAvueForm 独立表单页(`#menu-form-before` slot 新增 `关闭` 按钮,shipping-template 模式验证通过)
- `business/components/master-order-editor.vue``<footer>`(返回 default + 暂存/确认创建 plain + 创建并调度 primaryfooter 用 `position:sticky; bottom:0` 浮动底部 - `business/components/master-order-editor.vue` 主 `<footer>`(返回 default + 暂存/确认创建 plain + 创建并调度 primary`position:fixed` 浮动,含 `avue--collapse`/`avue-layout--horizontal` 左偏移
- `payment/payment-application-form.vue` `.payment-form-page__actions`(返回 default + 保存 plain + 提交 primaryfooter `justify-content:flex-end` + `position:sticky` 浮动底部) - **payment 模块**表单页(`__actions` 均 `flex-end` + `position:fixed` 浮动,含 `avue--collapse`/`avue-layout--horizontal` 左偏移):
- `payment/invoice-application-form.vue` `.invoice-form-page__actions``[返回][同步][保存][提交]`,返回置首 + 提交深蓝;footer 右对齐浮动 - `payment-application-form.vue``[返回][保存 plain][提交]`
- `payment/invoice-receipt-form.vue` `.receipt-form-page__actions`(同上,与发票申请同款结构 - `invoice-application-form.vue` / `invoice-receipt-form.vue``[返回][同步 plain][保存 plain][提交]`
- **已合规未动**`settlement/components/pre-settlement-editor.vue``settlement/components/transport-reconciliation-editor.vue``business/temporary-credit-limit.vue` - `bill-ledger-form.vue``[取消][确认 primary]`
- `bill-payment-form.vue``[取消][保存 plain][提交]`
- `receipt-flow-form.vue``[取消][确认 primary]`
- `receipt-claim-record-form.vue`(单「关闭」按钮,居中→右对齐浮动)
- **settlement 模块**
- `settlement/components/pre-settlement-editor.vue`(弹窗 + pageMode 两处 footer:保存加 `plain``&__page-actions` 加 `position:fixed` 浮动,含 `avue--collapse`/`avue-layout--horizontal` 左偏移)
- `settlement/components/formal-settlement-editor.vue``.formal-editor__page-actions` 加 `position:fixed` 浮动,含 `avue--collapse`/`avue-layout--horizontal` 左偏移;按钮已 `[取消][提交]` 合规)
- `settlement/receivable-payable-detail.vue`(生成费用弹窗「上一步」改 `plain`
- **已合规未动**`settlement/components/transport-reconciliation-editor.vue``[取消][保存草稿 plain][按匹配结果更新账单 plain][完成对账 primary]`)、`settlement/components/settlement-adjustment-editor.vue`(弹窗 `[取消][保存 primary]`)、`business/temporary-credit-limit.vue`。
- **Avue-form footer 结构注意**`#menu-form-before` slot 内容在 Avue 内置按钮之**左**;`#menu-form` slot 在 Avue 内置按钮之**右**。要实现 `[次要][Avue 主操作]` 顺序,把次要按钮放进 `#menu-form-before`,主操作保留 Avue 内置即可。 - **Avue-form footer 结构注意**`#menu-form-before` slot 内容在 Avue 内置按钮之**左**;`#menu-form` slot 在 Avue 内置按钮之**右**。要实现 `[次要][Avue 主操作]` 顺序,把次要按钮放进 `#menu-form-before`,主操作保留 Avue 内置即可。
- **复杂 footer 例外**:当 footer 需要在按钮组左侧展示「总分合计 / 数量统计」等聚合信息时,块用 `flex:1` 推自己到最左,按钮组按上述规则排在右半边(参考 `score-detail-dialog`)。 - **复杂 footer 例外**:当 footer 需要在按钮组左侧展示「总分合计 / 数量统计」等聚合信息时,块用 `flex:1` 推自己到最左,按钮组按上述规则排在右半边(参考 `score-detail-dialog`)。
@@ -2052,11 +2052,20 @@ footer {
justify-content: flex-end; justify-content: flex-end;
gap: 12px; gap: 12px;
padding: 12px 24px; padding: 12px 24px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
margin: 0;
z-index: 10; z-index: 10;
background: #fff; background: #fff;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
} }
:global(.avue--collapse footer) {
left: 60px;
}
:global(.avue-layout--horizontal footer) {
left: 0;
}
</style> </style>
+10 -1
View File
@@ -594,13 +594,22 @@ export default {
justify-content: flex-end; justify-content: flex-end;
gap: 12px; gap: 12px;
padding: 12px 24px; padding: 12px 24px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
margin: 0;
z-index: 10; z-index: 10;
background: #fff; background: #fff;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
} }
:global(.avue--collapse .bill-ledger-form-page__actions) {
left: 60px;
}
:global(.avue-layout--horizontal .bill-ledger-form-page__actions) {
left: 0;
}
.bill-ledger-form-page :deep(.el-table) { .bill-ledger-form-page :deep(.el-table) {
--el-table-border-color: #eff1f7; --el-table-border-color: #eff1f7;
} }
+10 -1
View File
@@ -401,13 +401,22 @@ export default {
justify-content: flex-end; justify-content: flex-end;
gap: 12px; gap: 12px;
padding: 12px 24px; padding: 12px 24px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
margin: 0;
z-index: 10; z-index: 10;
background: #fff; background: #fff;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
} }
:global(.avue--collapse .bill-payment-form-page__actions) {
left: 60px;
}
:global(.avue-layout--horizontal .bill-payment-form-page__actions) {
left: 0;
}
.bill-payment-form-page__dialog-search { .bill-payment-form-page__dialog-search {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
+10 -1
View File
@@ -982,13 +982,22 @@ export default {
justify-content: flex-end; justify-content: flex-end;
gap: 12px; gap: 12px;
padding: 12px 24px; padding: 12px 24px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
margin: 0;
z-index: 10; z-index: 10;
background: #fff; background: #fff;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
} }
:global(.avue--collapse .invoice-form-page__actions) {
left: 60px;
}
:global(.avue-layout--horizontal .invoice-form-page__actions) {
left: 0;
}
.invoice-form-page__attachment-upload { .invoice-form-page__attachment-upload {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
+10 -1
View File
@@ -779,13 +779,22 @@ export default {
justify-content: flex-end; justify-content: flex-end;
gap: 12px; gap: 12px;
padding: 12px 24px; padding: 12px 24px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
margin: 0;
z-index: 10; z-index: 10;
background: #fff; background: #fff;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
} }
:global(.avue--collapse .receipt-form-page__actions) {
left: 60px;
}
:global(.avue-layout--horizontal .receipt-form-page__actions) {
left: 0;
}
.receipt-form-page__dialog-search { .receipt-form-page__dialog-search {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
+10 -1
View File
@@ -1285,13 +1285,22 @@ export default {
justify-content: flex-end; justify-content: flex-end;
gap: 12px; gap: 12px;
padding: 12px 24px; padding: 12px 24px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
margin: 0;
z-index: 10; z-index: 10;
background: #fff; background: #fff;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
} }
:global(.avue--collapse .payment-form-page__actions) {
left: 60px;
}
:global(.avue-layout--horizontal .payment-form-page__actions) {
left: 0;
}
.payment-form-page__section-actions { .payment-form-page__section-actions {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
@@ -315,13 +315,22 @@ export default {
justify-content: flex-end; justify-content: flex-end;
gap: 12px; gap: 12px;
padding: 12px 24px; padding: 12px 24px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
margin: 0;
z-index: 10; z-index: 10;
background: #fff; background: #fff;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
} }
:global(.avue--collapse .claim-record-form-page__actions) {
left: 60px;
}
:global(.avue-layout--horizontal .claim-record-form-page__actions) {
left: 0;
}
.claim-record-form-page__links { .claim-record-form-page__links {
display: flex; display: flex;
justify-content: center; justify-content: center;
+10 -1
View File
@@ -474,13 +474,22 @@ export default {
justify-content: flex-end; justify-content: flex-end;
gap: 12px; gap: 12px;
padding: 12px 24px; padding: 12px 24px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
margin: 0;
z-index: 10; z-index: 10;
background: #fff; background: #fff;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
} }
:global(.avue--collapse .receipt-claim-form-page__actions) {
left: 60px;
}
:global(.avue-layout--horizontal .receipt-claim-form-page__actions) {
left: 0;
}
.receipt-claim-form-page__dialog-search { .receipt-claim-form-page__dialog-search {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
@@ -1549,12 +1549,21 @@ export default {
padding: 12px 24px; padding: 12px 24px;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
gap: 12px; gap: 12px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
z-index: 10; z-index: 10;
margin: 0;
background: #fff; background: #fff;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
} }
:global(.avue--collapse) .formal-editor__page-actions {
left: 60px;
}
:global(.avue-layout--horizontal) .formal-editor__page-actions {
left: 0;
}
.formal-editor__links { .formal-editor__links {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@@ -1532,8 +1532,11 @@ export default {
padding: 12px 24px; padding: 12px 24px;
border-top: 1px solid #eff1f7; border-top: 1px solid #eff1f7;
gap: 12px; gap: 12px;
position: sticky; position: fixed;
right: 0;
left: 230px;
bottom: 0; bottom: 0;
margin: 0;
z-index: 10; z-index: 10;
background: #fff; background: #fff;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
@@ -1651,4 +1654,10 @@ export default {
:deep(.pre-settlement-candidate-dialog .el-table__body tr:nth-child(even) > td.el-table__cell) { :deep(.pre-settlement-candidate-dialog .el-table__body tr:nth-child(even) > td.el-table__cell) {
background: #fafafa; background: #fafafa;
} }
:global(.avue--collapse .pre-settlement-editor__page-actions) {
left: 60px;
}
:global(.avue-layout--horizontal .pre-settlement-editor__page-actions) {
left: 0;
}
</style> </style>