feiyue.teng

申报数据编辑总净重出现浮点精度问题处理

...@@ -913,8 +913,8 @@ ...@@ -913,8 +913,8 @@
913 totalNetWeight += Number(this.detailData[i].netWeight) 913 totalNetWeight += Number(this.detailData[i].netWeight)
914 totalGoodsValue += Number(this.detailData[i].totalPrice) 914 totalGoodsValue += Number(this.detailData[i].totalPrice)
915 } 915 }
916 - this.formData.netWeight = totalNetWeight 916 + this.formData.netWeight = totalNetWeight.toFixed(5)
917 - this.formData.goodsValue = totalGoodsValue 917 + this.formData.goodsValue = totalGoodsValue.toFixed(5)
918 }, 918 },
919 deleteRow(row){ 919 deleteRow(row){
920 this.detailData = this.detailData.filter(item => item.gnum !=row.gnum).map((item, index) =>{ 920 this.detailData = this.detailData.filter(item => item.gnum !=row.gnum).map((item, index) =>{
......