From 0e10e10157b90002b99996914eaf1e5574924ddf Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期一, 12 十月 2026 11:15:50 +0800
Subject: [PATCH] 修改了报销校验

---
 src/views/project/fundcheck/expertFeeCheck/index.vue |   41 ++++++++++++++++++++++++++++++++---------
 1 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/src/views/project/fundcheck/expertFeeCheck/index.vue b/src/views/project/fundcheck/expertFeeCheck/index.vue
index a25bc43..9a44751 100644
--- a/src/views/project/fundcheck/expertFeeCheck/index.vue
+++ b/src/views/project/fundcheck/expertFeeCheck/index.vue
@@ -157,8 +157,8 @@
           <el-col :span="5">
             <el-form-item label="鐢宠鏃ユ湡" prop="createTime">
               <!-- <el-input v-model="form.donorno" placeholder="璇疯緭鍏ョ敵璇锋棩鏈�" /> -->
-              <el-date-picker clearable style="width: 100%" v-model="form.createTime" type="date"
-                value-format="yyyy-MM-dd HH:mm:ss" placeholder="鐢宠鏃ユ湡">
+              <el-date-picker clearable style="width: 100%" v-model="form.createTime" type="date" format="yyyy-MM-dd"
+                value-format="yyyy-MM-dd" placeholder="鐢宠鏃ユ湡">
               </el-date-picker>
             </el-form-item>
           </el-col>
@@ -397,7 +397,7 @@
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="dundcheck" v-if="dialogType == 'edit'">淇濆瓨</el-button>
+        <el-button type="primary" :loading="checkSubmitLoading" :disabled="checkSubmitLoading" @click="dundcheck" v-if="dialogType == 'edit'">淇濆瓨</el-button>
         <el-button @click="cancel">鍙栨秷</el-button>
       </div>
     </el-dialog>
@@ -421,7 +421,8 @@
   checkfund,
   listbypower,
   addFundSharedInfo,
-  TotalcalculationFn
+  TotalcalculationFn,
+  validateExpertFee
 } from "@/api/project/fund";
 import {
   onelistFunds,
@@ -494,6 +495,7 @@
   ],
   data() {
     return {
+      checkSubmitLoading: false,
       arrr2: [],
       arrr3: [],
       personlist: [],
@@ -723,6 +725,7 @@
       });
     },
     dundcheck() {
+      if (this.checkSubmitLoading) return;
       // this.$em
 
       let checkfundobj = {
@@ -738,18 +741,38 @@
         this.$modal.msgError("璇烽�夋嫨瀹℃牳缁撹!");
         return;
       }
+
+      // 瀹℃牳鈥滈�氳繃鈥濆墠锛氬厛鍋氫笓瀹跺姵鍔¤垂 9 鏉¤垂鐢ㄦ帶鍒舵牎楠岋紙涓庡悗绔嫤鎴悓鍙e緞锛�
+      if (checkfundobj.flowconclusion == 1) {
+        validateExpertFee({ id: this.form.id }).then(valid => {
+          const errors = (valid && valid.errors) || [];
+          const warnings = (valid && valid.warnings) || [];
+          if (warnings.length > 0) {
+            this.$modal.msgWarning(warnings.join("锛�"));
+          }
+          if (errors.length > 0) {
+            this.$modal.msgError("涓嶈兘瀹℃牳閫氳繃锛�" + errors.join("锛�"));
+            return;
+          }
+          this.doCheckfund(checkfundobj);
+        });
+        return;
+      }
+      // 涓嶉�氳繃锛氭棤闇�鏍¢獙闄愰
+      this.doCheckfund(checkfundobj);
+    },
+    doCheckfund(checkfundobj) {
+      this.checkSubmitLoading = true;
       checkfund(checkfundobj).then(res => {
+        this.checkSubmitLoading = false;
         if (res.code == 200) {
           this.reset();
           this.$modal.msgSuccess("瀹℃牳瀹屾垚!");
           this.getlistbypower();
           this.dialogOpen = false;
         } else {
-          if (res.msg) {
-            this.$modal.msgError("鎿嶄綔澶辫");
-          } else {
-            this.$modal.msgError(res.msg);
-          }
+          // 鍚庣杩斿洖鐨勫叿浣撳師鍥狅紙濡傝秴闄愰锛変紭鍏堝睍绀�
+          this.$modal.msgError(res.msg || "鎿嶄綔澶辫");
         }
       });
     },

--
Gitblit v1.9.3