caojunjie 4 vuotta sitten
vanhempi
commit
60ea988a36
1 muutettua tiedostoa jossa 15 lisäystä ja 17 poistoa
  1. 15 17
      src/views/finance/charge/index.vue

+ 15 - 17
src/views/finance/charge/index.vue

@@ -593,8 +593,8 @@ export default {
       empty: [],
       //导入从表传主表
       pass: {
-        fAmtdr: '',    //应收合计
-        fAmtcr: '',    //应付合计
+        fAmtdr: 0,    //应收合计
+        fAmtcr: 0,    //应付合计
         fMblno: '',    //提单号
         fName: ''      //货权方
       },
@@ -735,8 +735,8 @@ export default {
         this.cancelButton = false
         this.reset()
         this.pass = {
-          fAmtdr: '',    //应收合计
-          fAmtcr: '',    //应付合计
+          fAmtdr: 0,    //应收合计
+          fAmtcr: 0,    //应付合计
           fMblno: '',    //提单号
           fName: '',      //货权方
           fFeesName: '',   //结算单位
@@ -836,8 +836,8 @@ export default {
             this.tablefilter = false
             this.reset()
             this.pass = {
-              fAmtdr: '',    //应收合计
-              fAmtcr: '',    //应付合计
+              fAmtdr: 0,    //应收合计
+              fAmtcr: 0,    //应付合计
               fMblno: '',    //提单号
               fName: '',      //货权方
               fFeesName: '',   //结算单位
@@ -862,8 +862,8 @@ export default {
           this.notChange = true
           this.reset()
           this.pass = {
-            fAmtdr: '',    //应收合计
-            fAmtcr: '',    //应付合计
+            fAmtdr: 0,    //应收合计
+            fAmtcr: 0,    //应付合计
             fMblno: '',    //提单号
             fName: '',      //货权方
             fFeesName: '',   //结算单位
@@ -1006,13 +1006,11 @@ export default {
     //确认导入
     confirmImport() {
       this.hide = true
-      console.log(this.state_s)
       for (let item in this.selection) {
-        this.pass.fAmtcr = Number(this.pass.fAmtcr).toFixed(2)
-        this.pass.fAmtdr = Number(this.pass.fAmtdr).toFixed(2)
-        this.pass.fAmtcr += Number(this.selection[item].fAmt).toFixed(2)
-        this.pass.fAmtdr += Number(this.selection[item].fAmtdr).toFixed(2)
+         this.pass.fAmtcr += Number(this.selection[item].fAmt.toFixed(2))
+         this.pass.fAmtdr += Number(this.selection[item].fAmtdr.toFixed(2))
       }
+      console.log(this.pass)
       if (this.state_s == true) {
         if (this.selection.length == '0') {
           console.log('未选择')//写入提示
@@ -1217,8 +1215,8 @@ export default {
       this.hide = true
       this.reset()
       this.pass = {
-        fAmtdr: '',    //应收合计
-        fAmtcr: '',    //应付合计
+        fAmtdr: 0,    //应收合计
+        fAmtcr: 0,    //应付合计
         fMblno: '',    //提单号
         fName: '',      //货权方
         fFeesName: '',   //结算单位
@@ -1253,8 +1251,8 @@ export default {
       this.notChange = false
       this.reset()
       this.pass = {
-        fAmtdr: '',    //应收合计
-        fAmtcr: '',    //应付合计
+        fAmtdr: 0,    //应收合计
+        fAmtcr: 0,    //应付合计
         fMblno: '',    //提单号
         fName: '',      //货权方
         fFeesName: '',   //结算单位