From d21d7dd23f15a0ca395a4c9d1b3bb31330ff56c0 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期三, 30 九月 2026 11:27:37 +0800
Subject: [PATCH] 专家费校验

---
 src/views/project/fundcheck/officeExpenseCheck/index.vue |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/views/project/fundcheck/officeExpenseCheck/index.vue b/src/views/project/fundcheck/officeExpenseCheck/index.vue
index 45b6ac6..e048953 100644
--- a/src/views/project/fundcheck/officeExpenseCheck/index.vue
+++ b/src/views/project/fundcheck/officeExpenseCheck/index.vue
@@ -499,6 +499,7 @@
 import { listDept } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import { setItem, grtItem, removeItem } from "@/utils/storage.js";
+import { moneySum, moneyAdd, moneySub, moneyMul, moneyRound } from "@/utils/money";
 
 export default {
   components: {
@@ -1448,41 +1449,40 @@
       // });
     },
 
-    //璁$畻鎬婚噾棰�
+    //璁$畻鎬婚噾棰濓紙閲戦涓�寰嬭蛋绮剧‘杩愮畻锛岀姝� parseFloat 绱姞锛�
     sumTotalFee() {
-      let allSum = 0;
+      const detailsArr = [];
       if (this.form.applytype != null) {
         for (let i = 0; i < this.fundDetailArr.length; i++) {
+          const detail = this.fundDetailArr[i];
           let totalFee = 0;
           let taxFee = 0;
           if (this.form.applytype == 1 || this.form.applytype == 2) {
-            //璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣
-            if (!isNaN(parseFloat(this.fundDetailArr[i].amount))) {
-              totalFee += parseFloat(this.fundDetailArr[i].amount);
-              taxFee += parseFloat(this.fundDetailArr[i].amount);
+            //璁$畻褰撳墠鎶ラ攢鍐呭璐圭敤鍚堣锛氱◣鍓� - 鎵g◣
+            if (!isNaN(parseFloat(detail.amount))) {
+              totalFee = moneyAdd(totalFee, detail.amount);
+              taxFee = moneyAdd(taxFee, detail.amount);
             }
-            if (!isNaN(parseFloat(this.fundDetailArr[i].taxamount))) {
-              totalFee -= parseFloat(this.fundDetailArr[i].taxamount);
-              taxFee -= parseFloat(this.fundDetailArr[i].taxamount);
+            if (!isNaN(parseFloat(detail.taxamount))) {
+              totalFee = moneySub(totalFee, detail.taxamount);
+              taxFee = moneySub(taxFee, detail.taxamount);
             }
           } else if (this.form.applytype == 3) {
             if (
-              !isNaN(parseFloat(this.fundDetailArr[i].price)) &&
-              !isNaN(parseFloat(this.fundDetailArr[i].quantity))
+              !isNaN(parseFloat(detail.price)) &&
+              !isNaN(parseFloat(detail.quantity))
             ) {
-              totalFee +=
-                parseFloat(this.fundDetailArr[i].price) *
-                parseFloat(this.fundDetailArr[i].quantity);
+              totalFee = moneyMul(detail.price, detail.quantity);
             }
           }
           if (!isNaN(parseFloat(taxFee))) {
-            this.fundDetailArr[i].taxedamount = taxFee.toFixed(2);
+            this.fundDetailArr[i].taxedamount = moneyRound(taxFee).toFixed(2);
           }
-          allSum += totalFee;
+          detailsArr.push(totalFee);
         }
       }
       //this.form.amountrequested = allSum.toFixed(2);
-      this.$set(this.form, "amountrequested", allSum.toFixed(2));
+      this.$set(this.form, "amountrequested", moneyRound(moneySum(detailsArr)).toFixed(2));
       //this.$forceUpdate();
     },
 

--
Gitblit v1.9.3