Sfoglia il codice sorgente

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

xieyong 3 settimane fa
parent
commit
86e4ef63c7

+ 10 - 0
src/views/saleManage/saleOrder/accountstatement/components/orderListDialog.vue

@@ -64,6 +64,8 @@ export default {
     return {
       visible: false,
       currentIndex: null,
+      current: null,
+      pageList: new Map(),
       columns: [
         {
           columnKey: 'index',
@@ -201,6 +203,8 @@ export default {
       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;
@@ -218,6 +222,12 @@ export default {
         pageNum: page,
         size: limit,
         ...where
+      }).then(res => {
+        console.log(res);
+        if(!this.pageList.has(page)) {
+          this.pageList.set(page, res?.list || []);
+        }
+        return res;
       });
     },