liyg 2 jaren geleden
bovenliggende
commit
ddf8bee055

+ 53 - 53
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -2698,22 +2698,22 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data
+          //遍历保留两位小数
+          this.tableData.forEach(e=>{
+              try {
+                  if(e.priceValue){
+                    e.priceValue=e.priceValue.toFixed(2);
+                  }
+                  if(e.detailsAmount){
+                    e.detailsAmount=e.detailsAmount.toFixed(2);
+                  }
+              } catch (error) {
+                  
+              }
+          })
           this.totalHeight += this.itemHeight
           this.visibleList = res.data.data
           console.log(this.visibleList);
-          try {
-            //遍历保留两位小数
-            this.visibleList.forEach(e=>{
-                if(e.priceValue){
-                  e.priceValue=e.priceValue.toFixed(2);
-                }
-                if(e.detailsAmount){
-                  e.detailsAmount=e.detailsAmount.toFixed(2);
-                }
-            }) 
-          } catch (error) {
-              
-          }
           console.log(this.visibleList, 'this.visibleList')
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
@@ -2744,22 +2744,22 @@ export default {
           obj
         )
         .then(res => {
-          this.tableData = res.data.data
+          this.tableData1 = res.data.data
+          //遍历保留两位小数
+          this.tableData1.forEach(e=>{
+              try {
+                  if(e.priceValue){
+                    e.priceValue=e.priceValue.toFixed(2);
+                  }
+                  if(e.detailsAmount){
+                    e.detailsAmount=e.detailsAmount.toFixed(2);
+                  }
+              } catch (error) {
+                  
+              }
+          })
           this.totalHeight += this.itemHeight
           this.visibleList1 = res.data.data
-          try {
-            //遍历保留两位小数
-            this.visibleList1.forEach(e=>{
-                if(e.priceValue){
-                  e.priceValue=e.priceValue.toFixed(2);
-                }
-                if(e.detailsAmount){
-                  e.detailsAmount=e.detailsAmount.toFixed(2);
-                }
-            }) 
-          } catch (error) {
-              
-          }
           console.log(this.visibleList1, 'this.visibleList1')
           this.getSpanArr1(this.visibleList1)
           this.getTotalNum(this.tableData)
@@ -2851,25 +2851,25 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data
+          //遍历保留两位小数
+          this.tableData.forEach(e=>{
+              try {
+                  if(e.priceValue){
+                    e.priceValue=e.priceValue.toFixed(2);
+                  }
+                  if(e.detailsAmount){
+                    e.detailsAmount=e.detailsAmount.toFixed(2);
+                  }
+              } catch (error) {
+                  
+              }
+          })
           this.totalHeight += this.itemHeight
           this.visibleList = []
           this.visibleList = this.tableData.slice(
             0,
             Math.floor(this.maxHeight / this.itemHeight) + 1
           )
-          try {
-            //遍历保留两位小数
-            this.visibleList.forEach(e=>{
-                if(e.priceValue){
-                  e.priceValue=e.priceValue.toFixed(2);
-                }
-                if(e.detailsAmount){
-                  e.detailsAmount=e.detailsAmount.toFixed(2);
-                }
-            }) 
-          } catch (error) {
-              
-          }
           console.log(this.visibleList)
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
@@ -2903,25 +2903,25 @@ export default {
         )
         .then(res => {
           this.tableData1 = res.data.data
+          //遍历保留两位小数
+          this.tableData1.forEach(e=>{
+              try {
+                  if(e.priceValue){
+                    e.priceValue=e.priceValue.toFixed(2);
+                  }
+                  if(e.detailsAmount){
+                    e.detailsAmount=e.detailsAmount.toFixed(2);
+                  }
+              } catch (error) {
+                  
+              }
+          })
           this.totalHeight += this.itemHeight
           this.visibleList1 = []
           this.visibleList1 = this.tableData1.slice(
             0,
             Math.floor(this.maxHeight / this.itemHeight) + 1
           )
-          try {
-            //遍历保留两位小数
-            this.visibleList1.forEach(e=>{
-                if(e.priceValue){
-                  e.priceValue=e.priceValue.toFixed(2);
-                }
-                if(e.detailsAmount){
-                  e.detailsAmount=e.detailsAmount.toFixed(2);
-                }
-            }) 
-          } catch (error) {
-              
-          }
           console.log(this.visibleList1)
           this.getSpanArr1(this.visibleList1)
           this.getTotalNum(this.tableData1)