From 151122a373835c93ef1418c7db0985c0660acf7e Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 28 八月 2023 18:08:58 +0800
Subject: [PATCH] 11

---
 src/views/project/fund/applyDetail/index.vue |   90 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 75 insertions(+), 15 deletions(-)

diff --git a/src/views/project/fund/applyDetail/index.vue b/src/views/project/fund/applyDetail/index.vue
index 7d0a854..0f760c4 100644
--- a/src/views/project/fund/applyDetail/index.vue
+++ b/src/views/project/fund/applyDetail/index.vue
@@ -232,7 +232,6 @@
                   placeholder="鏈嶅姟璇存槑"
                   clearable
                   allow-create
-                  filterable
                   @change="verifyFeeRemark(scope.row)"
                 >
                   <el-option
@@ -450,7 +449,11 @@
                   type="text"
                   size="mini"
                   @click="addRow(scope.$index)"
-                  v-if="operationType == 'add' || operationType == 'update'"
+                  v-if="
+                    operationType == 'add' ||
+                      operationType == 'update' ||
+                      operationType == 'check'
+                  "
                   >鏂板</el-button
                 >
                 <el-button
@@ -459,7 +462,11 @@
                   "
                   type="text"
                   size="small"
-                  v-if="operationType == 'add' || operationType == 'update'"
+                  v-if="
+                    operationType == 'add' ||
+                      operationType == 'update' ||
+                      operationType == 'check'
+                  "
                 >
                   鍒犻櫎
                 </el-button>
@@ -611,7 +618,11 @@
         <el-button
           type="primary"
           @click="submitForm"
-          v-if="operationType == 'add' || operationType == 'update'"
+          v-if="
+            operationType == 'add' ||
+              operationType == 'update' ||
+              operationType == 'check'
+          "
           >鎻愪氦淇濆瓨</el-button
         >
         <el-button
@@ -874,7 +885,7 @@
         <div v-if="this.previewpdf" class="pdfimgmin">
           <!-- <img :src="pdfimg" /> -->
           <el-image
-            style="width: 100px; height: 100px"
+            style="width: 95%; height: 90%"
             :src="pdfimg"
             :preview-src-list="pdfimgsrcList"
           >
@@ -1613,7 +1624,7 @@
               });
             }
            
-            // 璁$畻绋庡墠閲戦
+            // 璁$畻绋庡墠銆佺◣璐广�佺◣鍚庨噾棰�
             if (tempDetail.amount == undefined || tempDetail.amount == null || tempDetail.amount == 0 || tempDetail.amount == '') {
               //鑾峰彇鍙傛暟
               this.taxParam.money = tempDetail.taxedamount.toString();
@@ -1630,6 +1641,48 @@
             }
             */
           }
+          //璁$畻褰撳墠琛屾姤閿�鍐呭璐圭敤鍚堣锛岀◣鍓嶉噾棰濓紙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.taxamount)) ||
+                parseFloat(tempDetail.taxamount) == 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);
@@ -1681,7 +1734,7 @@
           });
 
           //鍏抽棴绐楀彛
-          // this.loading = false;
+          this.loading = false;
           // this.getfundList();
           this.$store.dispatch("tagsView/delView", this.$route);
           this.$router.go(-1);
@@ -1905,7 +1958,7 @@
       });
     },
 
-    //鏍¢獙鏀惰垂椤圭洰鏄惁閲嶅
+    //鏍¢獙鏀惰垂椤圭洰
     verifyFeeItem(row) {
       row.itemlist.map(res => {
         if (row.itemid === res.id) {
@@ -1913,14 +1966,18 @@
           row.itemcode = res.itemCode;
         }
       });
-      var repeatNum = 0;
-      this.rbDetails.map(res => {
-        if (res.applytype === row.applytype && res.itemid == row.itemid) {
-          repeatNum++;
+
+      //鍒ゆ柇鏀惰垂椤圭洰鏄惁閲嶅
+      if (this.businessType == "1") {
+        var repeatNum = 0;
+        this.rbDetails.map(res => {
+          if (res.applytype === row.applytype && res.itemid == row.itemid) {
+            repeatNum++;
+          }
+        });
+        if (repeatNum > 1) {
+          this.$modal.msgWarning("鎮ㄥ凡缁忔彁浜よ繃璇ユ湇鍔¢」鐩簡");
         }
-      });
-      if (repeatNum > 1) {
-        this.$modal.msgWarning("鎮ㄥ凡缁忔彁浜よ繃璇ユ湇鍔¢」鐩簡");
       }
 
       //鑾峰彇璐圭敤椤圭洰鐨勮缁嗕俊鎭�
@@ -2314,6 +2371,9 @@
       this.pdfVisible = true;
       if (this.rbDetails[index].annexfilesList) {
         this.fileListto = this.rbDetails[index].annexfilesList;
+        this.pdfimg = this.fileListto[0].url;
+        this.pdfimgsrcList = [];
+        this.pdfimgsrcList.push(this.pdfimg);
       } else {
         this.fileListto = [];
         this.pdfimg = "";

--
Gitblit v1.9.3