Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
@@ -335,7 +335,6 @@ function addManagement(id, houseStatus, liveStatus){
|
||||
$.toast(response.data.data);
|
||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
plus.webview.getWebviewById('views/house/houseList.html').reload();
|
||||
}else{
|
||||
$.toast(response.data.message);
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<i class="icon icon-evaluation01"></i>
|
||||
<span>出售分析</span>
|
||||
</div>-->
|
||||
<div onclick="openNewView('/views/rent/rent.html')">
|
||||
<div onclick="gotoRentManager()">
|
||||
<i class="icon icon-evaluation02"></i>
|
||||
<span>出租管理</span>
|
||||
</div>
|
||||
@@ -109,6 +109,39 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topic rentBox dn">
|
||||
<div class="topicContent" style="padding:0.5rem 0;">
|
||||
<div class="list-block dataList">
|
||||
<ul>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">目前状态</div>
|
||||
<div class="item-after">出租</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">出租日期</div>
|
||||
<div class="item-after">{{rentTime}}</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">每期租金</div>
|
||||
<div class="item-after">{{rentPrice}}</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">下次收租</div>
|
||||
<div class="item-after">{{nextRent}}</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="topic">
|
||||
<div class="topicContent" style="padding:0.5rem 0;">
|
||||
<div class="list-block">
|
||||
@@ -297,7 +330,7 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
|
||||
<script>
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
var houseId="190763130039566336"; //= "186182250936643584";
|
||||
var houseId="191190409534242816"; //= "186182250936643584";
|
||||
var lat;
|
||||
var lng;
|
||||
var city;
|
||||
@@ -313,7 +346,6 @@ function onPlusReady(){
|
||||
//houseId="106777351102136320";
|
||||
init();
|
||||
}
|
||||
|
||||
var baseInfo = new Vue({
|
||||
el: '#baseInfo',
|
||||
data: {
|
||||
@@ -339,7 +371,10 @@ var baseInfo = new Vue({
|
||||
rate:"",
|
||||
minSellPrice:"",
|
||||
maxSellPrice:"",
|
||||
rentRooms:""
|
||||
rentRooms:"",
|
||||
rentTime : "-",
|
||||
rentPrice : "-",
|
||||
nextRent : "-"
|
||||
}
|
||||
})
|
||||
|
||||
@@ -388,7 +423,18 @@ function init(){
|
||||
}else{
|
||||
baseInfo.liveStatus='其它';
|
||||
}
|
||||
|
||||
if(houseInfo.liveStatus=="出租"){
|
||||
$('.rentBox').show();
|
||||
if(houseInfo.leaseStartDate){
|
||||
baseInfo.rentTime = formatTime(houseInfo.leaseStartDate)+"-"+formatTime(houseInfo.leaseEndDate);
|
||||
baseInfo.rentPrice = houseInfo.rent+"元("+houseInfo.rentCycle+"/"+houseInfo.rentCycleUnit+")";
|
||||
baseInfo.nextRent = formatTime2(houseInfo.lastRentDate);
|
||||
}else{
|
||||
baseInfo.rentTime = "-";
|
||||
baseInfo.rentPrice = "-";
|
||||
baseInfo.nextRent = "-";
|
||||
}
|
||||
}
|
||||
baseInfo.estatetype=houseInfo.estatetype;
|
||||
baseInfo.totalPrice=houseInfo.totalPrice;
|
||||
baseInfo.price=houseInfo.price;
|
||||
@@ -407,6 +453,23 @@ function init(){
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
function formatTime(time){
|
||||
var now = new Date(time);
|
||||
var year=now.getFullYear();
|
||||
var month=now.getMonth()+1;
|
||||
var date=now.getDate();
|
||||
return year+"/"+month+"/"+date;
|
||||
|
||||
}
|
||||
function formatTime2(time){
|
||||
var now = new Date(time);
|
||||
var year=now.getFullYear();
|
||||
var month=now.getMonth()+1;
|
||||
var date=now.getDate();
|
||||
return month+"月"+date+"日";
|
||||
|
||||
}
|
||||
function openMapWindow(){
|
||||
clicked('/views/district/arround.html',true,false,{},{city:city,region:region,name:name,lat:lat,lng:lng});
|
||||
}
|
||||
@@ -425,6 +488,7 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
onClick: function() {
|
||||
$('.open-vertical-modal').text('自住');
|
||||
addManagement(id, houseStatus, "自住");
|
||||
$('.rentBox').hide();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -432,6 +496,7 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
onClick: function() {
|
||||
$('.open-vertical-modal').text('出租');
|
||||
addManagement(id, houseStatus, "出租");
|
||||
$('.rentBox').show();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -439,6 +504,7 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
onClick: function() {
|
||||
$('.open-vertical-modal').text('空置');
|
||||
addManagement(id, houseStatus, "空置");
|
||||
$('.rentBox').hide();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -514,6 +580,9 @@ function openNewView(viewHtml) {
|
||||
function gotoLoanApply(){
|
||||
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: oriCity, mobile: ""},function(){})
|
||||
}
|
||||
function gotoRentManager(){
|
||||
clicked('/views/rent/rentManager.html',true,false,{},{houseId: houseId},function(){})
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
<div class="card cardNearby" v-for="nearDist in myCityMap.nears" @click="showDistrictDetail(index, myCityMap.city)">
|
||||
<div class="card-header">{{nearDist.sname}}</div>
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner">{{nearDist.avgPrice}}元/㎡</div>
|
||||
<div class="card-content-inner">{{nearDist.avgPrice==0?"暂无":nearDist.avgPrice+"元/㎡"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
|
||||
}
|
||||
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'>"+result.name+" <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{
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current" id="regionInfo">
|
||||
<header class="bar bar-nav barBorder">
|
||||
<header class="bar bar-nav barBorder">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<h1 class="title">{{city}}各区县涨跌排行</h1>
|
||||
</header>
|
||||
<div class="content infinite-scroll infinite-scroll-bottom pstion" data-distance="50">
|
||||
<div class="content infinite-scroll infinite-scroll-bottom pstion" id="hasDataDiv" data-distance="50">
|
||||
<div class="cardNearbyBox cardNearbyBox01 cardRankingBox">
|
||||
<div class="cardNearbyWin">
|
||||
<div class="card cardNearby cardRanking" v-for="(info,index) in regionInfos" v-if="index < 3">
|
||||
@@ -69,8 +69,14 @@
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- 暂无数据效果 -->
|
||||
<div class="content contentSuggest dn" id="noDataDiv" style="display: none;">
|
||||
<div class="noData">
|
||||
<img src="../../images/noData.png">
|
||||
<p>{{city}}各区县涨跌排行数据目前仍在更新<br>敬请期待</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -112,7 +118,6 @@ $.config = {router: false}
|
||||
var city = self.city
|
||||
regionsInfoVue.$data.city = city;
|
||||
loadRegionInfo(city);
|
||||
|
||||
}
|
||||
|
||||
//loadRegionInfo("上海");
|
||||
@@ -123,14 +128,19 @@ $.config = {router: false}
|
||||
}
|
||||
}).then(function (response) {
|
||||
var msg = response.data.data;
|
||||
if(msg){
|
||||
for(var i in msg){
|
||||
var da = msg[i]
|
||||
da.oneMonthUpDownRange = (da.oneMonthUpDownRange*100).toFixed(2)
|
||||
if(response.data.status){
|
||||
if(msg!=null && msg.length>0){
|
||||
for(var i in msg){
|
||||
var da = msg[i]
|
||||
da.oneMonthUpDownRange = (da.oneMonthUpDownRange*100).toFixed(2)
|
||||
}
|
||||
regionsInfoVue.$data.regionInfos = msg;
|
||||
}else{
|
||||
//控制显示无数据效果
|
||||
$('#hasDataDiv').hide();
|
||||
$('#noDataDiv').show();
|
||||
}
|
||||
regionsInfoVue.$data.regionInfos = msg;
|
||||
}
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<header class="bar bar-nav">
|
||||
<button class="button button-link button-nav pull-left" onclick="history.go(-1)">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<h1 class="title">出租管理</h1>
|
||||
@@ -126,33 +126,42 @@ $.config = {router: false}
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
function onPlusReady() {
|
||||
var self = plus.webview.currentWebview();
|
||||
id = self.id
|
||||
id = self.houseId
|
||||
axios.get('/rest/rent/queryHouseRent',{params:{id:id}}).then(function(response){
|
||||
var data = response.data.data.houses;
|
||||
$.each(data,function(i){
|
||||
var active = "";
|
||||
var houseRoomNum = "";
|
||||
if(this.id == id){
|
||||
active = "active"
|
||||
}
|
||||
if(this.houseRoomNum){
|
||||
houseRoomNum = '<small>'+this.houseRoomNum+'</small>';
|
||||
}
|
||||
$("#titleList").append('<a v-bind:val="'+this.id+'" class="tab-link button '+active+'">'+
|
||||
'<label>'+this.name+'</label>'+houseRoomNum+'</a>')
|
||||
$(".buttons-tab01 a").click(function(){
|
||||
var id = $(this).attr("val")
|
||||
window.location.href = "index?id="+id;
|
||||
});
|
||||
})
|
||||
// var data = response.data.data.houses;
|
||||
// $.each(data,function(i){
|
||||
// var active = "";
|
||||
// var houseRoomNum = "";
|
||||
// if(this.id == id){
|
||||
// active = "active"
|
||||
// }
|
||||
// if(this.houseRoomNum){
|
||||
// houseRoomNum = '<small>'+this.houseRoomNum+'</small>';
|
||||
// }
|
||||
// $("#titleList").append('<a v-bind:val="'+this.id+'" class="tab-link button '+active+'">'+
|
||||
// '<label>'+this.name+'</label>'+houseRoomNum+'</a>')
|
||||
// $(".buttons-tab01 a").click(function(){
|
||||
// var id = $(this).attr("val")
|
||||
// window.location.href = "index?id="+id;
|
||||
// });
|
||||
// })
|
||||
var houseInfo = response.data.data.houseInfo;
|
||||
edit.liveStatus=houseInfo.liveStatus;
|
||||
edit.leaseStartDate=getNowFormatDate(houseInfo.leaseStartDate);
|
||||
edit.leaseEndDate = getNowFormatDate(houseInfo.leaseEndDate);
|
||||
edit.lastRentDate = getNowFormatDate(houseInfo.lastRentDate);
|
||||
edit.nowDay = getNowFormatDate(response.data.data.nowDay);
|
||||
edit.rent = houseInfo.rent;
|
||||
edit.cycle = response.data.data.cycle;
|
||||
if(houseInfo.liveStatus=="出租"){
|
||||
edit.liveStatus=houseInfo.liveStatus;
|
||||
edit.leaseStartDate=getNowFormatDate(houseInfo.leaseStartDate);
|
||||
edit.leaseEndDate = getNowFormatDate(houseInfo.leaseEndDate);
|
||||
edit.lastRentDate = getNowFormatDate(houseInfo.lastRentDate);
|
||||
edit.nowDay = getNowFormatDate(response.data.data.nowDay);
|
||||
if(houseInfo.rent==0){
|
||||
edit.rent = "";
|
||||
}else{
|
||||
edit.rent = houseInfo.rent;
|
||||
}
|
||||
edit.cycle = response.data.data.cycle;
|
||||
}else{
|
||||
edit.cycle = "1 月 /次";
|
||||
}
|
||||
|
||||
/* 选择-起租日期 */
|
||||
$("#input_time01").datetimePicker({
|
||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
|
||||
@@ -202,7 +211,6 @@ function onPlusReady() {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
//var id="165878889770385408"
|
||||
/* 编辑状态-确定 */
|
||||
$(document).on('click','#confirm_btn', function () {
|
||||
|
||||
@@ -281,6 +289,7 @@ function onPlusReady() {
|
||||
}
|
||||
|
||||
axios.post("/rest/rent/changeStatus",d).then(function(response){
|
||||
plus.webview.getWebviewById('/views/house/detail.html').reload();
|
||||
back(),plus.nativeUI.closeWaiting();
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
|
||||
@@ -119,6 +119,18 @@ $(".check").on("click", function () {
|
||||
function openView() {
|
||||
clicked(BASE_PATH + '/user/agreement',true)
|
||||
}
|
||||
|
||||
var originalHeight=document.documentElement.clientHeight || document.body.clientHeight;
|
||||
window.onresize=function(){
|
||||
//软键盘弹起与隐藏 都会引起窗口的高度发生变化
|
||||
var resizeHeight=document.documentElement.clientHeight || document.body.clientHeight;
|
||||
if(resizeHeight*1<originalHeight*1){ //resizeHeight<originalHeight证明窗口被挤压了
|
||||
plus.webview.currentWebview().setStyle({
|
||||
height:originalHeight
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user