aa
This commit is contained in:
@@ -333,7 +333,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,38 @@
|
||||
</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">2018/02/01 - 2018/07/31</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">每期租金</div>
|
||||
<div class="item-after">5,000元 (1月/次)</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">下次收租</div>
|
||||
<div class="item-after">3月1日</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topic">
|
||||
<div class="topicContent" style="padding:0.5rem 0;">
|
||||
<div class="list-block">
|
||||
@@ -297,7 +329,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 +345,6 @@ function onPlusReady(){
|
||||
//houseId="106777351102136320";
|
||||
init();
|
||||
}
|
||||
|
||||
var baseInfo = new Vue({
|
||||
el: '#baseInfo',
|
||||
data: {
|
||||
@@ -339,7 +370,10 @@ var baseInfo = new Vue({
|
||||
rate:"",
|
||||
minSellPrice:"",
|
||||
maxSellPrice:"",
|
||||
rentRooms:""
|
||||
rentRooms:"",
|
||||
rentTime : "-";
|
||||
rentPrice : "-";
|
||||
nextRent : "-";
|
||||
}
|
||||
})
|
||||
|
||||
@@ -388,7 +422,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 +452,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 +487,7 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
onClick: function() {
|
||||
$('.open-vertical-modal').text('自住');
|
||||
addManagement(id, houseStatus, "自住");
|
||||
$('.rentBox').hide();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -432,6 +495,7 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
onClick: function() {
|
||||
$('.open-vertical-modal').text('出租');
|
||||
addManagement(id, houseStatus, "出租");
|
||||
$('.rentBox').show();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -439,6 +503,7 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
onClick: function() {
|
||||
$('.open-vertical-modal').text('空置');
|
||||
addManagement(id, houseStatus, "空置");
|
||||
$('.rentBox').hide();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -514,6 +579,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>
|
||||
|
||||
@@ -126,7 +126,7 @@ $.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){
|
||||
@@ -281,6 +281,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