Quellcode durchsuchen

查询个贷最新备注接口

wucl vor 5 Tagen
Ursprung
Commit
ecf17b4ef6
2 geänderte Dateien mit 20 neuen und 2 gelöschten Zeilen
  1. 3 2
      src/api/modules/workflowLog.js
  2. 17 0
      src/views/personal/pendingList.vue

+ 3 - 2
src/api/modules/workflowLog.js

@@ -11,7 +11,8 @@ export default {
   },
   getRefuse(param1,param2){
     return request.get(`workFlowLog/refuse?businessId=${param1}&businessType=${param2}`)
+  },
+  queryLastComments(params){
+    return request.post(`workFlowLog/comments`, { businessIds: params })
   }
-
-
 }

+ 17 - 0
src/views/personal/pendingList.vue

@@ -187,6 +187,8 @@ export default {
       this.$api.personal.list(this.listQuery).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            const businessIds = res.data.records.map(item=>item.id)
+            this.queryLastComments(businessIds);
             loadingInstance.close();
         }
       })
@@ -204,6 +206,8 @@ export default {
       this.$api.personal.list(params).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;
+            const businessIds = res.data.records.map(item=>item.id)
+            this.queryLastComments(businessIds);
             loadingInstance.close();
         }
       })
@@ -302,6 +306,19 @@ export default {
             const seconds = String(now.getSeconds()).padStart(2, '0');
             return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
         },
+        queryLastComments(businessIds){
+          this.$api.workflowLog.queryLastComments(businessIds).then(res=>{
+              if (res.code === 200){
+                 for (let i in this.pageData.records){
+                      for (let j in res.data){
+                          if (this.pageData.records[i].id == res.data[j].id){
+                            this.pageData.records[i].comments = res.data[j].comments;
+                          }
+                      }
+                 }
+              }
+          })
+        }
   },
   
 }