Browse Source

fix:修复采购订单对账单重复打开订单选择列表第二次就未选中情况

xieyong 3 tuần trước cách đây
mục cha
commit
8943b9652c

+ 11 - 1
src/views/purchasingManage/purchaseOrder/accountstatement/components/orderListDialog.vue

@@ -48,6 +48,8 @@
     data() {
       return {
         visible: false,
+        current: null,
+        pageList: new Map(),
         currentIndex: null,
         columns: [
           {
@@ -166,6 +168,8 @@
         this.currentIndex = currentIndex;
         if (item && item.id) {
           this.radio = item.id;
+          const list = [...this.pageList.values()].flat();
+          this.current = list?.find(row => row.id === item.id) || null;
         }
 
         this.visible = true;
@@ -178,7 +182,13 @@
           size: limit,
           ...where,
           orderStatus:2
-        });
+        }).then(res => {
+          console.log(res);
+          if(!this.pageList.has(page)) {
+            this.pageList.set(page, res?.list || []);
+          }
+          return res;
+        })
       },
 
       /* 刷新表格 */