aa
This commit is contained in:
@@ -197,7 +197,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-block">
|
<div class="content-block">
|
||||||
<p><a id="evaluation_btn" class="button button-big button-fill theme" id="evaluation_btn">提交评估</a></p>
|
<p><button id="evaluation_btn" class="button button-big button-fill theme" id="evaluation_btn" style="width:100%">提交评估</button></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1652,7 +1652,7 @@ $("#input_status").click(function(e){
|
|||||||
|
|
||||||
/* 错误提示 */
|
/* 错误提示 */
|
||||||
$("#evaluation_btn").on("click", function () {
|
$("#evaluation_btn").on("click", function () {
|
||||||
$.showPreloader();
|
$("#evaluation_btn").attr("disabled","disabled");
|
||||||
var a = $("#input_city").val();
|
var a = $("#input_city").val();
|
||||||
var b = $("#input_address").val();
|
var b = $("#input_address").val();
|
||||||
var c = $("#input_houseType").val();
|
var c = $("#input_houseType").val();
|
||||||
@@ -1661,105 +1661,105 @@ $("#evaluation_btn").on("click", function () {
|
|||||||
var f = $("#input_area").val();
|
var f = $("#input_area").val();
|
||||||
|
|
||||||
if(a == ""){
|
if(a == ""){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("请选择城市");
|
$.toast("请选择城市");
|
||||||
return false;
|
return false;
|
||||||
}else if(b == ""){
|
}else if(b == ""){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("请选择房屋地址");
|
$.toast("请选择房屋地址");
|
||||||
return false;
|
return false;
|
||||||
}else if(c == ""){
|
}else if(c == ""){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("请选择房屋类型");
|
$.toast("请选择房屋类型");
|
||||||
return false;
|
return false;
|
||||||
}else if(d == ""){
|
}else if(d == ""){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("请选择楼栋室号");
|
$.toast("请选择楼栋室号");
|
||||||
return false;
|
return false;
|
||||||
}else if(e == ""){
|
}else if(e == ""){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("楼层不能为空!");
|
$.toast("楼层不能为空!");
|
||||||
return false;
|
return false;
|
||||||
}else if(e.indexOf("所在楼层")!= -1){
|
}else if(e.indexOf("所在楼层")!= -1){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("所在楼层不能为空!");
|
$.toast("所在楼层不能为空!");
|
||||||
return false;
|
return false;
|
||||||
}else if(e.indexOf("总楼层")!= -1){
|
}else if(e.indexOf("总楼层")!= -1){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("总楼层不能为空!");
|
$.toast("总楼层不能为空!");
|
||||||
return false;
|
return false;
|
||||||
}else if(f == ""){
|
}else if(f == ""){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("请输入房屋面积");
|
$.toast("请输入房屋面积");
|
||||||
return false;
|
return false;
|
||||||
}else if(!$("#input_area").isPositiveFloat() || f=='0'){
|
}else if(!$("#input_area").isPositiveFloat() || f=='0'){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("请输入正确的面积!")
|
$.toast("请输入正确的面积!")
|
||||||
return false
|
return false
|
||||||
}else if(Number(f)<10 || Number(f)>1000){
|
}else if(Number(f)<10 || Number(f)>1000){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("面积范围10-1000㎡");
|
$.toast("面积范围10-1000㎡");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(type==0){
|
if(type==0){
|
||||||
if($("#input_status").val()=='出租'){
|
if($("#input_status").val()=='出租'){
|
||||||
if($("#input_time01").isBlank()){
|
if($("#input_time01").isBlank()){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("请选择起租日期")
|
$.toast("请选择起租日期")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("#input_time02").isBlank()){
|
if($("#input_time02").isBlank()){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("请选择到期日期")
|
$.toast("请选择到期日期")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#input_time01").val()>$("#input_time02").val()){
|
if($("#input_time01").val()>$("#input_time02").val()){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("到期日期必须晚于起租日期");
|
$.toast("到期日期必须晚于起租日期");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var nowDay = new Date().format("yyyy-MM-dd");
|
var nowDay = new Date().format("yyyy-MM-dd");
|
||||||
if($("#input_time02").val()<nowDay){
|
if($("#input_time02").val()<nowDay){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("到期日期不能早于今天");
|
$.toast("到期日期不能早于今天");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var g = $("#input_rent").val();
|
var g = $("#input_rent").val();
|
||||||
if($("#input_rent").isBlank()){
|
if($("#input_rent").isBlank()){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("请输入每期租金")
|
$.toast("请输入每期租金")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Number(g)<100 || Number(g)>200000){
|
if(Number(g)<100 || Number(g)>200000){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("租金范围100-200000元");
|
$.toast("租金范围100-200000元");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$("#input_rent").isPositiveInteger()){
|
if(!$("#input_rent").isPositiveInteger()){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("每期租金必须是整数")
|
$.toast("每期租金必须是整数")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#input_cycle").isBlank()){
|
if($("#input_cycle").isBlank()){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("收租周期不能为空")
|
$.toast("收租周期不能为空")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#input_time03").isBlank()){
|
if($("#input_time03").isBlank()){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("下次收租日期不能为空")
|
$.toast("下次收租日期不能为空")
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#input_time03").val()>$("#input_time02").val()){
|
if($("#input_time03").val()>$("#input_time02").val()){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("收租日期不能晚于到期日期");
|
$.toast("收租日期不能晚于到期日期");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#input_time03").val()<i){
|
if($("#input_time03").val()<i){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("下次收租日期不能早于今天");
|
$.toast("下次收租日期不能早于今天");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1768,14 +1768,14 @@ $("#evaluation_btn").on("click", function () {
|
|||||||
if(c && c.indexOf("别墅")<0){
|
if(c && c.indexOf("别墅")<0){
|
||||||
var num = e.replace(/第/g,"").replace(/层/g,"").replace(/共/g,"").split(" ");
|
var num = e.replace(/第/g,"").replace(/层/g,"").replace(/共/g,"").split(" ");
|
||||||
if(parseInt(num[0])>parseInt(num[1])){
|
if(parseInt(num[0])>parseInt(num[1])){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("总楼层选择错误!")
|
$.toast("总楼层选择错误!")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("#cityAddress").val() != "" && $("#cityAddress").val() != $("#input_city").val()){
|
if($("#cityAddress").val() != "" && $("#cityAddress").val() != $("#input_city").val()){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast("城市和房屋地址不匹配")
|
$.toast("城市和房屋地址不匹配")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -1798,8 +1798,7 @@ $("#evaluation_btn").on("click", function () {
|
|||||||
$("#input_city").val(district.city)
|
$("#input_city").val(district.city)
|
||||||
checkIsLogin();
|
checkIsLogin();
|
||||||
}else{
|
}else{
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
// $("#nextBtn").attr("disabled", false)
|
|
||||||
console.log("error");
|
console.log("error");
|
||||||
$.toast(response.data.message)
|
$.toast(response.data.message)
|
||||||
}
|
}
|
||||||
@@ -1813,7 +1812,7 @@ $("#evaluation_btn").on("click", function () {
|
|||||||
//var loginFlag=false;
|
//var loginFlag=false;
|
||||||
function checkIsLogin(){
|
function checkIsLogin(){
|
||||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
clicked('/views/user/codeSms.html',true,false,{},{},function(){
|
clicked('/views/user/codeSms.html',true,false,{},{},function(){
|
||||||
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
|
||||||
|
|
||||||
@@ -1860,13 +1859,13 @@ function addEvaluation(){
|
|||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
if(response.data.data!=null && response.data.data.success){
|
if(response.data.data!=null && response.data.data.success){
|
||||||
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
var id = response.data.data.id;
|
var id = response.data.data.id;
|
||||||
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
|
||||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||||
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id})
|
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id})
|
||||||
$.hidePreloader();
|
|
||||||
}else{
|
}else{
|
||||||
$.hidePreloader();
|
$("#evaluation_btn").removeAttr("disabled");
|
||||||
$.toast(response.data.message);
|
$.toast(response.data.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user