From 4fc9abfa57e81e83b74bdbd2e2f6d71d3500ef66 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期二, 19 九月 2023 11:26:07 +0800
Subject: [PATCH] 11

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

diff --git a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
index f59155b..b2a3e5a 100644
--- a/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
+++ b/src/views/project/travelexpenseapply/travelexpensedetail/index.vue
@@ -1090,7 +1090,8 @@
 import {
   listReimbursementpayee,
   addReimbursementpayee,
-  updateReimbursementpayee
+  updateReimbursementpayee,
+  delReimbursementpayee
 } from "@/api/project/reimbursementpayee";
 import {
   listReimbursement,
@@ -1349,8 +1350,8 @@
   },
 
   methods: {
-       // 娴忚鍣ㄩ〉闈㈠叧闂垨鍒锋柊鎻愮ず
-       beforeunloadHandler(e) {
+    // 娴忚鍣ㄩ〉闈㈠叧闂垨鍒锋柊鎻愮ず
+    beforeunloadHandler(e) {
       if (
         (JSON.stringify(this.form) == sessionStorage.getItem("apiform") &&
           JSON.stringify(this.rbDetails) ==
@@ -2188,17 +2189,15 @@
           */
 
           //绁ㄦ嵁鏂囦欢澶勭悊
+          const addnumber = this.rbPayees.reduce(
+            (amount, item) => amount + Number(item.amount),
+            0
+          );
           let list = this.fileListto;
           console.log(list);
 
           //鏍¢獙璇锋閲戦鍚堣鏄惁绛変簬鎶ラ攢鍗曢噾棰�
-          if (
-            this.form.amountrequested !=
-            this.rbPayees.reduce(
-              (amount, item) => amount + Number(item.amount),
-              0.0
-            )
-          ) {
+          if (this.form.amountrequested != addnumber) {
             this.$message({
               message:
                 "鎶ラ攢璇锋琛ㄤ腑鍚堣閲戦涓嶇瓑浜庢姤閿�鍗曠殑鎶ラ攢閲戦锛岃鏇存鍚庡啀淇濆瓨锛�",
@@ -2327,6 +2326,11 @@
       this.Savereminder = false;
       this.Reminderquantity = 0;
       this.totalquantity = 0;
+      const addnumber = this.rbPayees.reduce(
+        (amount, item) => amount + Number(item.amount),
+        0
+      );
+      console.log(addnumber, "addnumber");
       this.$refs["form"].validate(valid => {
         if (valid) {
           //绁ㄦ嵁鏂囦欢澶勭悊
@@ -2334,13 +2338,7 @@
           console.log(list);
 
           //鏍¢獙璇锋閲戦鍚堣鏄惁绛変簬鎶ラ攢鍗曢噾棰�
-          if (
-            this.form.amountrequested !=
-            this.rbPayees.reduce(
-              (amount, item) => amount + Number(item.amount),
-              0.0
-            )
-          ) {
+          if (this.form.amountrequested != addnumber) {
             this.$message({
               message:
                 "鎶ラ攢璇锋琛ㄤ腑鍚堣閲戦涓嶇瓑浜庢姤閿�鍗曠殑鎶ラ攢閲戦锛岃鏇存鍚庡啀淇濆瓨锛�",
@@ -2543,8 +2541,10 @@
       })
         .then(() => {
           console.log(row);
+          let arrow=[];
+          arrow.push(row.id);
           if (row.id !== null) {
-            delReimbursementdetail(row.id).then(res => {
+            delReimbursementpayee(arrow).then(res => {
               this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
               rows.splice(index, 1);
               this.recountOrderNo2();

--
Gitblit v1.9.3