278 lines
10 KiB
Plaintext
278 lines
10 KiB
Plaintext
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
|
<#compress>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<title>均价操作后台</title>
|
|
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
|
|
|
|
<style>
|
|
table tr td {
|
|
vertical-align: middle !important;;
|
|
}
|
|
</style>
|
|
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css?v=${version}" />
|
|
<link rel="stylesheet" type="text/css" href="../style/main_simple.css?v=${version}" />
|
|
<#include "/common_js.ftl" />
|
|
<style>
|
|
.right_arrow,.right_arrow:hover,.down_arrow,.down_arrow:hover {
|
|
width:0;
|
|
height:0;
|
|
line-height:0;
|
|
border-width:8px;
|
|
border-style:solid;
|
|
display: inline-block;
|
|
margin-top: 6px;
|
|
}
|
|
.right_arrow{
|
|
border-color:transparent transparent transparent #999999;margin-right: 5px; margin-bottom: -2px;
|
|
}
|
|
|
|
.right_arrow:hover{
|
|
border-color:transparent transparent transparent red;
|
|
}
|
|
|
|
.down_arrow{
|
|
margin-top:8px;
|
|
margin-right: 7px;
|
|
border-color:#999999 transparent transparent transparent;
|
|
}
|
|
|
|
.down_arrow:hover{
|
|
margin-top:8px;
|
|
border-color:red transparent transparent transparent;
|
|
}
|
|
|
|
.right_arrow:hover,.down_arrow:hover {
|
|
cursor:pointer;
|
|
}
|
|
input[type="checkbox"]{
|
|
margin-top:-3px;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<#include "/layout/header.ftl" />
|
|
<div class="main-content">
|
|
<#--
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead><tr><th style="width:220px;">项</th><th>值</th></tr></thead>
|
|
<tbody>
|
|
<tr><td> 城市</td><td><span id="cities"></span></td></tr>
|
|
<tr><td> 区域</td><td><span id="regions"></span></td></tr>
|
|
<tr><td> 板块</td><td><span id="blocks"></span></td></tr>
|
|
<tr><td>起止时间</td>
|
|
<td>
|
|
<input id="startDate" class="form-control" style="width:100px;" name="startDate" value="${endDate!}" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'#F{$dp.$D(\'endDate\')||\'%y-%M-%d\'}',minDate:'2007-1-1'})" />
|
|
-<input id="endDate" class="form-control" style="width:100px;" name="endDate" value="${endDate!}" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'%y-%M-%d',minDate:'#F{$dp.$D(\'startDate\')||\'2007-1-1\'}'})"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>操作</td>
|
|
<td><button type="button" id="reComputeBtn" class="btn btn-danger">重算均价</button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
-->
|
|
<div style="">
|
|
<#assign seqIndex = 0 />
|
|
<table class="table table-condensed table-bordered table-hover">
|
|
<tr>
|
|
<td colspan="5">
|
|
<#list ['HOT', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] as key>
|
|
<a href="#${key}">${key}</a>
|
|
</#list>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>序号</th><th>名称</th><th>最新均价</th><th>起始日期</th><th class="fixedtd">操作</th>
|
|
</tr>
|
|
<#list ['HOT', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] as key>
|
|
<#if avgUpdateBoMap[key]?? && avgUpdateBoMap[key]?size gt 0>
|
|
<tr>
|
|
<td colspan="5" style="background-color:rgb(236, 231, 231)"> <b id="${key}" name="${key}" style="color:rgb(10, 0, 0)">${key}</b></td>
|
|
</tr>
|
|
<#list avgUpdateBoMap[key] as it>
|
|
<tr data-ids = "${it.id!}" data-city="${it.city}" data-level="1" data-startDate="${it.startDate!}">
|
|
<td style="width: 40px;"><#assign seqIndex = seqIndex +1 />${seqIndex}</td>
|
|
<td style="width:400px;">
|
|
${it.city}
|
|
</td>
|
|
<td>${it.avgPrice!}</td>
|
|
<td>${it.startDate!}</td>
|
|
<td>
|
|
<a href="../rentPriceUpdate/detail?cityDisplay=${it.city!}">详细信息</a>
|
|
<a href="../rentPriceUpdate/districtList?cityDisplay=${it.city!}">查看小区</a>
|
|
<a href="../districtHouseStat/list?cityDisplay=${it.city}">样本房源</a>
|
|
</td>
|
|
</tr>
|
|
</#list>
|
|
</#if>
|
|
</#list>
|
|
<table>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
<#--
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
listeners.addCityLevelListeners();
|
|
listeners.addItemListeners();
|
|
$("#reComputeBtn").click(function(){
|
|
var data ={};
|
|
var commands = Array();
|
|
$("input:checked").each(function(){
|
|
var tr = $(this).parent().parent();
|
|
var command = {};
|
|
if(tr.attr("data-level")=="1"){
|
|
command.city = tr.attr("data-city")
|
|
}else if(tr.attr("data-level")=="2"){
|
|
command.city = tr.attr("data-city")
|
|
command.region = tr.attr("data-region")
|
|
}else if(tr.attr("data-level")=="3"){
|
|
command.city = tr.attr("data-city")
|
|
command.region = tr.attr("data-region")
|
|
command.block = tr.attr("data-block")
|
|
}
|
|
command.startDate = tr.attr("data-startDate")
|
|
commands.push(command)
|
|
|
|
})
|
|
if(commands.length==0){
|
|
alert("你没有选择任何城市、区域或板块!")
|
|
return;
|
|
}
|
|
if(!confirm("耗时任务,请慎重进行!!!你确定要重算吗?")){
|
|
return;
|
|
}
|
|
data.commands = commands ;
|
|
data.startDate = $("#startDate").val()
|
|
data.endDate = $("#endDate").val()
|
|
$.ajax({
|
|
url:"../rentPriceUpdate/reCompute",
|
|
dataType:"json",
|
|
cache:false,
|
|
type:'POST',
|
|
data:{data:JSON.stringify(data)},
|
|
success:function(data){
|
|
alert(data.msg)
|
|
window.location.reload();
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
listeners ={
|
|
addCityLevelListeners:function(){
|
|
$("[data-level='1'] span").click(function(){
|
|
var activeTr = $(this).parent().parent()
|
|
var ids = $(activeTr).attr("data-ids");
|
|
if($(this).hasClass("right_arrow")){
|
|
$(this).removeClass("right_arrow").addClass("down_arrow")
|
|
if($("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").length > 0){
|
|
$("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").show();
|
|
return;
|
|
}
|
|
$.ajax({
|
|
url:"../rentPriceUpdate/loadAvgPriceData",
|
|
dataType:"json",
|
|
cache:true,
|
|
data:{cityName:$(activeTr).attr("data-city")},
|
|
success:function(data){
|
|
$(data).each(function(){
|
|
$('<tr data-ids="'+ids+',' + this.id +'" data-region ="'+this.region+'" data-city="'+this.city+'" data-startDate="'+this.startDate+'" data-level="2"><td><span class="right_arrow" style="margin-left:30px;"></span><input type="checkbox"> '+this.region+'</td><td>'+this.avgPrice+'</td><td>'+this.startDate+'</td><td><a href="javascript:;" class="detailBtn">详细信息</a> <a href="javascript:;" class="districtBtn">查看小区</a></td></tr>').insertAfter(activeTr)
|
|
});
|
|
listeners.addRegionLevelListeners();
|
|
listeners.addItemListeners();
|
|
}
|
|
});
|
|
}else{
|
|
$(this).removeClass("down_arrow").addClass("right_arrow")
|
|
$("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").hide();
|
|
}
|
|
});
|
|
},
|
|
addRegionLevelListeners:function(){
|
|
$("[data-level='2'] span").click(function(){
|
|
var activeTr = $(this).parent().parent()
|
|
var ids = $(activeTr).attr("data-ids");
|
|
if($(this).hasClass("right_arrow")){
|
|
$(this).removeClass("right_arrow").addClass("down_arrow")
|
|
if($("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").length > 0){
|
|
$("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").show();
|
|
return;
|
|
}
|
|
$.ajax({
|
|
url:"../rentPriceUpdate/loadAvgPriceData",
|
|
dataType:"json",
|
|
cache:true,
|
|
data:{cityName:$(activeTr).attr("data-city"),region:$(activeTr).attr("data-region")},
|
|
success:function(data){
|
|
$(data).each(function(){
|
|
$('<tr data-ids="'+ids+","+this.id+'" data-level="3" data-city="'+this.city+'" data-region="'+this.region+'" data-block = "'+this.block+'" data-startDate="'+this.startDate+'"><td><span style="margin-left:90px;"></span><input type="checkbox"> '+this.block+'</td><td>'+this.avgPrice+'</td><td>'+this.startDate+'</td><td><a href="javascript:;" class="detailBtn">详细信息</a> <a href="javascript:;" class="districtBtn">查看小区</a></td></tr>').insertAfter(activeTr)
|
|
});
|
|
listeners.addItemListeners();
|
|
}
|
|
});
|
|
}else{
|
|
$(this).removeClass("down_arrow").addClass("right_arrow")
|
|
$("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").hide();
|
|
}
|
|
});
|
|
},
|
|
addItemListeners:function(){
|
|
$("input[type='checkbox']").unbind();
|
|
$(".detailBtn").unbind();
|
|
$(".districtBtn").unbind();
|
|
$("input[type='checkbox']").click(function(){
|
|
var activeTr = $(this).parent().parent();
|
|
if($(this).attr("checked")){
|
|
if($(activeTr).attr("data-level")==="1"){
|
|
$("#cities").text($("#cities").text()+activeTr.attr("data-city")+",")
|
|
}else if($(activeTr).attr("data-level")==="2"){
|
|
$("#regions").text($("#regions").text()+activeTr.attr("data-region")+",")
|
|
}else if($(activeTr).attr("data-level")==="3"){
|
|
$("#blocks").text($("#blocks").text()+activeTr.attr("data-block")+",")
|
|
}
|
|
|
|
}else{
|
|
if($(activeTr).attr("data-level")==="1"){
|
|
$("#cities").text($("#cities").text().replace(activeTr.attr("data-city")+",",""))
|
|
}else if($(activeTr).attr("data-level")==="2"){
|
|
$("#regions").text($("#regions").text().replace(activeTr.attr("data-region")+",",""))
|
|
}else if($(activeTr).attr("data-level")==="3"){
|
|
$("#blocks").text($("#blocks").text().replace(activeTr.attr("data-block")+",",""))
|
|
}
|
|
}});
|
|
$(".detailBtn").click(function(){
|
|
var activeTr = $(this).parent().parent();
|
|
var url = "../rentPriceUpdate/detail?cityDisplay="+$(activeTr).attr("data-city");
|
|
if($(activeTr).attr("data-region")!=undefined){
|
|
url =url + "®ion=" + $(activeTr).attr("data-region")
|
|
}
|
|
if($(activeTr).attr("data-block")!=undefined){
|
|
url =url + "&block=" + $(activeTr).attr("data-block")
|
|
}
|
|
window.open(url,'_blank');
|
|
});
|
|
$(".districtBtn").click(function(){
|
|
var activeTr = $(this).parent().parent();
|
|
var url = "../rentPriceUpdate/districtList?cityDisplay="+$(activeTr).attr("data-city");
|
|
if($(activeTr).attr("data-region")!=undefined){
|
|
url =url + "®ion=" + $(activeTr).attr("data-region")
|
|
}
|
|
if($(activeTr).attr("data-block")!=undefined){
|
|
url =url + "&block=" + $(activeTr).attr("data-block")
|
|
}
|
|
window.open(url,'_blank');
|
|
});
|
|
|
|
}
|
|
}
|
|
</script>
|
|
-->
|
|
</#compress> |