置换小数点保留2位

This commit is contained in:
2018-05-07 18:09:27 +08:00
parent da5dcb1f16
commit b25ea34d39
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -1446,7 +1446,7 @@ function addBaseHouseInfo(obj){
var funds = $("#input_funds").val();
if(funds){
baseInfo.sumPrice = parseInt(funds) + parseInt(obj.totalPrice/10000);
baseInfo.sumPrice = (Number(funds)+ parseInt(obj.totalPrice/10000)).toFixed(2);
}else{
baseInfo.sumPrice = parseInt(obj.totalPrice/10000);
}
@@ -1536,9 +1536,9 @@ function calTotalPrice(){
if(funds && price){
if(a){
var tax = a * price/100;
baseInfo.sumPrice = (parseInt(funds)+parseInt(price)-tax).toFixed(2);
baseInfo.sumPrice = (Number(funds)+parseInt(price)-tax).toFixed(2);
}else{
baseInfo.sumPrice = (parseInt(funds)+parseInt(price)).toFixed(2);
baseInfo.sumPrice = (Number(funds)+parseInt(price)).toFixed(2);
}
}else if(price){
if(a){