🐛 修复预付驳回重提、预结算变更记录与收票多选结算单
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -241,7 +241,12 @@
|
||||
<div
|
||||
class="settlement-detail-page__detail-panel-body settlement-detail-page__adjust-panel-body"
|
||||
>
|
||||
<el-table v-loading="adjustDialog.loading" :data="adjustRows" border>
|
||||
<el-table
|
||||
v-loading="adjustDialog.loading"
|
||||
:data="adjustRows"
|
||||
:max-height="adjustTableMaxHeight"
|
||||
border
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||
<el-table-column label="来源" width="110" align="center">
|
||||
<template #default="{ row }">{{ feeSourceLabel(row.dataSource) }}</template>
|
||||
@@ -1115,6 +1120,8 @@ export default {
|
||||
page: { current: 1, size: 10, total: 0 },
|
||||
// 底部详情/调整面板打开时压缩主表高度,露出表格滚动条
|
||||
listTableHeight: undefined,
|
||||
savedListTableHeight: null,
|
||||
listTableLayoutToken: 0,
|
||||
detailDialog: {
|
||||
visible: false,
|
||||
title: '费用明细',
|
||||
@@ -1129,6 +1136,8 @@ export default {
|
||||
rule: null,
|
||||
},
|
||||
adjustDialog: { visible: false, loading: false, submitting: false, row: null },
|
||||
// 表头 + 最多 3 行费用 + 横向滚动条,超出后表体上下滚动
|
||||
adjustTableMaxHeight: 40 + 49 * 3 + 16,
|
||||
adjustRows: [],
|
||||
adjustDynamicFeeColumns: [],
|
||||
adjustTextProps: ['specification', 'model', 'billingFactor', 'billingType'],
|
||||
@@ -1330,8 +1339,11 @@ export default {
|
||||
'$route.fullPath'() {
|
||||
this.openRouteDetail();
|
||||
},
|
||||
isBottomPanelOpen() {
|
||||
this.updateListTableHeight();
|
||||
isBottomPanelOpen: {
|
||||
flush: 'post',
|
||||
handler() {
|
||||
this.updateListTableHeight();
|
||||
},
|
||||
},
|
||||
searchVisible() {
|
||||
this.updateListTableHeight();
|
||||
@@ -1396,36 +1408,62 @@ export default {
|
||||
},
|
||||
/** 表格和分页撑满剩余可视区域;单据详情展开时贴住详情面板,关闭后恢复 */
|
||||
updateListTableHeight() {
|
||||
this.listTableLayoutToken = (this.listTableLayoutToken || 0) + 1;
|
||||
const token = this.listTableLayoutToken;
|
||||
this.$nextTick(() => {
|
||||
window.requestAnimationFrame(() => this.applyListTableHeight());
|
||||
window.requestAnimationFrame(() => {
|
||||
if (token !== this.listTableLayoutToken) return;
|
||||
this.applyListTableHeight(token);
|
||||
window.requestAnimationFrame(() => {
|
||||
if (token !== this.listTableLayoutToken) return;
|
||||
this.applyListTableHeight(token);
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
applyListTableHeight() {
|
||||
applyListTableHeight(token = this.listTableLayoutToken) {
|
||||
if (token !== this.listTableLayoutToken) return;
|
||||
const tableElement = this.$refs.mainTableRef?.$el;
|
||||
if (!tableElement) return;
|
||||
const pagination = this.$el?.querySelector?.('.settlement-detail-page__pagination');
|
||||
const pagination = this.$el?.querySelector?.(
|
||||
'.settlement-detail-page__table-panel .settlement-detail-page__pagination'
|
||||
);
|
||||
const paginationHeight = pagination?.offsetHeight || 0;
|
||||
const tableTop = tableElement.getBoundingClientRect().top;
|
||||
const view = this.$el?.closest?.('#avue-view');
|
||||
const viewRect = view?.getBoundingClientRect?.();
|
||||
let bottomEdge = viewRect ? viewRect.bottom - 12 : window.innerHeight;
|
||||
if (this.isBottomPanelOpen) {
|
||||
// 用滚动容器的可视高度,避免表格被压矮后按内容底部把高度锁死
|
||||
let bottomEdge = view
|
||||
? viewRect.top + view.clientHeight - 12
|
||||
: window.innerHeight;
|
||||
const panelOpen = this.isBottomPanelOpen;
|
||||
if (panelOpen) {
|
||||
if (!this.savedListTableHeight) {
|
||||
this.savedListTableHeight = this.listTableHeight || null;
|
||||
}
|
||||
const panelRect = document
|
||||
.querySelector('.settlement-detail-page__detail-panel')
|
||||
?.getBoundingClientRect?.();
|
||||
if (panelRect && panelRect.height > 0) {
|
||||
bottomEdge = panelRect.top;
|
||||
bottomEdge = Math.min(bottomEdge, panelRect.top);
|
||||
this.listTableHeightRetry = 0;
|
||||
} else if ((this.listTableHeightRetry || 0) < 5) {
|
||||
this.listTableHeightRetry = (this.listTableHeightRetry || 0) + 1;
|
||||
window.requestAnimationFrame(() => this.applyListTableHeight());
|
||||
window.requestAnimationFrame(() => this.applyListTableHeight(token));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.listTableHeightRetry = 0;
|
||||
}
|
||||
const gap = this.isBottomPanelOpen ? 8 : 0;
|
||||
this.listTableHeight = Math.max(180, Math.floor(bottomEdge - tableTop - paginationHeight - gap));
|
||||
const gap = panelOpen ? 8 : 0;
|
||||
let nextHeight = Math.max(180, Math.floor(bottomEdge - tableTop - paginationHeight - gap));
|
||||
if (!panelOpen && this.savedListTableHeight) {
|
||||
if (nextHeight + 24 < this.savedListTableHeight) {
|
||||
nextHeight = this.savedListTableHeight;
|
||||
}
|
||||
this.savedListTableHeight = null;
|
||||
}
|
||||
this.listTableHeight = nextHeight;
|
||||
this.$nextTick(() => this.$refs.mainTableRef?.doLayout?.());
|
||||
},
|
||||
contractCategoryName(value) {
|
||||
@@ -1858,11 +1896,13 @@ export default {
|
||||
this.changeRecordsDialog.visible = false;
|
||||
this.billingRuleDialog.visible = false;
|
||||
this.billingRuleDialog.rule = null;
|
||||
this.updateListTableHeight();
|
||||
},
|
||||
closeAdjustPanel() {
|
||||
this.clearAdjustCalculations();
|
||||
this.adjustDialog.visible = false;
|
||||
this.adjustDialog.row = null;
|
||||
this.updateListTableHeight();
|
||||
},
|
||||
handleTableLink(row, column) {
|
||||
if (column.prop === 'waybillNo') {
|
||||
@@ -2446,7 +2486,8 @@ export default {
|
||||
return;
|
||||
}
|
||||
const options = this.syncBillingPlanOptions(contractId);
|
||||
const selected = options.find(item => item.defaultPlan) || options[0];
|
||||
const defaultOptions = options.filter(item => item.defaultPlan);
|
||||
const selected = defaultOptions[defaultOptions.length - 1] || options[options.length - 1];
|
||||
this.updateFeeForm.billingPlanId = selected?.id || '';
|
||||
},
|
||||
async confirmUpdateFee() {
|
||||
@@ -3333,6 +3374,7 @@ export default {
|
||||
|
||||
.settlement-detail-page__adjust-panel-body {
|
||||
padding-top: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.settlement-detail-page__billing-rule-cell {
|
||||
|
||||
Reference in New Issue
Block a user