提交添加管理bug

This commit is contained in:
raoyanhui
2018-04-02 12:48:08 +08:00
parent 5cd2a9b7fd
commit 8c567616e9
+30 -12
View File
@@ -13,9 +13,6 @@
<link rel="stylesheet" href="../../css/theme-orange.css">
<style>
/*em{font-style:normal;}
em.up{color:#ff1100;}
em.down{color:#2cb66a;}*/
.list-block .item-title{font-size:0.85rem;}
.list-block .item-title span.span01{font-size:0.7rem;color:#666;margin-left:0.3rem;}
.icon-add{width:0.6rem;height:0.6rem;background:url(../../images/icon-add.png) no-repeat center center;background-size:100%;margin-right:0.3rem;}
@@ -89,6 +86,9 @@ var uid = "162167854504869888";
/* 房产用途 */
$(document).on('click','.open-vertical-modal', function () {
//获取对应<li>栏目存储的houseinfo id
var id = $(this).attr("id");
var houseStatus = $(this).attr("houseStatus");
$.modal({
title: '房产用途',
verticalButtons: true,
@@ -96,21 +96,19 @@ $(document).on('click','.open-vertical-modal', function () {
{
text: '自住',
onClick: function() {
//window.location.href = "01_index01_myHouse01_index.html";
addManagement(id, houseStatus, "自住");
}
},
{
text: '出租',
onClick: function() {
//window.location.href = "01_index01_myHouse01_index.html";
addManagement(id, houseStatus, "出租");
}
},
{
text: '空置',
onClick: function() {
//window.location.href = "01_index01_myHouse01_index.html";
addManagement(id, houseStatus, "空置");
}
},
{
@@ -120,7 +118,27 @@ $(document).on('click','.open-vertical-modal', function () {
})
});
//查询房产评估列表
//添加管理AJAX请求
function addManagement(id, houseStatus, liveStatus){
axios.post("/rest/evaluate/addManagement",
{
id: id,
houseStatus: houseStatus,
liveStatus: liveStatus
}).then(function (response) {
var status = response.data.status;
if(status){
$.toast(response.data.data);
window.location.reload();
}else{
$.toast(response.data.message);
}
}).catch(function (error) {
console.log(error);
});
}
//查询房产评估列表AJAX请求
function selectEvaluateList(){
//先清空列表
$('.list-block ul').html("");
@@ -189,9 +207,9 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey];
if(!isNaN(cityAvgPriceValue)){
if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='up'>"+'高'+(parseInt(cityAvgPriceValue)-parseInt(result.price))+'元'+"</em></div>";
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='up'>高"+(parseInt(cityAvgPriceValue)-parseInt(result.price))+"元</em></div>";
}else{
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>"+'低'+(parseInt(result.price)-parseInt(cityAvgPriceValue))+'元'+"</em></div>";
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>低"+(parseInt(result.price)-parseInt(cityAvgPriceValue))+"元</em></div>";
}
}else{
//为非数字清空放空格
@@ -199,7 +217,7 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
}
htmlContent = htmlContent + "<div>均价: <em class='em02'>"+result.price+"元/㎡</em></div>";
htmlContent = htmlContent + "<div class='price'><em><strong>"+tempTotalPrice+"</strong>万</em></div>";
htmlContent = htmlContent + "</div></div></a><a class='add open-vertical-modal'><i class='icon icon-add' id="+result.id+" uid="+result.uid+"></i>添加管理</a>"
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>";
}
}