Przeglądaj źródła

个贷待办最新备注查询优化

wucl 3 dni temu
rodzic
commit
cd9959bbbc

+ 9 - 0
src/api/workflowLog.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+/*
+* 工作流日志
+*/
+
+// 个贷获取最新备注
+export function queryLastComments(params) {
+  return request.post(`workFlowLog/comments`, { businessIds: params })
+}

+ 18 - 0
src/views/home/todo.vue

@@ -193,6 +193,7 @@ import { assetsCheckPage, majorCheckPage } from '@/api/commissonDeclare';
 import { getTodoTotalNum } from '@/api/workNodeTaskRecord';
 import { mapStores } from 'pinia';
 import { menuStore } from '@/stores/menuStore';
+import { queryLastComments } from '@/api/workflowLog'
 
 export default {
   data() {
@@ -345,6 +346,8 @@ export default {
         if (res.code == 200) {
           if (res.data.records) {
             this.personalListData = this.personalListData.concat(res.data.records);
+            const businessIds = res.data.records.map(item=>item.businessId)
+            this.queryPersonalComments(businessIds);
           }
           // 判断是否还有下一页
           if (res.data.pages > this.personalListQuery.current) {
@@ -664,6 +667,21 @@ export default {
     toMajorDeclDetail(item) {
       this.$router.push(`/index/commissonDeclare/major/declareDetail?businessId=${item.businessId}&businessType=${item.businessType}&couldEdit=${true}`);
     },
+
+    // 个贷获取最新备注
+    queryPersonalComments(businessIds){
+      queryLastComments(businessIds).then(res=>{
+          if (res.code === 200){
+              for (let i in this.personalListData){
+                  for (let j in res.data){
+                      if (this.personalListData[i].businessId == res.data[j].id){
+                        this.personalListData[i].comments = res.data[j].comments;
+                      }
+                  }
+              }
+          }
+      })
+    }
   },
 };
 </script>

+ 27 - 0
src/views/personal/pendingOrder.vue

@@ -26,6 +26,12 @@
             <van-tag type="success" size="medium" class="van-tag">{{ item.handlerName }}</van-tag>
             <van-tag color="#969799" size="medium" class="van-tag">{{ item.created }}</van-tag>
           </div>
+          <div class="comments">
+              <div>
+                <van-icon name="notes-o" />
+                {{ item.comments ? item.comments : '-' }}
+              </div>
+            </div>
         </div>
       </van-list>
     </van-pull-refresh>
@@ -35,6 +41,7 @@
 
 <script>
 import { pendingOrder } from '@/api/personal';
+import { queryLastComments } from '@/api/workflowLog'
 
 export default {
   data() {
@@ -75,6 +82,8 @@ export default {
         if (res.code == 200) {
           if (res.data.records) {
             this.listData = this.listData.concat(res.data.records);
+            const businessIds = res.data.records.map(item=>item.id)
+            this.queryPersonalComments(businessIds);
           }
           // 判断是否还有下一页
           if (res.data.pages > this.listQuery.current) {
@@ -117,6 +126,20 @@ export default {
         },
       });
     },
+     // 个贷获取最新备注
+     queryPersonalComments(businessIds){
+      queryLastComments(businessIds).then(res=>{
+          if (res.code === 200){
+              for (let i in this.listData){
+                  for (let j in res.data){
+                      if (this.listData[i].id == res.data[j].id){
+                        this.listData[i].comments = res.data[j].comments;
+                      }
+                  }
+              }
+          }
+      })
+    }
   },
 };
 </script>
@@ -151,4 +174,8 @@ export default {
 .clientInfo {
   margin-bottom: 5px;
 }
+.comments {
+  margin-bottom: 5px;
+  color: darkgrey;
+}
 </style>