增加是否续贷

This commit is contained in:
2022-07-12 16:49:36 +08:00
parent c99e512699
commit 54e6e80a9a
5 changed files with 131 additions and 10 deletions
@@ -918,6 +918,19 @@ public class WeiXinEvaluationController {
return jsonMmodel; return jsonMmodel;
} }
public Object saveBhLoanAction(EvaluationModel model){
JsonModel jsonMmodel = new JsonModel();
if(StringUtils.isNotBlank(model.getEvaluationId())){
FjtEvaluation fjtEvaluation = fjtEvaluationService.findEvaluationById(Long.valueOf(model.getEvaluationId()));
if(fjtEvaluation != null && fjtEvaluation.getLoan()!=model.getLoan()){
fjtEvaluation.setLoan(model.getLoan());
fjtEvaluation.setLastUpdated(new Date());
fjtEvaluationService.updateEvaluation(fjtEvaluation);
}
}
return jsonMmodel;
}
//刷新审核价 //刷新审核价
public Object refreshAuditPriceAction(EvaluationModel model){ public Object refreshAuditPriceAction(EvaluationModel model){
JsonModel jsonMmodel = new JsonModel(); JsonModel jsonMmodel = new JsonModel();
@@ -1106,9 +1119,15 @@ public class WeiXinEvaluationController {
public Object checkImageAction(EvaluationModel model){ public Object checkImageAction(EvaluationModel model){
JsonModel jsonModel = new JsonModel(); JsonModel jsonModel = new JsonModel();
if (StringUtils.isNotBlank(model.getEvaluationId())){ if (StringUtils.isNotBlank(model.getEvaluationId())){
List<ReportFileAttach> datas = reportFileAttachService.findHouseImage(Integer.valueOf(model.getEvaluationId()), 3); List<ReportFileAttach> datas3 = reportFileAttachService.findHouseImage(Integer.valueOf(model.getEvaluationId()), 3);
Map<String, Integer> data = new HashMap<String, Integer>(); Map<String, Integer> data = new HashMap<String, Integer>();
data.put("count", datas.size()); data.put("count_3", datas3.size());
FjtEvaluation evaluation = fjtEvaluationService.findEvaluationById(Long.valueOf(model.getEvaluationId()));
if(evaluation!=null && evaluation.getLoan()!=null && evaluation.getLoan()==1){
List<ReportFileAttach> datas5 = reportFileAttachService.findHouseImage(Integer.valueOf(model.getEvaluationId()), 5);
data.put("count_5", datas5.size());
}
jsonModel.setJsonModel(data); jsonModel.setJsonModel(data);
} }
return jsonModel; return jsonModel;
@@ -1287,7 +1306,7 @@ public class WeiXinEvaluationController {
FjtUsers fjtUser = fjtUsersService.findById(Long.valueOf(userId)); FjtUsers fjtUser = fjtUsersService.findById(Long.valueOf(userId));
UsersDetail usersDetail = usersDetailService.findById(fjtUser.getId()); UsersDetail usersDetail = usersDetailService.findById(fjtUser.getId());
try { try {
String id = new ObjectId().toString();
List<File> uploadfiles = new ArrayList<File>(); List<File> uploadfiles = new ArrayList<File>();
for (CommonsMultipartFile file : files) { for (CommonsMultipartFile file : files) {
if (file.getSize() == 0 ) { if (file.getSize() == 0 ) {
@@ -1319,6 +1338,8 @@ public class WeiXinEvaluationController {
} catch (IOException e) { } catch (IOException e) {
//处理异常信息 //处理异常信息
} }
String id = new ObjectId().toString();
reportFileAttach = new ReportFileAttach(); reportFileAttach = new ReportFileAttach();
reportFileAttach.setEvaluationId(Integer.valueOf(model.getEvaluationId())); reportFileAttach.setEvaluationId(Integer.valueOf(model.getEvaluationId()));
reportFileAttach.setQueryId(model.getQueryId()); reportFileAttach.setQueryId(model.getQueryId());
@@ -45,6 +45,7 @@ public class EvaluationModel extends BaseModel{
private Map<String, Object> loanInfoMap; private Map<String, Object> loanInfoMap;
private Integer hopePrice; private Integer hopePrice;
private String remark; private String remark;
private Integer loan;
// private String preCode;//眾漆諉諳--瞼攫晤鎢 // private String preCode;//眾漆諉諳--瞼攫晤鎢
// private String preName;//眾漆諉諳--瞼攫靡備 // private String preName;//眾漆諉諳--瞼攫靡備
// private String countryCode;//眾漆諉諳--Е郖晤鎢 // private String countryCode;//眾漆諉諳--Е郖晤鎢
@@ -317,4 +318,12 @@ public class EvaluationModel extends BaseModel{
public void setAddress(String address) { public void setAddress(String address) {
this.address = address; this.address = address;
} }
public Integer getLoan() {
return loan;
}
public void setLoan(Integer loan) {
this.loan = loan;
}
} }
@@ -190,6 +190,36 @@ $('#submitRemark').on('click', function () {
} }
}); });
$('#submitLoan').on('click', function () {
var opt = $("#submitLoan").text();
if(opt == "修改"){
$(this).parent().find("span").eq(1).hide()
$("input[name=loan]").removeClass("dn");
$("#submitLoan").text("保存");
}else{
var loan = $("input[name=loan]").val();
if(loan == ""){
$.toast("请输入是否续贷");
}else{
$.ajax({
url:"saveBhLoan",
data:{
evaluationId:eId,
loan:loan
},
dataType:"json",
success:function(data){
$("#submitLoan").remove();
$("input[name=loan]").remove();
$("#refreshPrice0").show();
location.href ="bhreport?evaluationId="+eId;
}
})
}
}
});
$('#refreshPrice,#refreshPrice0').on('click', function () { $('#refreshPrice,#refreshPrice0').on('click', function () {
$.ajax({ $.ajax({
url:"refreshAuditPrice", url:"refreshAuditPrice",
@@ -308,10 +338,20 @@ $('.formal_btn').on('click', function () {
}, },
dataType:"json", dataType:"json",
success:function(data){ success:function(data){
if(data && data.count>0){ if(isLoan && isLoan==1){
clickFormalReport() if(data.count_5==0){
$.alert('请上传产调报告或权籍!');
}else if(data.count_3==0){
$.alert('请上传房屋照片!');
}else{
clickFormalReport()
}
}else{ }else{
$.alert('请上传房屋照片!'); if(data.count_3==0){
$.alert('请上传房屋照片!');
}else{
clickFormalReport()
}
} }
} }
}) })
@@ -134,7 +134,7 @@ input::-webkit-input-placeholder{
.inputTopic01{margin-bottom:-1px;} .inputTopic01{margin-bottom:-1px;}
.inputTopic01 .topicTitle,.inputTopic02 .topicTitle{margin-right:0;border:none;line-height:2.5rem;} .inputTopic01 .topicTitle,.inputTopic02 .topicTitle{margin-right:0;border:none;line-height:2.5rem;}
.inputTopic01 .topicTitle .input_price{width:20%;padding-left:5px;} .inputTopic01 .topicTitle .input_price{width:20%;padding-left:5px;}
.inputTopic02 .topicTitle .input_lender{width:40%;padding-left:5px;} .inputTopic02 .topicTitle .input_lender{width:39%;padding-left:5px;line-height: 28px;}
.inputTopic02 .topicTitle .input_cardId{width:35%;padding-left:5px;} .inputTopic02 .topicTitle .input_cardId{width:35%;padding-left:5px;}
.submit_btn{width:90px;border-left:solid 1px #e7e7e7;float:right;padding-right:0;text-align:center;cursor:pointer;} .submit_btn{width:90px;border-left:solid 1px #e7e7e7;float:right;padding-right:0;text-align:center;cursor:pointer;}
.left01{float:left;margin-right:8%;} .left01{float:left;margin-right:8%;}
@@ -132,6 +132,18 @@
</div> </div>
</#if> </#if>
<div class="topic inputTopic02" id="inputTopic02b" style="border-bottom:none;margin-bottom:0;">
<div class="topicTitle topicTitle01">
<span>是否续贷:</span>
<input class="input_lender" name="loan" id="loan" type="hidden" required/>
<p class="di"><a href="#" class="create-actions01"><#if fjtEvaluation.loan?? && fjtEvaluation.loan==1>是<#elseif fjtEvaluation.loan?? && fjtEvaluation.loan==0>否<#else>请选择</#if></a></p>
<a class="submit_btn" id="submitLoan" style="border-left: none;"><#if fjtEvaluation.loan??>修改<#else>提交</#if></a>
</div>
<div class="topicTitle topicTitle01" style="color: #F4A460;font-size: 12px;line-height: 20px;margin-top: -5px;">
注:如出具正式报告时,需上传产调报告或权籍
</div>
</div>
<form id="fileForm" enctype="multipart/form-data" method="post" name="fileForm"> <form id="fileForm" enctype="multipart/form-data" method="post" name="fileForm">
<input type="hidden" name="evaluationId" value="${fjtEvaluation.id}"> <input type="hidden" name="evaluationId" value="${fjtEvaluation.id}">
<input type="hidden" name="queryId" value="<#if bohaiEvaluationAudit??>${bohaiEvaluationAudit.queryId}</#if>"> <input type="hidden" name="queryId" value="<#if bohaiEvaluationAudit??>${bohaiEvaluationAudit.queryId}</#if>">
@@ -139,7 +151,7 @@
<#if reportFileMap??> <#if reportFileMap??>
<div class="topicTitle topicTitle01 "> <div class="topicTitle topicTitle01 ">
<span>已上传文件:</span> <span>已上传文件:</span>
<#if reportFileMap["1"]??><span>询价单(${reportFileMap["1"]?size})</span></#if> <#if reportFileMap["5"]??><span>产调报告或权籍(${reportFileMap["5"]?size})</span></#if>
<#if reportFileMap["2"]??><label style="margin-left: 10px;">产证(${reportFileMap["2"]?size})</label></#if> <#if reportFileMap["2"]??><label style="margin-left: 10px;">产证(${reportFileMap["2"]?size})</label></#if>
<#if reportFileMap["3"]??><label style="margin-left: 10px;">房屋照片(${reportFileMap["3"]?size})</label></#if> <#if reportFileMap["3"]??><label style="margin-left: 10px;">房屋照片(${reportFileMap["3"]?size})</label></#if>
<#if reportFileMap["4"]??><label style="margin-left: 10px;">其它附件(${reportFileMap["4"]?size})</label></#if> <#if reportFileMap["4"]??><label style="margin-left: 10px;">其它附件(${reportFileMap["4"]?size})</label></#if>
@@ -456,6 +468,10 @@
<script type="text/javascript"> <script type="text/javascript">
var eId = '${fjtEvaluation.id!}'; var eId = '${fjtEvaluation.id!}';
var role = ${role} var role = ${role}
var isLoan = null
<#if fjtEvaluation?? && fjtEvaluation.loan??>
isLoan = ${fjtEvaluation.loan}
</#if>
showOtherSource(eId); showOtherSource(eId);
//showTradeReference(eId); //showTradeReference(eId);
showHouseReference(eId); showHouseReference(eId);
@@ -522,11 +538,11 @@
label: true label: true
}, },
{ {
text: '询价单', text: '产调报告或权籍',
bold: true, bold: true,
onClick: function () { onClick: function () {
$("a.create-actions08").empty().text(this.text).addClass("selected") $("a.create-actions08").empty().text(this.text).addClass("selected")
$("#fileClass").val("1") $("#fileClass").val("5")
$("input[name=reportFiles]").attr("accept","image/*") $("input[name=reportFiles]").attr("accept","image/*")
} }
}, },
@@ -576,6 +592,41 @@ function changeFile(d){
// } // }
} }
} }
$(document).on('click', '.create-actions01', function () {
var buttons1 = [
{
text: '请选择是否续贷',
label: true
},
{
text: '是',
bold: true,
onClick: function () {
$("#loan").empty().text(this.text).addClass("selected")
$(".create-actions01").text(this.text)
$("#loan").val("1")
}
},
{
text: '否',
onClick: function () {
$("#loan").empty().text(this.text).addClass("selected")
$(".create-actions01").text(this.text)
$("#loan").val("0")
}
}
];
var buttons2 = [
{
text: '取消',
bg: 'gray'
}
];
var groups = [buttons1, buttons2];
$.actions(groups);
});
</script> </script>
</body> </body>
</html> </html>