Merge branch 'open_gj' of http://gitlab.fangjia.com/dev0/main into open_gj
This commit is contained in:
+8
-12
@@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import com.fangjia.core.util.*;
|
||||||
import com.fangjia.dal.*;
|
import com.fangjia.dal.*;
|
||||||
import com.fangjia.dal.mongo.model.*;
|
import com.fangjia.dal.mongo.model.*;
|
||||||
import com.fangjia.dal.seawater.dao.SeawaterDao;
|
import com.fangjia.dal.seawater.dao.SeawaterDao;
|
||||||
@@ -60,16 +61,6 @@ import org.sothis.web.mvc.annotation.Param;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import com.fangjia.core.RegionData;
|
import com.fangjia.core.RegionData;
|
||||||
import com.fangjia.core.util.AnalyticsUtil;
|
|
||||||
import com.fangjia.core.util.CoordPoint;
|
|
||||||
import com.fangjia.core.util.CoordinateConversion;
|
|
||||||
import com.fangjia.core.util.DataUtil;
|
|
||||||
import com.fangjia.core.util.DateUtil;
|
|
||||||
import com.fangjia.core.util.GeoUtils;
|
|
||||||
import com.fangjia.core.util.GeocodeUtils;
|
|
||||||
import com.fangjia.core.util.HouseValidator;
|
|
||||||
import com.fangjia.core.util.LoggerFactory;
|
|
||||||
import com.fangjia.core.util.SecurityUtil;
|
|
||||||
import com.fangjia.dal.common.DistrictKey;
|
import com.fangjia.dal.common.DistrictKey;
|
||||||
import com.fangjia.dal.common.ServerAreaData;
|
import com.fangjia.dal.common.ServerAreaData;
|
||||||
import com.fangjia.dal.datastore.model.House;
|
import com.fangjia.dal.datastore.model.House;
|
||||||
@@ -5055,8 +5046,13 @@ public class PropertyController {
|
|||||||
districtPriceMap.put("name", district.getName());
|
districtPriceMap.put("name", district.getName());
|
||||||
districtPriceMap.put("address", district.getAddress());
|
districtPriceMap.put("address", district.getAddress());
|
||||||
districtPriceMap.put("totalPrice", evaluation.getTotalPrice());
|
districtPriceMap.put("totalPrice", evaluation.getTotalPrice());
|
||||||
districtPriceMap.put("cal_date", model.getCalDate());
|
districtPriceMap.put("totalPriceUpper", CNNMFilter.convert(String.valueOf(evaluation.getTotalPrice())));
|
||||||
|
districtPriceMap.put("cal_date", DateUtil.formatByPattern(new Date(), "yyyy/MM/dd"));
|
||||||
|
districtPriceMap.put("direction", evaluation.getDirection());
|
||||||
|
districtPriceMap.put("size", evaluation.getArea());
|
||||||
|
districtPriceMap.put("floor", model.getFloor());
|
||||||
|
districtPriceMap.put("height", model.getHeight());
|
||||||
|
districtPriceMap.put("fitment", evaluation.getFitment());
|
||||||
|
|
||||||
Integer startPrice = (int)(evaluation.getTotalPrice() - evaluation.getTotalPrice()*0.2);
|
Integer startPrice = (int)(evaluation.getTotalPrice() - evaluation.getTotalPrice()*0.2);
|
||||||
Integer endPrice = (int)(evaluation.getTotalPrice() + evaluation.getTotalPrice()*0.2);
|
Integer endPrice = (int)(evaluation.getTotalPrice() + evaluation.getTotalPrice()*0.2);
|
||||||
|
|||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
package com.fangjia.open.controllers.weixin;
|
||||||
|
|
||||||
|
import com.fangjia.core.util.BeanUtils;
|
||||||
|
import com.fangjia.core.util.DataUtil;
|
||||||
|
import com.fangjia.core.util.GeocodeUtils;
|
||||||
|
import com.fangjia.dal.QueryParam;
|
||||||
|
import com.fangjia.dal.SdQuery;
|
||||||
|
import com.fangjia.dal.SrQuery;
|
||||||
|
import com.fangjia.dal.seaweed.model.District;
|
||||||
|
import com.fangjia.open.compatible.model.JsonModel;
|
||||||
|
import com.fangjia.open.controllers.PropertyController;
|
||||||
|
import com.fangjia.open.model.BaseModel;
|
||||||
|
import com.fangjia.open.model.weixin.EvaluationModel;
|
||||||
|
import com.fangjia.open.model.weixin.PropertyEvaluationModel;
|
||||||
|
import com.fangjia.service.api.AutoCompleteBo;
|
||||||
|
import com.fangjia.service.datastore.DistrictService;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.lucene.index.Term;
|
||||||
|
import org.apache.lucene.search.BooleanClause;
|
||||||
|
import org.apache.lucene.search.BooleanQuery;
|
||||||
|
import org.apache.lucene.search.TermQuery;
|
||||||
|
import org.sothis.web.mvc.annotation.Param;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建设银行租金控制类
|
||||||
|
*
|
||||||
|
* @author shenjian
|
||||||
|
* @since 2021/4/6
|
||||||
|
*/
|
||||||
|
public class CcbRentController {
|
||||||
|
|
||||||
|
private DistrictService districtService;
|
||||||
|
|
||||||
|
public Object indexAction(BaseModel result) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object reportAction(EvaluationModel result, @Param(name = "address") String address, @Param(name = "totalPrice") String totalPrice) {
|
||||||
|
result.setLender(address);
|
||||||
|
result.setDealPrice(Double.valueOf(totalPrice));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object detailAction(PropertyEvaluationModel result) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方法同DistrictController#suggestAction
|
||||||
|
*/
|
||||||
|
public Object suggestAction(@Param(name = "city") String city, @Param(name = "cat") String cat, @Param(name = "keyword") String keyword,
|
||||||
|
@Param(name = "limit") Integer limit, @Param(name="lat")Double lat, @Param(name="lng")Double lng) {
|
||||||
|
JsonModel model = new JsonModel();
|
||||||
|
if (limit == null || limit > 100 || limit <= 0) {
|
||||||
|
limit = 10;
|
||||||
|
}
|
||||||
|
System.out.println(cat + "#" + city + "#" + keyword + "#" + limit + "#" + lng + "#" + lat);
|
||||||
|
List<AutoCompleteBo> suggestList = getDistrictByKeyword(cat, city, keyword, limit, lng, lat);
|
||||||
|
model.setJsonModel(suggestList);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<AutoCompleteBo> getDistrictByKeyword(String cat, String city, String keyword, int limit, final Double lng, final Double lat) {
|
||||||
|
|
||||||
|
keyword = DataUtil.escapeSolr(keyword);
|
||||||
|
if (StringUtils.isBlank(keyword) || keyword.length() >= 30) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||||
|
params.add(new QueryParam("city", city));
|
||||||
|
params.add(new QueryParam("category", cat));
|
||||||
|
params.add(new QueryParam("visible", 0));
|
||||||
|
|
||||||
|
|
||||||
|
BooleanQuery srQuery1 = new BooleanQuery();
|
||||||
|
BooleanQuery nameQuery = new BooleanQuery();
|
||||||
|
// nameQuery.add(new TermQuery(new Term("district_name", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
// nameQuery.add(new TermQuery(new Term("alias_std", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
// nameQuery.add(new TermQuery(new Term("address", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
// nameQuery.add(new TermQuery(new Term("addr_alias_std", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
nameQuery.add(new TermQuery(new Term("keyword", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
//nameQuery.add(new TermQuery(new Term("keyword_cjk", keyword)), BooleanClause.Occur.SHOULD);//这个重要,因seaweed不支持模糊搜索,当输入"中远两"需用此进行搜索
|
||||||
|
srQuery1.add(nameQuery, BooleanClause.Occur.SHOULD);
|
||||||
|
if(lat != null && lng != null && lat != 0 && lng != 0){
|
||||||
|
Map<String, Double> geo = GeocodeUtils.geoconvBaiduToGoogle(lng, lat);
|
||||||
|
SdQuery sdQuery = new SdQuery();
|
||||||
|
sdQuery.setPoint(geo.get("lat") + "," + geo.get("lng"));
|
||||||
|
sdQuery.setField("lat_lng");
|
||||||
|
sdQuery.setDistance("500");
|
||||||
|
params.add(new QueryParam(QueryParam.SD_PARAM_NAME, sdQuery));
|
||||||
|
}
|
||||||
|
params.add(new QueryParam("$sr", new SrQuery(srQuery1)));
|
||||||
|
List<District> districts = districtService.findAllByParams(params, 0, limit, new String[]{"region", "name", "address", "addrAlias","id"});
|
||||||
|
List<AutoCompleteBo> ret = new ArrayList<AutoCompleteBo>(districts.size());
|
||||||
|
for (District district : districts) {
|
||||||
|
AutoCompleteBo bo = new AutoCompleteBo();
|
||||||
|
bo.setKeyword(district.getName());
|
||||||
|
bo.setVal(district.getName());
|
||||||
|
bo.setDesc(district.getAddress());
|
||||||
|
bo.setRegion(district.getRegion());
|
||||||
|
bo.setId(district.getId());
|
||||||
|
ret.add(bo);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setDistrictService(DistrictService districtService) {
|
||||||
|
this.districtService = districtService;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
package com.fangjia.open.dto;
|
||||||
|
|
||||||
|
import groovy.transform.builder.Builder;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建行租金dto
|
||||||
|
*
|
||||||
|
* @author shenjian
|
||||||
|
* @since 2021/4/6
|
||||||
|
*/
|
||||||
|
@Builder
|
||||||
|
public class CcbRentDto implements Serializable {
|
||||||
|
|
||||||
|
private String city;
|
||||||
|
// 区域
|
||||||
|
private String district;
|
||||||
|
// 小区名
|
||||||
|
private String name;
|
||||||
|
// 面积
|
||||||
|
private Double size;
|
||||||
|
// 半径
|
||||||
|
private Integer radius;
|
||||||
|
// 室
|
||||||
|
private Integer room;
|
||||||
|
// 厅
|
||||||
|
private Integer hall;
|
||||||
|
// 卫
|
||||||
|
private Integer toilet;
|
||||||
|
// 所在楼层
|
||||||
|
private Integer floor;
|
||||||
|
// 总楼层
|
||||||
|
private Integer height;
|
||||||
|
// 朝向
|
||||||
|
private String direction;
|
||||||
|
// 装修情况
|
||||||
|
private String fitment;
|
||||||
|
// 电梯配套
|
||||||
|
private Boolean hasLift;
|
||||||
|
|
||||||
|
public String getCity() {
|
||||||
|
return city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity(String city) {
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDistrict() {
|
||||||
|
return district;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrict(String district) {
|
||||||
|
this.district = district;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRadius() {
|
||||||
|
return radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRadius(Integer radius) {
|
||||||
|
this.radius = radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRoom() {
|
||||||
|
return room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoom(Integer room) {
|
||||||
|
this.room = room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHall() {
|
||||||
|
return hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHall(Integer hall) {
|
||||||
|
this.hall = hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getToilet() {
|
||||||
|
return toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToilet(Integer toilet) {
|
||||||
|
this.toilet = toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFloor() {
|
||||||
|
return floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFloor(Integer floor) {
|
||||||
|
this.floor = floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDirection() {
|
||||||
|
return direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirection(String direction) {
|
||||||
|
this.direction = direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFitment() {
|
||||||
|
return fitment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFitment(String fitment) {
|
||||||
|
this.fitment = fitment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getHasLift() {
|
||||||
|
return hasLift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHasLift(Boolean hasLift) {
|
||||||
|
this.hasLift = hasLift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSize(Double size) {
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(Integer height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,7 +40,6 @@ public class EvaluationModel extends BaseModel{
|
|||||||
private String cardId;
|
private String cardId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setId(String id) {
|
public void setId(String id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|||||||
+169
@@ -0,0 +1,169 @@
|
|||||||
|
package com.fangjia.open.model.weixin;
|
||||||
|
|
||||||
|
import com.fangjia.open.model.BaseModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建行租房估值
|
||||||
|
*
|
||||||
|
* @author shenjian
|
||||||
|
* @since 2021/4/7
|
||||||
|
*/
|
||||||
|
public class PropertyEvaluationModel extends BaseModel {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城市
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域(新版本估价)
|
||||||
|
**/
|
||||||
|
private String district;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区名(新版本)
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 面积
|
||||||
|
*/
|
||||||
|
private double size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所在楼层
|
||||||
|
*/
|
||||||
|
private Integer floor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总楼层
|
||||||
|
*/
|
||||||
|
private Integer height;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 室数
|
||||||
|
*/
|
||||||
|
private Integer room;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厅数
|
||||||
|
*/
|
||||||
|
private Integer hall;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卫数
|
||||||
|
*/
|
||||||
|
private Integer toilet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 朝向
|
||||||
|
*/
|
||||||
|
private String direction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修情况
|
||||||
|
*/
|
||||||
|
private String fitment;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCityName() {
|
||||||
|
return cityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCityName(String cityName) {
|
||||||
|
this.cityName = cityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDistrict() {
|
||||||
|
return district;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrict(String district) {
|
||||||
|
this.district = district;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress() {
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSize(double size) {
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFloor() {
|
||||||
|
return floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFloor(Integer floor) {
|
||||||
|
this.floor = floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(Integer height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRoom() {
|
||||||
|
return room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoom(Integer room) {
|
||||||
|
this.room = room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHall() {
|
||||||
|
return hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHall(Integer hall) {
|
||||||
|
this.hall = hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getToilet() {
|
||||||
|
return toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToilet(Integer toilet) {
|
||||||
|
this.toilet = toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDirection() {
|
||||||
|
return direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirection(String direction) {
|
||||||
|
this.direction = direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFitment() {
|
||||||
|
return fitment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFitment(String fitment) {
|
||||||
|
this.fitment = fitment;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,436 @@
|
|||||||
|
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||||
|
<#compress>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/html">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>租金报告中心</title>
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||||
|
<link rel="stylesheet" href="../static/style/wx.css">
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
.main {
|
||||||
|
margin: 4px 8px 4px 8px;
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
position: relative;
|
||||||
|
color: #1E90FF;
|
||||||
|
}
|
||||||
|
.title1 {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #1E90FF;
|
||||||
|
}
|
||||||
|
.p {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.table {
|
||||||
|
width: 100%;
|
||||||
|
overflow-y: hidden;
|
||||||
|
overflow-x: scroll
|
||||||
|
}
|
||||||
|
.inline {
|
||||||
|
width: 550px;
|
||||||
|
border-spacing: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.table .inline th {
|
||||||
|
color: #999;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.download {
|
||||||
|
float: right;
|
||||||
|
color: #3d4145;
|
||||||
|
border: solid 1px #333;
|
||||||
|
order-radius: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1rem;
|
||||||
|
width: 43px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="main">
|
||||||
|
<div class="title">
|
||||||
|
估值报告
|
||||||
|
<span class="download" id="download">下载</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">1 评估申明</div>
|
||||||
|
<div class="p">建设银行遵循中立、客观、公正的原则,通过周密细致的测算,评估求得分析对象的房地产市场参考。</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">2 评估时间</div>
|
||||||
|
<div class="p">
|
||||||
|
<span name="cal_date"></span><br>
|
||||||
|
评估结果<br>
|
||||||
|
楼盘名称:<span name="name"></span><br>
|
||||||
|
楼盘地址:<span name="address"></span><br>
|
||||||
|
租金估值(RMB):<span name="totalPrice"></span>元/月<br>
|
||||||
|
大写(人民币):<span name="totalPriceUpper"></span><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">3 报告有效期</div>
|
||||||
|
<div class="p">本报告在市场无较大波动的情况下,该评估价格在报告出具起三个月内有效。</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">4 房产状况</div>
|
||||||
|
<div class="p">
|
||||||
|
详细地址:<span name="address"></span><br>
|
||||||
|
楼盘名称:<span name="name"></span><br>
|
||||||
|
室号:<span name="room"></span><br>
|
||||||
|
朝向:<span name="direction"></span><br>
|
||||||
|
建筑面积:<span name="size"></span>平米<br>
|
||||||
|
所在楼层:<span name="floor"></span> 层 <span name="height"></span>总层数<br>
|
||||||
|
电梯配套:<span name="hasLift"></span><br>
|
||||||
|
装修情况:<span name="fitment"></span><br>
|
||||||
|
建筑年代:<span name="buildYear"></span><br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">5 历史租金</div>
|
||||||
|
<div class="charts" id="districtRentTrendsChart"></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">6 已租房源</div>
|
||||||
|
<div class="p table">
|
||||||
|
<table class="inline">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg">
|
||||||
|
<th class="th01">城市</th>
|
||||||
|
<th>区域</th>
|
||||||
|
<th>小区名</th>
|
||||||
|
<th>成交价</th>
|
||||||
|
<th>面积</th>
|
||||||
|
<th>室</th>
|
||||||
|
<th>厅</th>
|
||||||
|
<th>装修</th>
|
||||||
|
<th>成交日期</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="">
|
||||||
|
<td class="td01">上海</td>
|
||||||
|
<td class="td02">浦东区</td>
|
||||||
|
<td>永泰花苑</td>
|
||||||
|
<td>***</td>
|
||||||
|
<td>82</td>
|
||||||
|
<td>2</td>
|
||||||
|
<td>0</td>
|
||||||
|
<td>普通装修</td>
|
||||||
|
<td>2020-07-29</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="bg">
|
||||||
|
<td class="td01">上海</td>
|
||||||
|
<td class="td02">浦东区</td>
|
||||||
|
<td>永泰花苑</td>
|
||||||
|
<td>***</td>
|
||||||
|
<td>82</td>
|
||||||
|
<td>2</td>
|
||||||
|
<td>0</td>
|
||||||
|
<td>普通装修</td>
|
||||||
|
<td>2020-07-29</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">7 样本参考</div>
|
||||||
|
<div class="p table">
|
||||||
|
<table class="inline">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg">
|
||||||
|
<th class="th01">城市</th>
|
||||||
|
<th>区域</th>
|
||||||
|
<th>小区名</th>
|
||||||
|
<th>租金</th>
|
||||||
|
<th>面积</th>
|
||||||
|
<th>室</th>
|
||||||
|
<th>厅</th>
|
||||||
|
<th>装修</th>
|
||||||
|
<th>成交日期</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="referenceHouses">
|
||||||
|
<td colspan="6" style="text-align:center">暂无数据</td>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">8 周边同类小区租金</div>
|
||||||
|
<div class="p table">
|
||||||
|
<table class="inline" style="width: 300px">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg">
|
||||||
|
<th class="th01">城市</th>
|
||||||
|
<th>区域</th>
|
||||||
|
<th>小区名</th>
|
||||||
|
<th>平米租金</th>
|
||||||
|
<th>室</th>
|
||||||
|
<th>厅</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="sameDistricts">
|
||||||
|
<tr class="">
|
||||||
|
<td colspan="6" style="text-align:center">暂无数据</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.js' charset='utf-8'></script>
|
||||||
|
<script type="text/javascript" src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
|
||||||
|
<script type='text/javascript' src='../static/js/wx.js' charset='utf-8'></script>
|
||||||
|
<script type="text/javascript" src="../static/js/trend-charts.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#download").bind("click", function(){
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
function init() {
|
||||||
|
// 后台传参过来用
|
||||||
|
<#--let params = {-->
|
||||||
|
<#-- 'city': '${cityName}',-->
|
||||||
|
<#-- 'district': '${district}',-->
|
||||||
|
<#-- 'name': '${name}',-->
|
||||||
|
<#-- 'address': '${address}',-->
|
||||||
|
<#-- 'size': '${size}',-->
|
||||||
|
<#-- 'floor': '${floor}',-->
|
||||||
|
<#-- 'height': '${height}',-->
|
||||||
|
<#-- 'room': '${room}',-->
|
||||||
|
<#-- 'hall': '${hall}',-->
|
||||||
|
<#-- 'toilet': '${toilet}',-->
|
||||||
|
<#-- 'direction': <#if direction??>${direction}<#else>''</#if>,-->
|
||||||
|
<#-- 'fitment': <#if fitment??>${fitment}<#else>''</#if>-->
|
||||||
|
<#--};-->
|
||||||
|
let params = {
|
||||||
|
'city': sessionStorage.city,
|
||||||
|
'district': sessionStorage.district,
|
||||||
|
'name': sessionStorage.name,
|
||||||
|
'address': sessionStorage.address,
|
||||||
|
'size': sessionStorage.size,
|
||||||
|
'floor': sessionStorage.floor,
|
||||||
|
'height': sessionStorage.height,
|
||||||
|
'room': sessionStorage.room,
|
||||||
|
'hall': sessionStorage.hall,
|
||||||
|
'toilet': sessionStorage.toilet,
|
||||||
|
'direction': sessionStorage.direction,
|
||||||
|
'fitment': sessionStorage.fitment
|
||||||
|
};
|
||||||
|
$.ajax({
|
||||||
|
// 注意需要加..
|
||||||
|
url: '../property/rentReport',
|
||||||
|
data: params,
|
||||||
|
dataType:"json",
|
||||||
|
type:"post",
|
||||||
|
success:function(data){
|
||||||
|
if(data.code == 200){
|
||||||
|
let result = data.result;
|
||||||
|
// 评估时间
|
||||||
|
$('span[name="cal_date"]').text(result.cal_date)
|
||||||
|
$('span[name="name"]').text(result.name);
|
||||||
|
$('span[name="address"]').text(result.address);
|
||||||
|
$('span[name="totalPrice"]').text(result.totalPrice)
|
||||||
|
$('span[name="totalPriceUpper"]').text(result.totalPriceUpper)
|
||||||
|
|
||||||
|
// 历史租金
|
||||||
|
var charts = {}
|
||||||
|
// charts.series = [{
|
||||||
|
// name: '1居室',
|
||||||
|
// data: [3800, 3900, 4000, 4100, 4200, 4200, 4200, 4200]
|
||||||
|
// }];
|
||||||
|
if (result.trends.distMap[params.room] == undefined) {
|
||||||
|
console.error("返回历史租金房间数有误,不存在" + params.room + "居室数据")
|
||||||
|
} else {
|
||||||
|
var arr = [];
|
||||||
|
result.trends.times.forEach(function (d) {
|
||||||
|
var price = result.trends.distMap[params.room][d];
|
||||||
|
if (price != undefined) {
|
||||||
|
arr.push(price);
|
||||||
|
} else {
|
||||||
|
arr.push('');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
charts.series = [{'name': params.room + '居室', 'data': arr}]; // 纵坐标
|
||||||
|
charts.xData = result.trends.times; // 横坐标值
|
||||||
|
createChartNow('districtRentTrendsChart', charts, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 房产状况
|
||||||
|
$('span[name="room"]').text(result.room)
|
||||||
|
$('span[name="direction"]').text(result.direction)
|
||||||
|
$('span[name="size"]').text(result.size)
|
||||||
|
$('span[name="floor"]').text(result.floor)
|
||||||
|
$('span[name="height"]').text(result.height)
|
||||||
|
$('span[name="hasLift"]').text(result.hasLift)
|
||||||
|
$('span[name="fitment"]').text(result.fitment)
|
||||||
|
$('span[name="buildYear"]').text(result.buildYear)
|
||||||
|
|
||||||
|
// 样本参考
|
||||||
|
var referenceHouses = result.houses;
|
||||||
|
if (referenceHouses && referenceHouses.length > 0) {
|
||||||
|
$('#referenceHouses').empty();
|
||||||
|
referenceHouses.forEach(function(d){
|
||||||
|
var fitment = d.fitment != undefined ? d.fitment : '-';
|
||||||
|
$('#referenceHouses').append('<tr class="bg"> \
|
||||||
|
<td class="td01">' + d.city + '</td> \
|
||||||
|
<td class="td02">' + d.region + '</td> \
|
||||||
|
<td>' + d.districtName + '</td> \
|
||||||
|
<td>' + d.totalPrice + '</td> \
|
||||||
|
<td>' + d.area + '</td> \
|
||||||
|
<td>' + d.room + '</td> \
|
||||||
|
<td>' + d.hall + '</td> \
|
||||||
|
<td>' + fitment + '</td> \
|
||||||
|
<td>' + d.pDate + '</td> \
|
||||||
|
</tr>');
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 同类小区租金
|
||||||
|
var sameDistricts = result.districts;
|
||||||
|
if (sameDistricts && sameDistricts.length > 0) {
|
||||||
|
$('#sameDistricts').empty()
|
||||||
|
sameDistricts.forEach(function(d){
|
||||||
|
$('#sameDistricts').append('<tr class=""> \
|
||||||
|
<td class="td01">' + d.city + '</td> \
|
||||||
|
<td class="td02">' + d.region + '</td> \
|
||||||
|
<td>' + d.districtName + '</td> \
|
||||||
|
<td>' + d.roomPrice + '</td> \
|
||||||
|
<td>' + d.room + '</td> \
|
||||||
|
<td>1</td> \
|
||||||
|
</tr>');
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$.toast(data.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
function createChartNow(renderId, data, showTradeCount) {
|
||||||
|
if(data == null || data == 'undefined' || typeof(data) == undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(data.series == 'undefined' || data.series.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var yaxis = [{
|
||||||
|
title: {
|
||||||
|
enable: false,
|
||||||
|
text: ''
|
||||||
|
},
|
||||||
|
offset : -5,
|
||||||
|
labels: {
|
||||||
|
formatter: function() {
|
||||||
|
return this.value + "元";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
|
if(showTradeCount) {
|
||||||
|
yaxis.push({
|
||||||
|
title: {
|
||||||
|
enable: false,
|
||||||
|
text: ''
|
||||||
|
},
|
||||||
|
labels: {
|
||||||
|
formatter: function() {
|
||||||
|
return this.value +'套';
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
color: '#4572A7'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
opposite: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var config = {yaxis : yaxis};
|
||||||
|
createHighChartNow(renderId, data, config);
|
||||||
|
};
|
||||||
|
function createHighChartNow(renderId, data, config) {
|
||||||
|
var chart = new Highcharts.Chart({
|
||||||
|
credits:{
|
||||||
|
enabled:true,
|
||||||
|
text: '',
|
||||||
|
href: "",
|
||||||
|
position: {
|
||||||
|
align: 'center',
|
||||||
|
verticalAlign: 'top',
|
||||||
|
x: 0,
|
||||||
|
y: 25
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
cursor: 'pointer'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
chart: {
|
||||||
|
renderTo: renderId,
|
||||||
|
type: 'spline'
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: data.title,
|
||||||
|
floating: false,
|
||||||
|
align: 'center',
|
||||||
|
x : 0,
|
||||||
|
y : 10
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
align: 'center',
|
||||||
|
verticalAlign: 'bottom'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'datetime',
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
day: '%m月%d',
|
||||||
|
week: '%m月%d',
|
||||||
|
month: '%Y.%m',
|
||||||
|
year: '%Y-%m'
|
||||||
|
},
|
||||||
|
categories: data.xData
|
||||||
|
},
|
||||||
|
yAxis: config.yaxis,
|
||||||
|
series: data.series,
|
||||||
|
tooltip: {
|
||||||
|
formatter: function() {
|
||||||
|
if(this.series.name.indexOf('成交量') > -1) {
|
||||||
|
return Highcharts.dateFormat('%Y年%m月', this.x) +" 成交: <span style='color:#F50;font-weight: bold;'>"+ this.y +'</span>套';
|
||||||
|
}else {
|
||||||
|
return Highcharts.dateFormat('%Y-%m-%d', this.x) +'<br>'+ this.series.name+ ": <span style='color:#F50;font-weight: bold;'>"+ this.y +'</span>元/平米';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
$(function () {
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</#compress>
|
||||||
@@ -0,0 +1,361 @@
|
|||||||
|
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||||
|
<#compress>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>租金评估</title>
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||||
|
<link rel="stylesheet" href="../static/style/wx.css">
|
||||||
|
<style>
|
||||||
|
.list-block .item-content .item-inner{margin-left:0;padding-left:0.75rem;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="page-group">
|
||||||
|
<div class="page page-current">
|
||||||
|
<input type="hidden" id="t" value="c">
|
||||||
|
<form id="evaluateForm">
|
||||||
|
<div class="content">
|
||||||
|
<div class="list-block" style="margin-bottom:60px;">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<input id="cityName" value="上海" name="city" type="hidden">
|
||||||
|
<!-- 区域 -->
|
||||||
|
<input value="" name="district" type="hidden">
|
||||||
|
<input value="2000" name="radius" type="hidden">
|
||||||
|
<div class="item-title label">城市:<font>上海</font></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">地址:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="text" placeholder="请输入小区名或地址" id="districtSearch" name="name" class="search_input" required>
|
||||||
|
<input type="hidden" name="address" />
|
||||||
|
</div>
|
||||||
|
<div class="item-media"><span>(必填项)</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="searchSpan" style="margin-bottom:50px;z-index:999;position: absolute; width: 100%;" >
|
||||||
|
<ul></ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">面积:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="number" name="size" placeholder="请输入建筑面积(平米)" id="houseArea" min="0" max="1000" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="item-media"><span>(必填项)</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="content-block">
|
||||||
|
<div class="item-title label di">户型:</div>
|
||||||
|
<input name="room" type="hidden" id="room">
|
||||||
|
<input name="hall" type="hidden" id="hall">
|
||||||
|
<input name="toilet" type="hidden" id="toilet">
|
||||||
|
<p class="di">
|
||||||
|
<a href="#" class="create-actions01-now">1</a>室 <a
|
||||||
|
href="#" class="create-actions02-now">0</a>厅 <a
|
||||||
|
href="#" class="create-actions03-now">0</a>卫
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">楼层:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="number" name="floor" id="houseFloor" placeholder="请输入所在楼层" min="1" max="200" required value="">
|
||||||
|
</div>
|
||||||
|
<div class="item-media"><span>(必填项)</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">总楼层:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="number" name="height" id="houseHight" placeholder="请输入总楼层" min="1" max="200" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="item-media"><span>(必填项)</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="moreInput dn">
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="content-block">
|
||||||
|
<div class="item-title label di">朝向:</div>
|
||||||
|
<input id="direction" type="hidden" name="direction">
|
||||||
|
<p class="di"><a href="#" class="create-actions04">请选择朝向</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="content-block">
|
||||||
|
<div class="item-title label di">装修情况:</div>
|
||||||
|
<input type="hidden" id="fitment" name="fitment">
|
||||||
|
<p class="di"><a href="#" class="create-actions05">请选择装修情况</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="content-block">
|
||||||
|
<div class="item-title label di">电梯配套:</div>
|
||||||
|
<input type="hidden" id="hasLift" name="hasLift" placeholder="请选择电梯配套">
|
||||||
|
<p class="di"><a href="#" class="create-actions14-now">请选择电梯配套</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="more_btn">继续填写,租金更加精准↓</div>
|
||||||
|
<div class="little_btn dn">收起</div>
|
||||||
|
</div>
|
||||||
|
<div class="content-block">
|
||||||
|
<p><a id="evaluateBtn" class="button button-big button-fill">查看租金结果</a></p>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/select.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/wx.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/autoCompletion.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/jquery.cookie.js' charset='utf-8'></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function storeSession() {
|
||||||
|
sessionStorage.city = $('input[name="city"]').val()
|
||||||
|
sessionStorage.name = $('input[name="name"]').val()
|
||||||
|
sessionStorage.district = $('input[name="district"]').val()
|
||||||
|
sessionStorage.address = $('input[name="address"]').val()
|
||||||
|
sessionStorage.size = $('input[name="size"]').val()
|
||||||
|
sessionStorage.room = $('input[name="room"]').val()
|
||||||
|
sessionStorage.hall = $('input[name="hall"]').val()
|
||||||
|
sessionStorage.toilet = $('input[name="toilet"]').val()
|
||||||
|
sessionStorage.floor = $('input[name="floor"]').val()
|
||||||
|
sessionStorage.height = $('input[name="height"]').val()
|
||||||
|
sessionStorage.direction = $('input[name="direction"]').val()
|
||||||
|
sessionStorage.fitment = $('input[name="fitment"]').val()
|
||||||
|
}
|
||||||
|
function getSession() {
|
||||||
|
if (sessionStorage.city != undefined) {
|
||||||
|
$('input[name="city"]').val(sessionStorage.city)
|
||||||
|
}
|
||||||
|
if (sessionStorage.name != undefined) {
|
||||||
|
$('input[name="name"]').val(sessionStorage.name)
|
||||||
|
}
|
||||||
|
if (sessionStorage.district != undefined) {
|
||||||
|
$('input[name="district"]').val(sessionStorage.district)
|
||||||
|
}
|
||||||
|
if (sessionStorage.address != undefined) {
|
||||||
|
$('input[name="address"]').val(sessionStorage.address)
|
||||||
|
}
|
||||||
|
if (sessionStorage.size != undefined) {
|
||||||
|
$('input[name="size"]').val(sessionStorage.size)
|
||||||
|
}
|
||||||
|
if (sessionStorage.room != undefined) {
|
||||||
|
$('input[name="room"]').val(sessionStorage.room)
|
||||||
|
}
|
||||||
|
if (sessionStorage.hall != undefined) {
|
||||||
|
$('input[name="hall"]').val(sessionStorage.hall)
|
||||||
|
}
|
||||||
|
if (sessionStorage.toilet != undefined) {
|
||||||
|
$('input[name="toilet"]').val(sessionStorage.toilet)
|
||||||
|
}
|
||||||
|
if (sessionStorage.floor != undefined) {
|
||||||
|
$('input[name="floor"]').val(sessionStorage.floor)
|
||||||
|
}
|
||||||
|
if (sessionStorage.height != undefined) {
|
||||||
|
$('input[name="height"]').val(sessionStorage.height)
|
||||||
|
}
|
||||||
|
if (sessionStorage.direction != undefined) {
|
||||||
|
$('input[name="direction"]').val(sessionStorage.direction)
|
||||||
|
}
|
||||||
|
if (sessionStorage.fitment != undefined) {
|
||||||
|
$('input[name="fitment"]').val(sessionStorage.fitment)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#evaluateBtn").on('click', function(){
|
||||||
|
if(parseFloat($("#houseHight").val()) < parseFloat($("#houseFloor").val())){
|
||||||
|
$.toast("楼层不能大于楼高");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
storeSession()
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
// 注意需要加..
|
||||||
|
url: '../property/evaluateRent',
|
||||||
|
data:$("#evaluateForm").serialize(),
|
||||||
|
dataType:"json",
|
||||||
|
type:"post",
|
||||||
|
success:function(data){
|
||||||
|
if(data.code == 200){
|
||||||
|
window.location.href = "report?address=" + data.result.address + "&totalPrice=" + data.result.totalPrice
|
||||||
|
}else{
|
||||||
|
$.toast(data.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 选择操作-房型-室
|
||||||
|
$(document).on('click', '.create-actions01-now', function () {
|
||||||
|
var buttons1 = [
|
||||||
|
{
|
||||||
|
text: '请选择室',
|
||||||
|
label: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
for (var i = 1; i < 10; i++) {
|
||||||
|
buttons1.push({
|
||||||
|
text: i + '',
|
||||||
|
onClick: function () {
|
||||||
|
$("#room").val(this.text)
|
||||||
|
$(".create-actions01-now").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
var buttons2 = [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
bg: 'gray'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var groups = [buttons1, buttons2];
|
||||||
|
$.actions(groups);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 选择操作-房型-号
|
||||||
|
$(document).on('click', '.create-actions02-now', function () {
|
||||||
|
var buttons1 = [
|
||||||
|
{
|
||||||
|
text: '请选择厅',
|
||||||
|
label: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
for (var i = 0; i < 10; i++) {
|
||||||
|
buttons1.push({
|
||||||
|
text: i + '',
|
||||||
|
onClick: function () {
|
||||||
|
$("#hall").val(this.text)
|
||||||
|
$(".create-actions02-now").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
var buttons2 = [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
bg: 'gray'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var groups = [buttons1, buttons2];
|
||||||
|
$.actions(groups);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 选择操作-房型-卫
|
||||||
|
$(document).on('click', '.create-actions03-now', function () {
|
||||||
|
var buttons1 = [
|
||||||
|
{
|
||||||
|
text: '请选择卫',
|
||||||
|
label: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
for (var i = 0; i < 10; i++) {
|
||||||
|
buttons1.push({
|
||||||
|
text: i + '',
|
||||||
|
onClick: function () {
|
||||||
|
$("#toilet").val(this.text)
|
||||||
|
$(".create-actions03-now").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
var buttons2 = [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
bg: 'gray'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var groups = [buttons1, buttons2];
|
||||||
|
$.actions(groups);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 电梯配套
|
||||||
|
$(document).on('click', '.create-actions14-now', function () {
|
||||||
|
var buttons1 = [
|
||||||
|
{
|
||||||
|
text: '请选择是否有电梯',
|
||||||
|
label: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '是',
|
||||||
|
bold: true,
|
||||||
|
onClick: function () {
|
||||||
|
$('#hasLift').val(true)
|
||||||
|
$("a.create-actions14-now").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '否',
|
||||||
|
onClick: function () {
|
||||||
|
$('#hasLift').val(false)
|
||||||
|
$("a.create-actions14").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var buttons2 = [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
bg: 'gray'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var groups = [buttons1, buttons2];
|
||||||
|
$.actions(groups);
|
||||||
|
});
|
||||||
|
function init() {
|
||||||
|
getSession()
|
||||||
|
}
|
||||||
|
$(function(){
|
||||||
|
init()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</#compress>
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||||
|
<#compress>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>租金报告中心</title>
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||||
|
<link rel="stylesheet" href="../static/style/wx.css">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="page-group">
|
||||||
|
<div class="page page-current">
|
||||||
|
<div class="content">
|
||||||
|
<div class="list-block" style="margin-bottom:60px;">
|
||||||
|
<a href="javascript:void(0)" onclick="javascript:history.back(-1);" class="button_12 blue blue_borderbottom radius4"><返回</a>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">您评估的地址:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="text" disabled id="districtSearch" name="name" value="${lender}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">租金:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="text" name="mount" disabled name="evaluation.mount" value="${dealPrice}元/月">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block">
|
||||||
|
<p><a id="evaluateBtn" class="button button-big button-fill">查看租金报告</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/wx.js' charset='utf-8'></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#evaluateBtn").on('click', function(){
|
||||||
|
window.location.href = "detail"
|
||||||
|
});
|
||||||
|
function init() {
|
||||||
|
|
||||||
|
};
|
||||||
|
$(function () {
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</#compress>
|
||||||
@@ -1,10 +1,15 @@
|
|||||||
/**小区搜索功能js*/
|
/**小区搜索功能js*/
|
||||||
$(function () {
|
$(function () {
|
||||||
resumeHistory()
|
if ($("#t").val() != "c") {
|
||||||
|
resumeHistory()
|
||||||
|
}
|
||||||
/**小区自动完成*/
|
/**小区自动完成*/
|
||||||
$("#districtSearch").on('click input',function () {
|
$("#districtSearch").on('click input',function () {
|
||||||
var city = $("#cityName").val()
|
var city = $("#cityName").val()
|
||||||
if($.trim($("#districtSearch").val()) == ""){
|
if($.trim($("#districtSearch").val()) == ""){
|
||||||
|
if ($("#t").val() == "c") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
resumeHistory()
|
resumeHistory()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -21,26 +26,34 @@ $(function () {
|
|||||||
},
|
},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if(data.length == 0){
|
if(data && data.length == 0){
|
||||||
var content = '<li><a class="item-content" style="color:#333;text-align: center"><div class="item-inner"><div class="item-subtitle">未搜索到小区</div></div></a></li>'
|
var content = '<li><a class="item-content" style="color:#333;text-align: center"><div class="item-inner"><div class="item-subtitle">未搜索到小区</div></div></a></li>'
|
||||||
$("#searchSpan ul").empty().append(content)
|
$("#searchSpan ul").empty().append(content)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var template = '<li data-id="{0}" data-name="{1}" data-addr ="{2}"><a class="item-link item-content"><div class="item-inner"><div class="item-subtitle">{1}<br><small>{2}</small></div></div></a></li>'
|
var template = '<li data-id="{0}" data-name="{1}" data-addr="{2}" data-region="{3}"><a class="item-link item-content"><div class="item-inner"><div class="item-subtitle">{1}<br><small>{2}</small></div></div></a></li>'
|
||||||
var content = ""
|
var content = ""
|
||||||
$(data).each(function () {
|
$(data).each(function () {
|
||||||
var district = this
|
var district = this
|
||||||
content = content + template.template(district.id, district.keyword, district.desc)
|
content = content + template.template(district.id, district.keyword, district.desc, district.region)
|
||||||
})
|
})
|
||||||
$("#searchSpan ul").empty().append(content).find("li>a.item-link").click(function () {
|
$("#searchSpan ul").empty().append(content).find("li>a.item-link").click(function () {
|
||||||
var li = $(this).parent();
|
var li = $(this).parent();
|
||||||
var addr = $(li).attr("data-addr");
|
var addr = $(li).attr("data-addr");
|
||||||
var id = $(li).attr("data-id")+"";
|
var id = $(li).attr("data-id")+"";
|
||||||
var name = $(li).attr("data-name");
|
var name = $(li).attr("data-name");
|
||||||
|
var region = $(li).attr("data-region");
|
||||||
var isCompany=$("#t").val();
|
var isCompany=$("#t").val();
|
||||||
saveCookie(id, name, addr)
|
if ($("#t").val() != "c") {
|
||||||
|
saveCookie(id, name, addr)
|
||||||
|
}
|
||||||
if ($("#t").val() == "b") {
|
if ($("#t").val() == "b") {
|
||||||
location.href = "districtDetail?id=" + id+"&city="+city
|
location.href = "districtDetail?id=" + id+"&city="+city
|
||||||
|
} else if ($("#t").val() == "c") {
|
||||||
|
$('#districtSearch').val(name)
|
||||||
|
$('input[name="address"]').val(addr)
|
||||||
|
$('input[name="district"]').val(region)
|
||||||
|
$("#searchSpan ul").empty()
|
||||||
} else {
|
} else {
|
||||||
location.href = "../weiXinEvaluation/input?id=" + id
|
location.href = "../weiXinEvaluation/input?id=" + id
|
||||||
}
|
}
|
||||||
@@ -98,6 +111,8 @@ function resumeHistory() {
|
|||||||
var id = $(li).attr("data-id")
|
var id = $(li).attr("data-id")
|
||||||
if ($("#t").val() == "b") {
|
if ($("#t").val() == "b") {
|
||||||
location.href = "districtDetail?id=" + id+"&city="+city
|
location.href = "districtDetail?id=" + id+"&city="+city
|
||||||
|
} else if ($("#t").val() == "c") {
|
||||||
|
location.href = "../ccbRent/index?city="+city
|
||||||
} else {
|
} else {
|
||||||
location.href = "../weiXinEvaluation/input?id=" + id
|
location.href = "../weiXinEvaluation/input?id=" + id
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user