Compare commits
1 Commits
main
...
fix/limeng
| Author | SHA1 | Date | |
|---|---|---|---|
| 22f42e1166 |
@ -797,15 +797,15 @@
|
||||
<table class="quote-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">报价版本</th>
|
||||
<th scope="col">快递公司</th>
|
||||
<th scope="col">报价类型</th>
|
||||
<th scope="col">原始范围</th>
|
||||
<th scope="col">数据规模</th>
|
||||
<th scope="col">执行日期</th>
|
||||
<th scope="col">签章</th>
|
||||
<th scope="col">资料状态</th>
|
||||
<th scope="col">操作</th>
|
||||
<th scope="col" data-finance-column-key="报价版本_0">报价版本</th>
|
||||
<th scope="col" data-finance-column-key="快递公司_1">快递公司</th>
|
||||
<th scope="col" data-finance-column-key="报价类型_2">报价类型</th>
|
||||
<th scope="col" data-finance-column-key="原始范围_3">原始范围</th>
|
||||
<th scope="col" data-finance-column-key="数据规模_4">数据规模</th>
|
||||
<th scope="col" data-finance-column-key="执行日期_5">执行日期</th>
|
||||
<th scope="col" data-finance-column-key="签章_6">签章</th>
|
||||
<th scope="col" data-finance-column-key="资料状态_7">资料状态</th>
|
||||
<th scope="col" data-finance-column-key="操作_8">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-quote-table-body></tbody>
|
||||
@ -1080,6 +1080,19 @@
|
||||
if (quote.status !== '已作废') {
|
||||
actionCell.appendChild(changeAction);
|
||||
}
|
||||
// 动态重建行时按字段键对应当前表头,保留用户列顺序与隐藏设置。
|
||||
var columnKeys = ['报价版本_0', '快递公司_1', '报价类型_2', '原始范围_3', '数据规模_4', '执行日期_5', '签章_6', '资料状态_7', '操作_8'];
|
||||
var cellsByKey = {};
|
||||
Array.from(row.children).forEach(function (cell, index) {
|
||||
cell.dataset.financeColumnKey = columnKeys[index];
|
||||
cellsByKey[columnKeys[index]] = cell;
|
||||
});
|
||||
body.closest('table').querySelectorAll('thead th[data-finance-column-key]').forEach(function (header) {
|
||||
var cell = cellsByKey[header.dataset.financeColumnKey];
|
||||
if (!cell) return;
|
||||
cell.classList.toggle('is-column-hidden', header.classList.contains('is-column-hidden'));
|
||||
row.appendChild(cell);
|
||||
});
|
||||
return row;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user