Преглед изворни кода

fix:5611【销售订单-库存式订单】添加产品第一页勾选并填写 了数量,到下一页填写点击确定,之前的分页内容被清空了

mlchen пре 3 недеља
родитељ
комит
8e0f9872aa
1 измењених фајлова са 6 додато и 5 уклоњено
  1. 6 5
      src/BIZComponents/selectStockLedger/selectStockLedgerDialog.vue

+ 6 - 5
src/BIZComponents/selectStockLedger/selectStockLedgerDialog.vue

@@ -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) {