From df1103bf5ba31714f7828bb9b1cba585223abdf3 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期一, 28 八月 2023 11:04:06 +0800
Subject: [PATCH] yxh

---
 src/views/project/fund/applyDetail/index.vue |   43 +++++++++++++++++++++++++++++++------------
 1 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/src/views/project/fund/applyDetail/index.vue b/src/views/project/fund/applyDetail/index.vue
index 8eb3fcd..23a9bce 100644
--- a/src/views/project/fund/applyDetail/index.vue
+++ b/src/views/project/fund/applyDetail/index.vue
@@ -1177,7 +1177,7 @@
           //   this.form.annexfiles = list.map(item => item.url).join(",");
           // }
 
-          //澶勭悊鏄庣粏
+          //澶勭悊鏄庣粏          
           for (let i = 0; i < this.rbDetails.length; i++) {
             let tempDetail = this.rbDetails[i];
             //鑾峰彇鏈嶅姟椤圭洰鏄庣粏
@@ -1195,15 +1195,9 @@
               item => tempDetail.applytype == item.value
             );
             if (applytypeIndex > -1) {
-              tempDetail.applytypename = this.rowfeeItemTypes[
-                applytypeIndex
-              ].label;
-              tempDetail.subjecttype = this.rowfeeItemTypes[
-                applytypeIndex
-              ].subjecttype;
-              tempDetail.subjecttypename = this.rowfeeItemTypes[
-                applytypeIndex
-              ].subjecttypename;
+              tempDetail.applytypename = this.rowfeeItemTypes[applytypeIndex].label;
+              tempDetail.subjecttype = this.rowfeeItemTypes[applytypeIndex].subjecttype;
+              tempDetail.subjecttypename = this.rowfeeItemTypes[applytypeIndex].subjecttypename;
             }
             this.rbDetails[i] = tempDetail;
             /*
@@ -1228,7 +1222,7 @@
               });
             }
            
-            // 璁$畻绋庡墠閲戦
+            // 璁$畻绋庡墠銆佺◣璐广�佺◣鍚庨噾棰�
             if (tempDetail.amount == undefined || tempDetail.amount == null || tempDetail.amount == 0 || tempDetail.amount == '') {
               //鑾峰彇鍙傛暟
               this.taxParam.money = tempDetail.taxedamount.toString();
@@ -1244,7 +1238,32 @@
               });
             }
             */
+
           }
+          //璁$畻褰撳墠琛屾姤閿�鍐呭璐圭敤鍚堣锛岀◣鍓嶉噾棰濓紙amount锛夈�佹墸绋庨噾棰濓紙taxamount锛夈�佺◣鍚庨噾棰濓紙taxedamount锛� 
+          if (this.businessType == '2') {
+            for (let j = 0; j < this.rbDetails.length; j++) {
+              let tempDetail = this.rbDetails[j];
+              if (isNaN(parseFloat(tempDetail.amount)) || parseFloat(tempDetail.amount) == 0) {
+                this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (j + 1).toString() + "琛岀殑閲戦涓鸿緭鍏ワ紝璇峰厛杈撳叆閲戦鍚庡啀鎻愪氦淇濆瓨锛�");
+                return;
+              }
+            }
+          } else if (this.businessType == '3' || this.businessType == '4') {
+            for (let j = 0; j < this.rbDetails.length; j++) {
+              let tempDetail = this.rbDetails[j];
+              if (isNaN(parseFloat(tempDetail.amount)) || parseFloat(tempDetail.amount) == 0) {
+                this.$modal.msgWarning("鏈嶅姟椤圭洰琛ㄤ腑锛岀" + (j + 1).toString() + "琛岀殑閲戦涓鸿緭鍏ワ紝璇峰厛杈撳叆閲戦鍚庡啀鎻愪氦淇濆瓨锛�");
+                return;
+              }
+              if (isNaN(parseFloat(tempDetail.amount)) || parseFloat(tempDetail.amount) == 0) {
+                tempDetail.taxedamount = tempDetail.amount
+              } else {
+                tempDetail.taxedamount = tempDetail.amount + tempDetail.taxamount
+              }
+            }
+          }
+
           //璐圭敤鍚堣
           // this.form.pretaxcost = parseFloat(this.totalPreTaxAmount).toFixed(2);
           // this.form.taxedcost = parseFloat(this.totalAfterTaxAmount).toFixed(2);
@@ -1296,7 +1315,7 @@
           });
 
           //鍏抽棴绐楀彛
-          // this.loading = false;
+          this.loading = false;
           // this.getfundList();          
           this.$store.dispatch('tagsView/delView', this.$route)
           this.$router.go(-1);

--
Gitblit v1.9.3