From 1e487a42549384f6e937a5c7d557563aedafec2c Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 20 三月 2024 18:41:29 +0800
Subject: [PATCH] 11

---
 src/views/project/tallage/computingBill/index.vue |   69 +++++++++++++++++++++-------------
 1 files changed, 43 insertions(+), 26 deletions(-)

diff --git a/src/views/project/tallage/computingBill/index.vue b/src/views/project/tallage/computingBill/index.vue
index 584b962..889e1e9 100644
--- a/src/views/project/tallage/computingBill/index.vue
+++ b/src/views/project/tallage/computingBill/index.vue
@@ -752,7 +752,15 @@
         item.taXmoney = item.taXmoney.toFixed(2);
         this.accumulation();
       });
-      this.$modal.msgSuccess("娣诲姞鎴愬姛锛�");
+      if (this.form.id) {
+        this.form.istax = 0;
+        this.form.taxedtime = "";
+        this.$modal.confirm("娣诲姞鎴愬姛锛�,闇�瑕侀噸鏂颁繚瀛樺苟璁$畻鍗曟嵁锛�").then(() => {
+          this.submitForm();
+        });
+      } else {
+        this.$modal.msgSuccess("娣诲姞鎴愬姛锛�");
+      }
 
       this.dialogVisiblepatient = false;
     },
@@ -770,19 +778,11 @@
               if (res1.code == 200) {
                 this.$modal.msgSuccess("璁$畻鎴愬姛");
                 this.$modal.closeLoading();
-                getFundtax(this.form.id).then(response => {
-                  this.form = response.data;
-                  if (this.form.serviceFunds[0]) {
-                    this.donorchargeorgans = this.form.serviceFunds;
-                    this.donorchargeorgans.forEach(item => {
-                      item.taXmoney = item.pretaxcost - item.taxedcost;
-                      item.taXmoney = item.taXmoney.toFixed(2);
-                      this.accumulation(); //璁$畻
-                      this.form.istax = 1;
-                      this.submitForm();
-                    });
-                  }
-                });
+                this.form.istax = 1;
+                this.form.taxedtime = this.$moment().format(
+                  "YYYY-MM-DD HH:mm:ss"
+                );
+                this.submitForm();
               } else {
                 this.$modal.closeLoading();
                 this.$modal.msgError(res1.msg);
@@ -921,6 +921,17 @@
             updateFundtax(this.form).then(res1 => {
               if (res1.code == 200) {
                 this.$modal.msgSuccess("淇濆瓨鎴愬姛锛�");
+                getFundtax(this.curId).then(response => {
+                  this.form = response.data;
+                  if (this.form.serviceFunds[0]) {
+                    this.donorchargeorgans = this.form.serviceFunds;
+                    this.donorchargeorgans.forEach(item => {
+                      item.taXmoney = item.pretaxcost - item.taxedcost;
+                      item.taXmoney = item.taXmoney.toFixed(2);
+                      this.accumulation();
+                    });
+                  }
+                });
                 this.$modal.closeLoading();
               } else {
                 this.$modal.closeLoading();
@@ -932,6 +943,17 @@
               if (response.code == 200) {
                 this.form.id = response.data.fundTaxId;
                 this.$modal.msgSuccess("鏂板鎴愬姛锛�");
+                getFundtax(response.msg).then(response => {
+                  this.form = response.data;
+                  if (this.form.serviceFunds[0]) {
+                    this.donorchargeorgans = this.form.serviceFunds;
+                    this.donorchargeorgans.forEach(item => {
+                      item.taXmoney = item.pretaxcost - item.taxedcost;
+                      item.taXmoney = item.taXmoney.toFixed(2);
+                      this.accumulation();
+                    });
+                  }
+                });
                 this.$modal.closeLoading();
               } else {
                 this.$modal.msgError(response.msg);
@@ -978,18 +1000,13 @@
         .then(() => {
           CalculationDetail({ id: row.id }).then(res2 => {
             if (res2.code == 200) {
-              this.$modal.msgSuccess("鍒犻櫎鎴愬姛锛�");
-              getFundtax(this.curId).then(response => {
-                this.form = response.data;
-                if (this.form.serviceFunds[0]) {
-                  this.donorchargeorgans = this.form.serviceFunds;
-                  this.donorchargeorgans.forEach(item => {
-                    item.taXmoney = item.pretaxcost - item.taxedcost;
-                    item.taXmoney = item.taXmoney.toFixed(2);
-                    this.accumulation();
-                  });
-                }
-              });
+              this.form.istax = 0;
+              this.form.taxedtime = "";
+              this.$modal
+                .confirm("鍒犻櫎鎴愬姛,闇�瑕侀噸鏂颁繚瀛樺苟璁$畻鍗曟嵁锛�")
+                .then(() => {
+                  this.submitForm();
+                });
             }
           });
         })

--
Gitblit v1.9.3