调整添加评估或者 添加管理后 房价为零显示问题

This commit is contained in:
raoyanhui
2018-04-14 19:50:37 +08:00
parent 3966cb84c7
commit 8b0fae6ce6
2 changed files with 13 additions and 19 deletions
+7 -10
View File
@@ -314,18 +314,15 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
}
for(var i in dataObj) {
var result = dataObj[i];
var tempTotalPrice = result.totalPrice;
//可抵押贷额度
var tempTotalPricePercent;
//考虑是否为数字,加强逻辑判断
if(!isNaN(tempTotalPrice)){
//转换成元,四舍五入
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
}
var tempTotalPricePercent = (result.totalPrice) == 0?"暂无":(parseFloat(result.totalPrice)*0.7/10000).toFixed(2)+"万";
var tempTotalPrice = (result.totalPrice) == 0?"暂无":(parseFloat(result.totalPrice)/10000).toFixed(2)+"万";
html += '<li><a href="#" onclick="gotoHouseDetail(\''+result.id+'\')" class="item-content">';
html += "<div class='item-inner'><div class='item-title-row'>";
html += "<div class='item-title'><label>"+result.name+"</label> <em>"+tempTotalPrice+"万</em><span class='tag'>";
html += "<div class='item-title'><label>"+result.name+"</label> <em>"+tempTotalPrice+"</em><span class='tag'>";
if(result.liveStatus!=null && result.liveStatus.length>0){
html += "<small>"+result.liveStatus+"</small></span></div>";
}else{
@@ -359,7 +356,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
html += "<div>下跌概率: <em class='down'>暂无<i class='icon'></i></em></div>";
}
html += "<div>抵押可贷额度: <em style='color:#EB5F34;'>"+tempTotalPricePercent+"万</em></div></div></div></a>";
html += "<div>抵押可贷额度: <em style='color:#EB5F34;'>"+tempTotalPricePercent+"</em></div></div></div></a>";
if(result.level!=null && result.level == 1){
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>豪宅级</a>";
@@ -204,12 +204,6 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
if(results!=null && results.length>0){
for(var i in results){
var result = results[i];
var tempTotalPrice = result.totalPrice;
//考虑是否为数字,加强逻辑判断
if(!isNaN(tempTotalPrice)){
//转换成元,四舍五入
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
}
htmlContent = htmlContent +'<li><a onclick="openReportWindow(\''+result.id+'\')" class="item-content">';
htmlContent = htmlContent +"<div class='item-inner'><div class='item-title-row'>";
htmlContent = htmlContent +"<div class='item-title'><label>"+result.name+"</label><span class='span01'>"+result.city+"-"+result.region+"</span></div>";
@@ -231,7 +225,7 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
}
}else{
//为非数字清空放空格
htmlContent = htmlContent + "<div>近30天涨跌幅: <em class='down'>"+ +"%<i class='icon icon-arrow-green'></i></em></div>";
htmlContent = htmlContent + "<div>近30天涨跌幅: <em class='down'>暂无<i class='icon'></i></em></div>";
}
//相比对于城市均价
@@ -248,8 +242,11 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
//为非数字清空放空格
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>暂无</em></div>";
}
htmlContent = htmlContent + "<div>均价: <em class='em02'>"+result.price+"元/㎡</em></div>";
htmlContent = htmlContent + "<div class='price'><em><strong>"+tempTotalPrice+"</strong>万</em></div>";
var tempTotalPrice = (result.totalPrice) == 0?"暂无</strong>":(parseFloat(result.totalPrice)/10000).toFixed(2)+"</strong>万";
var tempPrice = (result.price) == 0?"暂无":result.price+"元/㎡";
htmlContent = htmlContent + "<div>均价: <em class='em02'>"+tempPrice+"</em></div>";
htmlContent = htmlContent + "<div class='price'><em><strong>"+tempTotalPrice+"</em></div>";
htmlContent = htmlContent + "</div></div></a><a class='add open-vertical-modal' id="+result.id+" uid="+result.uid+" houseStatus="+result.houseStatus+"><i class='icon icon-add'></i>添加管理</a>"
htmlContent = htmlContent +"</li>";
}