From 5e093dcc9f4177bfd5f9ab2927914d2bf852770b Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期五, 21 八月 2026 15:45:03 +0800
Subject: [PATCH] 连续审批

---
 src/views/project/travelexpenseapply/travelexpensedetail/index.vue |   84 ++++++++++++++++++++++++++++++++++++++---
 1 files changed, 77 insertions(+), 7 deletions(-)

diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index 15873cf..4a13d16 100644
--- a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
+++ b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -1116,8 +1116,8 @@
               <!-- <el-image
                 style="width: 95%; height: 90%"
                 :src="pdfimg"
-                :preview-src-list="pdfimgsrcList" -->
-              >
+                :preview-src-list="pdfimgsrcList"
+              > -->
               <el-image
                 ref="imagePreview"
                 style="width: 95%; height: 90%"
@@ -1282,7 +1282,8 @@
   exportReimbursement,
   getdownload,
   checkfund,
-  fundSubmit
+  fundSubmit,
+  listbypowerone
 } from "@/api/project/reimbursement";
 import {
   addReimbursementdetail,
@@ -1492,6 +1493,8 @@
         flowconclusion: null,
         fundid: null
       },
+      //杩炵画瀹℃壒锛氬緟瀹℃壒鍒楄〃
+      pendingList: [],
       jurisdiction: false,
 
       //淇濆瓨鎸夐挳鎺у埗
@@ -2575,7 +2578,15 @@
       this.reset();
       this.open = true;
       const id = ids || this.ids;
-      this.checkObj.fundid = id;
+      // 閲嶇疆瀹℃壒淇℃伅锛岄伩鍏嶄笂涓�鍗曠殑瀹℃壒缁撴灉甯﹀叆涓嬩竴鍗�
+      this.checkObj = {
+        flowlevelone: null,
+        flowconclusion: null,
+        fundid: id
+      };
+
+      // 杩炵画瀹℃壒锛氬姞杞藉綋鍓嶇敤鎴风殑寰呭鎵瑰垪琛�
+      this.getPendingList();
 
       getReimbursement(id).then(response => {
         this.form = response.data;
@@ -2665,9 +2676,8 @@
         if (res.code == 200) {
           this.$modal.closeLoading();
           this.$modal.msgSuccess("鎻愪氦瀹℃牳鎴愬姛!");
-          // 鍏抽棴绐楀彛
-          this.$store.dispatch("tagsView/delView", this.$route);
-          this.$router.go(-1);
+          // 杩炵画瀹℃壒锛氳闂槸鍚︾户缁鎵逛笅涓�鍗�
+          this.continueOrExit();
         } else {
           this.$modal.closeLoading();
           if (res.msg) {
@@ -2679,6 +2689,66 @@
       });
     },
 
+    // 鑾峰彇褰撳墠鐢ㄦ埛寰呭鎵瑰垪琛紙鐢ㄤ簬杩炵画瀹℃壒锛�
+    getPendingList() {
+      listbypowerone({
+        pageNum: 1,
+        pageSize: 1000,
+        CHECKFLAG: 1
+      })
+        .then(res => {
+          this.pendingList = res.rows || [];
+        })
+        .catch(() => {
+          this.pendingList = [];
+        });
+    },
+
+    // 瀹℃壒瀹屾垚鍚庯細璇㈤棶鏄惁缁х画瀹℃壒涓嬩竴鍗�
+    continueOrExit() {
+      const list = this.pendingList || [];
+      const curId = String(this.checkObj.fundid);
+      const idx = list.findIndex(item => String(item.id) === curId);
+      let next = null;
+      if (idx > -1 && idx + 1 < list.length) {
+        next = list[idx + 1];
+      } else {
+        // 褰撳墠宸叉槸鏈綅锛堟垨浠庝腑闂村紑濮嬶級锛屽彇鍓╀綑鍒楄〃涓涓�鏉¢潪褰撳墠鍗曟嵁
+        next = list.find(item => String(item.id) !== curId) || null;
+      }
+
+      if (next) {
+        this.$confirm("瀹℃壒宸插畬鎴愶紝鏄惁缁х画瀹℃壒涓嬩竴寮犲緟瀹℃壒鍗曟嵁锛�", "鎻愮ず", {
+          confirmButtonText: "缁х画瀹℃壒",
+          cancelButtonText: "杩斿洖鍒楄〃",
+          type: "info"
+        })
+          .then(() => {
+            // 鐩存帴鍦ㄥ綋鍓嶉〉闈㈠姞杞戒笅涓�寮犲緟瀹℃壒鍗曟嵁
+            this.handleCheck(next.id);
+            // 鍚屾鏇存柊鍦板潃鏍忥紝閬垮厤鍒锋柊鍚庡洖鍒颁笂涓�鍗�
+            this.$router
+              .replace({
+                path: this.$route.path,
+                query: { id: next.id, pos: 4 }
+              })
+              .catch(() => {});
+          })
+          .catch(() => {
+            this.exitToPage();
+          });
+      } else {
+        this.$modal.msgSuccess("宸叉棤寰呭鎵瑰崟鎹紝杩斿洖鍒楄〃");
+        this.exitToPage();
+      }
+    },
+
+    // 杩斿洖鍒楄〃椤�
+    exitToPage() {
+      this.$store.dispatch("tagsView/delView", this.$route);
+      this.$router.go(-1);
+    },
+
     /** 鎻愪氦淇濆瓨鎸夐挳 */
     submitForm: debounce(function (data) {
       this.$refs["form"].validate(valid => {

--
Gitblit v1.9.3