Browse Source

修改报错

cuixq 4 years ago
parent
commit
87d28a11d5

+ 2 - 2
front-vue/src/views/service/bill/addBill.vue

@@ -969,8 +969,8 @@ export default {
         allAmount() {
             var strarr = [0.0];
             for (let i in this.fileList) {
-                if (this.fileList[i]["ziiCheckStt"] == "1") {
-                strarr.push(this.fileList[i]["ziiAmount"]);
+            if ( this.fileList[i]["ziiCheckStt"] == "1" &&  !!(this.fileList[i]["ziiAmount"])) {
+                    strarr.push(this.fileList[i]["ziiAmount"]);
                 }
             }
             return (Math.round(eval(strarr.join("+")) * 100) / 100).toFixed(2); //结果

+ 10 - 5
front-vue/src/views/service/bill/billAdd.vue

@@ -649,7 +649,12 @@ export default {
             if ("0" == type) {
                 this.invoice.ziiTotalAmount = e.target.value;
             } else if ("1" == type) {
-                this.invoice.ziiAmount = e.target.value;
+                if(e.target.value){
+                   this.invoice.ziiAmount = e.target.value;
+                }else{
+                   this.invoice.ziiAmount=="0.0"; 
+                }
+               
             }
         },
         //表格置灰
@@ -979,11 +984,11 @@ export default {
         allAmount() {
             var strarr = [0.0];
             for (let i in this.fileList) {
-                // if (this.fileList[i]["ziiCheckStt"] == "1") {
-                strarr.push(this.fileList[i]["ziiAmount"]);
-                // }
+                if ( this.fileList[i]["ziiCheckStt"] == "1" &&  !!(this.fileList[i]["ziiAmount"])) {
+                    strarr.push(this.fileList[i]["ziiAmount"]);
+                }
             }
-            return (Math.round(eval(strarr.join("+")) * 100) / 100).toFixed(2); //结果
+               return (Math.round(eval(strarr.join("+")) * 100) / 100).toFixed(2); //结果
         },
         // 提交
         submit() {

+ 1 - 1
front-vue/src/views/service/bill/billDetail.vue

@@ -345,7 +345,7 @@ export default {
         allAmount() {
             var strarr = [0.00];
             for (let i in this.fileList) {
-                if (this.fileList[i]["ziiCheckStt"] == "1") {
+             if ( this.fileList[i]["ziiCheckStt"] == "1" &&  !!(this.fileList[i]["ziiAmount"])) {
                     strarr.push(this.fileList[i]["ziiAmount"]);
                 }
             }

+ 2 - 2
front-vue/src/views/service/bill/billEdit.vue

@@ -1041,8 +1041,8 @@ export default {
         allAmount() {
             var strarr = [0.0];
             for (let i in this.fileList) {
-                if (this.fileList[i]["ziiCheckStt"] == "1") {
-                strarr.push(this.fileList[i]["ziiAmount"]);
+            if ( this.fileList[i]["ziiCheckStt"] == "1" &&  !!(this.fileList[i]["ziiAmount"])) {
+                    strarr.push(this.fileList[i]["ziiAmount"]);
                 }
             }
             return (Math.round(eval(strarr.join("+")) * 100) / 100).toFixed(2); //结果

+ 3 - 3
front-vue/src/views/service/bill/editBill.vue

@@ -1307,9 +1307,9 @@ export default {
     allAmount() {
       var strarr = [0.0];
       for (let i in this.fileList) {
-        if (this.fileList[i]["ziiCheckStt"] == "1") {
-           strarr.push(this.fileList[i]["ziiAmount"]);
-        }
+        if ( this.fileList[i]["ziiCheckStt"] == "1" &&  !!(this.fileList[i]["ziiAmount"])) {
+                    strarr.push(this.fileList[i]["ziiAmount"]);
+                }
       }
       return (Math.round(eval(strarr.join("+")) * 100) / 100).toFixed(2); //结果
       // return this.handleInput(eval(strarr.join("+"))); //结果

+ 3 - 3
front-vue/src/views/service/credit/billDetail.vue

@@ -427,9 +427,9 @@ export default {
     allAmount() {
       var strarr = [0.0];
       for (let i in this.fileList) {
-        if (this.fileList[i]["ziiCheckStt"] == "1") {
-          strarr.push(this.fileList[i]["ziiAmount"]);
-        }
+       if ( this.fileList[i]["ziiCheckStt"] == "1" &&  !!(this.fileList[i]["ziiAmount"])) {
+                    strarr.push(this.fileList[i]["ziiAmount"]);
+                }
       }
       return (Math.round(eval(strarr.join("+")) * 100) / 100).toFixed(2); //结果
       // return this.handleInput(eval(strarr.join("+"))); //结果

+ 1 - 0
front-vue/src/views/service/credit/goFinance.vue

@@ -1305,6 +1305,7 @@ export default {
                         background: "rgba(0, 0, 0,0)",
                     });
                     listStamped(queryStamped).then((response) => {
+                        console.log(response,"response")
                         if (response.data) {
                             self.pdfFileList = response.data.list;
                         }

+ 4 - 1
front-vue/src/views/service/financeRecord/addFinanceRecord.vue

@@ -1318,13 +1318,16 @@ export default {
                     //关闭预览合同
                     //self.closePdfShow();
                     let queryStamped = {};
-                    queryStamped.zfrId = this.zfrId
+                    console.log(self,"self")
+                    console.log(self.zfrId,"zfrId")
+                    queryStamped.zfrId = self.zfrId
                     const load = self.$loading({
                         lock: true,
                         text: "Loading",
                         background: "rgba(0, 0, 0,0)",
                     });
                     listStamped(queryStamped).then((response) => {
+                          console.log(response)
                         load.close();
                         if (response.data) {
                             this.pdfFileList = response.data.list;