Browse Source

fix 应收对账和应付对账保留2位小数问题

shenjunjie 7 years ago
parent
commit
144db5af13

+ 3 - 1
pages/mobile/center/user/btobarCheck.vue

@@ -513,6 +513,7 @@
         if (this.dateObj[type]) {
           // 初始化为00:00:00
           this.dateObj[type] = new Date(this.dateObj[type]).getTime() - 8 * 60 * 60 * 1000
+          // TODO
           if (this.dateObj.fromDate && this.dateObj.toDate && this.dateObj.fromDate > this.dateObj.toDate) {
             if (type === 'fromDate') {
               this.setRemindText('起始时间不能大于结束时间')
@@ -766,6 +767,7 @@
                 this.setRemindText('本次对账数量,填写有误!')
               }
             }
+            // todo
             if (this.ShowApcheckChooseTime) {
               let _start = new Date(this.isShowApcheckList.objTime.value.fromDate)
               let _end = new Date(this.isShowApcheckList.objTime.value.toDate)
@@ -1071,7 +1073,7 @@
         }
       },
       computeNum: function(price, num) {
-        return price.toFixed(num)
+        return Math.floor(price * 100) / 100
       }
     }
   }

+ 2 - 1
pages/mobile/center/vendor/btobapCheck.vue

@@ -1066,7 +1066,8 @@
         }
       },
       computeNum: function(price, num) {
-        return price.toFixed(num)
+        return Math.floor(price * 100) / 100
+         // price.toString().toFixed(num)
       }
     }
   }