祁鹏飞 3 месяцев назад
Родитель
Сommit
89264c1dde
1 измененных файлов с 23 добавлено и 5 удалено
  1. 23 5
      src/views/receivable/documentary/index.vue

+ 23 - 5
src/views/receivable/documentary/index.vue

@@ -561,6 +561,8 @@ let ReceiveDataRef1 = ref()
 let ReceiveDataRef2 = ref()
 // 选中的数据
 let selectedList = ref([])
+let allData = ref([])
+
 // 全选的类型
 let selectType = ref('')
 // 外部全选是否勾选
@@ -597,7 +599,7 @@ const selectTypeChange = (type) => {
   if (type == 'cur') {
     selectedList.value = receiveData.value
   } else {
-    selectedList.value = receiveData.value
+    selectedList.value = allData.value
   }
 }
 // 编辑
@@ -909,8 +911,16 @@ const getOtherReceivableList = () => {
     pageSize: size.value
   }).then((res: any) => {
     if (res.code == 200) {
-      receiveData.value = res.data.records
-      total1.value = res.data.total
+      receiveData.value = res.data.insPlyIncomePage.records
+      allData.value = res.data.insPlyIncomeOrders
+      total1.value = res.data.insPlyIncomePage.total
+      receiveData.value.forEach(element => {
+        if (selectedList.value.find(v => v.id === element.id)) {
+          nextTick(() => {
+            ReceiveDataRef1.value!.toggleRowSelection(element, true)
+          })
+        }
+      });
     }
   })
 }
@@ -941,8 +951,16 @@ const getJyOtherReceivableList = () => {
     pageSize: size.value
   }).then((res: any) => {
     if (res.code == 200) {
-      receiveData.value = res.data.records
-      total2.value = res.data.total
+      receiveData.value = res.data.insPlyIncomePage.records
+      allData.value = res.data.insPlyIncomeOrders
+      total2.value = res.data.insPlyIncomePage.total
+      receiveData.value.forEach(element => {
+        if (selectedList.value.find(v => v.id === element.id)) {
+          nextTick(() => {
+            ReceiveDataRef2.value!.toggleRowSelection(element, true)
+          })
+        }
+      });
     }
   })
 }