|
|
@@ -204,9 +204,8 @@
|
|
|
type: 'selection',
|
|
|
columnKey: 'selection',
|
|
|
align: 'center',
|
|
|
- // 不保留勾选:搜索、切换分页/排序后必须清空历史勾选的库存,
|
|
|
- // reserveSelection 会让 el-table 在数据变化后按 rowKey 恢复勾选,这里必须关闭
|
|
|
- reserveSelection: false,
|
|
|
+ // 分页切换后保留已勾选的库存,确认时可以一次提交多页选择
|
|
|
+ reserveSelection: true,
|
|
|
selectable: (row) => {
|
|
|
return this.getAvailableStockCount(row) != 0;
|
|
|
}
|
|
|
@@ -485,9 +484,11 @@
|
|
|
this.$refs.table.reload({ pageNum: 1, where: where });
|
|
|
},
|
|
|
|
|
|
- /* 表格数据加载完成:分页、排序等表格内部触发的加载同样清空历史勾选 */
|
|
|
+ /* 分页、排序后清除当前行,避免解锁操作误用上一页数据,但保留跨页勾选 */
|
|
|
handleTableDone() {
|
|
|
- this.clearTableSelection();
|
|
|
+ this.currentRow = null;
|
|
|
+ this.current = null;
|
|
|
+ this.radio = '';
|
|
|
},
|
|
|
|
|
|
handleNodeClick(data, node) {
|