Forráskód Böngészése

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

xieyong 3 hete
szülő
commit
b0a28de256

+ 10 - 0
src/views/purchasingManage/supplierManage/components/parentList.vue

@@ -73,6 +73,8 @@
     data() {
       return {
         visible: false,
+        current: null,
+        pageList: new Map(),
         columns: [
           {
             action: 'action',
@@ -180,6 +182,8 @@
       open(item) {
         if (item) {
           this.radio = item.id;
+          const list = [...this.pageList.values()].flat();
+          this.current = list?.find(row => row.id === item.id) || null;
         }
         this.visible = true;
       },
@@ -192,6 +196,12 @@
           type: this.classType,
           ...where,
           status: '1'
+        }).then(res => {
+          console.log(res);
+          if(!this.pageList.has(page)) {
+            this.pageList.set(page, res?.list || []);
+          }
+          return res;
         });
       },