diff --git a/yuthon_report/static/src/components/yuthon_report/receivable_report.js b/yuthon_report/static/src/components/yuthon_report/receivable_report.js index b27f124da..a804cd234 100644 --- a/yuthon_report/static/src/components/yuthon_report/receivable_report.js +++ b/yuthon_report/static/src/components/yuthon_report/receivable_report.js @@ -221,6 +221,13 @@ class ReceivableReport extends Component { orm: this.serviceOrm, // 传递 orm 用于调用模型方法 }, onFilterChanged: () => { + // 仅当行数据带 row_type(应收流水那种 合同/收款 分层报表)才按过滤结果重排序号; + // 其他复用本组件的报表行数据没有 row_type,直接跳过,保留后端返回的序号 + let hasRowType = false; + this.grid.forEachNode((node) => { + if (node.data && node.data.row_type) hasRowType = true; + }); + if (!hasRowType) return; // 过滤后重新编号序号列(仅合同头行编号) let num = 1; this.grid.forEachNodeAfterFilter((node) => {