This commit is contained in:
xuhe@fangjia.com
2018-04-12 15:01:32 +08:00
parent 3cbfd87acd
commit 38c8b2ce75
5 changed files with 149 additions and 145 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ function addEstate(number, lastIndex) {
}
}
html+= '<li>'+
'<a onclick="clicked(\'${basePath}/district/details?city='+this.city+'&region='+this.region+'&name='+this.name+'\',true)" class="item-content">'+
'<a onclick="gotoDistrictDetail(\''+this.city+'\',\''+this.region+'\',\''+this.name+'\')" class="item-content">'+
'<div class="item-inner">'+
'<div class="item-title-row">'+
'<div class="item-title">'+this.name+'</div>'+
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>贷款申请</title>
<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">
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title id="title2"></title>
<title id="title2">咨询详情</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">
+139 -141
View File
@@ -123,146 +123,86 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
<script>
// 获取周期 1-30
function getnumber(){
var data = new Array();
for(var i=1;i<31;i++){
data.push(i);
}
return data;
};
///* 错误提示 */
//$("#confirm_btn").on("click", function () {
// var a = $("#input_time01").val();
// var b = $("#input_time02").val();
// var c = $("#input_rent01").val();
// var d = $("#input_time03").val();
// if(a == ""){
// $.toast("请选择起租日期");
// return false;
// }
// else if(b == ""){
// $.toast("请选择到期日期");
// return false;
// }
// else if(c == ""){
// $.toast("请输入每期租金");
// return false;
// }
// else if(d == ""){
// $.toast("请选择下次收租日期");
// return false;
// }
//});
</script>
<script>
var edit = new Vue({
el:"#edit",
data:{liveStatus:"",leaseStartDate:"",leaseEndDate:"",lastRentDate:"",nowDay:"",rent:"",cycle:""}
});
function getNowFormatDate(time) {
if(typeof(time)=="undefined"||time==null){
return ""
}
var date = new Date(time)
var seperator1 = "-";
var year = date.getFullYear();
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = year + seperator1 + month + seperator1 + strDate;
return currentdate;
}
var id="165878889770385408"
$(function (){
//var self = plus.webview.currentWebview();
// id = self.newsId;
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 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;
/* 选择-起租日期 */
$("#input_time01").datetimePicker({
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
<button class="button button-link pull-right close-picker">确定</button>\
<h1 class="title">起租日期</h1>\
</header>'
});
/* 选择-到期日期 */
$("#input_time02").datetimePicker({
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
<button class="button button-link pull-right close-picker">确定</button>\
<h1 class="title">到期日期</h1>\
</header>'
});
/* 选择-下次收租日期 */
$("#input_time03").datetimePicker({
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
<button class="button button-link pull-right close-picker">确定</button>\
<h1 class="title">下次收租日期</h1>\
</header>'
});
/* 选择-收租周期 */
$("#input_cycle").picker({
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
<button class="button button-link pull-right close-picker">确定</button>\
<h1 class="title">收租周期</h1>\
</header>',
cols: [
{
textAlign: 'center',
values: getnumber()
},
{
textAlign: 'center',
values: ["年", "季", "月"]
},
{
textAlign: 'center',
values: ["/次"]
}
]
});
}).catch(function(error){
console.log(error)
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
id = self.id
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 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;
/* 选择-起租日期 */
$("#input_time01").datetimePicker({
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
<button class="button button-link pull-right close-picker">确定</button>\
<h1 class="title">起租日期</h1>\
</header>'
});
})
/* 选择-到期日期 */
$("#input_time02").datetimePicker({
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
<button class="button button-link pull-right close-picker">确定</button>\
<h1 class="title">到期日期</h1>\
</header>'
});
/* 选择-下次收租日期 */
$("#input_time03").datetimePicker({
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
<button class="button button-link pull-right close-picker">确定</button>\
<h1 class="title">下次收租日期</h1>\
</header>'
});
/* 选择-收租周期 */
$("#input_cycle").picker({
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
<button class="button button-link pull-right close-picker">确定</button>\
<h1 class="title">收租周期</h1>\
</header>',
cols: [
{
textAlign: 'center',
values: getnumber()
},
{
textAlign: 'center',
values: ["年", "季", "月"]
},
{
textAlign: 'center',
values: ["/次"]
}
]
});
}).catch(function(error){
console.log(error)
});
//var id="165878889770385408"
/* 编辑状态-确定 */
$(document).on('click','#confirm_btn', function () {
@@ -341,12 +281,70 @@ $("#input_cycle").picker({
}
axios.post("/rest/rent/changeStatus",d).then(function(response){
//$.toast(response.data.data);
console.log(1);
back(),plus.nativeUI.closeWaiting();
}).catch(function(error){
console.log(error)
});
});
}
// 获取周期 1-30
function getnumber(){
var data = new Array();
for(var i=1;i<31;i++){
data.push(i);
}
return data;
};
///* 错误提示 */
//$("#confirm_btn").on("click", function () {
// var a = $("#input_time01").val();
// var b = $("#input_time02").val();
// var c = $("#input_rent01").val();
// var d = $("#input_time03").val();
// if(a == ""){
// $.toast("请选择起租日期");
// return false;
// }
// else if(b == ""){
// $.toast("请选择到期日期");
// return false;
// }
// else if(c == ""){
// $.toast("请输入每期租金");
// return false;
// }
// else if(d == ""){
// $.toast("请选择下次收租日期");
// return false;
// }
//});
var edit = new Vue({
el:"#edit",
data:{liveStatus:"",leaseStartDate:"",leaseEndDate:"",lastRentDate:"",nowDay:"",rent:"",cycle:""}
});
function getNowFormatDate(time) {
if(typeof(time)=="undefined"||time==null){
return ""
}
var date = new Date(time)
var seperator1 = "-";
var year = date.getFullYear();
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = year + seperator1 + month + seperator1 + strDate;
return currentdate;
}
</script>
</body>
</html>
+7 -1
View File
@@ -305,7 +305,13 @@ function gotoUpdatePass(){
function gotoLoanApply(houseId, city){
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: city, mobile: _mobile},function(){})
}
//跳转到小区详情
function gotoDistrictDetail(city,region,name){
alert(city)
alert(region)
alert(name)
clicked('/views/district/detail.html',true,false,{},{city:city,region:region,name:name},function(){})
}
//跳转房产详情
function gotoHouseDetail(id){
clicked('/views/house/detail.html',true,false,{},{houseId:id},function(){