回购信息录入校验修改
This commit is contained in:
parent
3e3ef38517
commit
6bfa2b704f
@ -517,6 +517,7 @@
|
||||
<attribute name="SECOND_OVERDUE_INTEREST" label="逾期第二期利息" type="STRING" length="32"/>
|
||||
<attribute name="SECOND_OVERDUE_PENALTY" label="逾期第二期罚息" type="STRING" length="32"/>
|
||||
<attribute name="BUYBACK_MONEY" label="实际回购总金额" type="STRING" length="32"/>
|
||||
<attribute name="ALL_REMAIN_MONEY" label="回购金额(本金+利息),不包含罚息" type="STRING" length="32"/>
|
||||
<attribute name="VOUCHER_STATUS" label="凭证状态:0,未生成,1,已生成" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
String secondOverdueInterest = CurPage.getParameter("secondOverdueInterest");
|
||||
String overdueList = CurPage.getParameter("overdueList");
|
||||
String voucherStatus = CurPage.getParameter("voucherStatus");
|
||||
String allRemainMoney = CurPage.getParameter("allRemainMoney");
|
||||
String readOnly = "0";
|
||||
if("1".equals(voucherStatus)){
|
||||
readOnly="1";
|
||||
@ -35,20 +36,18 @@
|
||||
setItemValue(0,0,"SECOND_OVERDUE_CORPUS","<%=secondOverdueCorpus%>");
|
||||
setItemValue(0,0,"SECOND_OVERDUE_INTEREST","<%=secondOverdueInterest%>");
|
||||
setItemValue(0,0,"OVERDUE_LIST","<%=overdueList%>");
|
||||
setItemValue(0,0,"ALL_REMAIN_MONEY","<%=allRemainMoney%>");
|
||||
}
|
||||
}
|
||||
function returnList(){
|
||||
AsControl.OpenComp("com/tenwa/apzl/settleLoan/FcBuyBackList.jsp","","_self","");
|
||||
}
|
||||
function save(){
|
||||
var firstOverdueCorpus = getItemValue(0,0,"FIRST_OVERDUE_CORPUS");
|
||||
var firstOverdueInterest = getItemValue(0,0,"FIRST_OVERDUE_INTEREST");
|
||||
var secondOverdueCorpus = getItemValue(0,0,"SECOND_OVERDUE_CORPUS");
|
||||
var secondOverdueInterest = getItemValue(0,0,"SECOND_OVERDUE_INTEREST");
|
||||
var allRemainMoney = getItemValue(0,0,"ALL_REMAIN_MONEY");
|
||||
var firstOverduePenalty = getItemValue(0,0,"FIRST_OVERDUE_PENALTY");
|
||||
var secondOverduePenalty = getItemValue(0,0,"SECOND_OVERDUE_PENALTY");
|
||||
var buybackMoney = getItemValue(0,0,"BUYBACK_MONEY");
|
||||
var buybackMoneySum = eval(firstOverdueCorpus +"+"+ firstOverdueInterest +"+"+ secondOverdueCorpus +"+"+ secondOverdueInterest +"+"+ firstOverduePenalty +"+"+ secondOverduePenalty) ;
|
||||
var buybackMoneySum = eval( allRemainMoney +"+"+ firstOverduePenalty +"+"+ secondOverduePenalty) ;
|
||||
if(buybackMoney!=buybackMoneySum.toFixed(2)){
|
||||
alert("本金利息罚息金额相加总额"+buybackMoneySum+"与所填‘回购总金额’不相等");
|
||||
return;
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
String sButtons[][] = {
|
||||
{"true","","Button","ÐÂÔö","ÐÂÔö","newRecord()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","ÐÞ¸Ä","ÐÞ¸Ä","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","ɾ³ý","ɾ³ý","do_delete()","","","","btn_icon_delete",""},
|
||||
{"true","","Button","ɾ³ý","ɾ³ý","deleteRecord()","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
@ -42,7 +42,8 @@
|
||||
var secondOverdueCorpus = result.SECOND_OVERDUE_CORPUS;
|
||||
var secondOverdueInterest = result.SECOND_OVERDUE_INTEREST;
|
||||
var overdueList = result.OVERDUE_LIST;
|
||||
var param = 'fcRequestId='+fcRequestId+'&firstOverdueCorpus='+firstOverdueCorpus+'&firstOverdueInterest='+firstOverdueInterest+'&secondOverdueCorpus='+secondOverdueCorpus+'&secondOverdueInterest='+secondOverdueInterest+'&overdueList='+overdueList;
|
||||
var allRemainMoney = result.ALL_REMAIN_MONEY;
|
||||
var param = 'fcRequestId='+fcRequestId+'&firstOverdueCorpus='+firstOverdueCorpus+'&firstOverdueInterest='+firstOverdueInterest+'&secondOverdueCorpus='+secondOverdueCorpus+'&secondOverdueInterest='+secondOverdueInterest+'&overdueList='+overdueList+'&allRemainMoney='+allRemainMoney;
|
||||
var sUrl = "com/tenwa/apzl/settleLoan/FcBuyBackInfo.jsp";
|
||||
AsControl.OpenView(sUrl,param,'_self','');
|
||||
|
||||
|
||||
@ -40,6 +40,7 @@ public class BuyBack {
|
||||
BizObjectQuery boqLRP = bomLRP.createQuery("contract_id=:contractId and plan_list=:planList").setParameter("contractId",contractId);
|
||||
BizObject boLRP = boqLRP.setParameter("planList",planList).getSingleResult(false);
|
||||
String rent_plan = boLRP.getAttribute("rent").getString();
|
||||
String allRemainCorpus = boLRP.getAttribute("ALL_REMAIN_CORPUS").getString();
|
||||
//¼ìÑéµ±ÆÚÊÇ·ñ½áÇå
|
||||
boolean planListIsComplete = new BigDecimal(rent_in).compareTo(new BigDecimal(rent_plan))>=0;
|
||||
|
||||
@ -66,6 +67,7 @@ public class BuyBack {
|
||||
jsonObject.put("SECOND_OVERDUE_CORPUS",corpus2);
|
||||
jsonObject.put("SECOND_OVERDUE_INTEREST",interest2);
|
||||
jsonObject.put("OVERDUE_LIST",planList+1);
|
||||
jsonObject.put("ALL_REMAIN_MONEY",new BigDecimal(allRemainCorpus).add(new BigDecimal(interest1)).add(new BigDecimal(interest2)).setScale(2,BigDecimal.ROUND_HALF_UP).toString());
|
||||
}else{
|
||||
String buyBackCorpus = new BigDecimal(boLRP.getAttribute("corpus").toString()).subtract(new BigDecimal(corpus)).setScale(2,BigDecimal.ROUND_HALF_UP).toString();
|
||||
String buyBackInterest = new BigDecimal(boLRP.getAttribute("interest").toString()).subtract(new BigDecimal(interest)).setScale(2,BigDecimal.ROUND_HALF_UP).toString();
|
||||
@ -74,6 +76,7 @@ public class BuyBack {
|
||||
jsonObject.put("SECOND_OVERDUE_CORPUS",corpus1);
|
||||
jsonObject.put("SECOND_OVERDUE_INTEREST",interest1);
|
||||
jsonObject.put("OVERDUE_LIST",planList);
|
||||
jsonObject.put("ALL_REMAIN_MONEY", new BigDecimal(allRemainCorpus).subtract(new BigDecimal(corpus)).add(new BigDecimal(buyBackInterest)).add(new BigDecimal(interest1)).setScale(2,BigDecimal.ROUND_HALF_UP).toString());
|
||||
}
|
||||
return jsonObject.toString();
|
||||
}
|
||||
|
||||
@ -51,6 +51,10 @@ public interface FC_BUYBACK_INFO {
|
||||
* 实际回购总金额 STRING(32)<br>
|
||||
*/
|
||||
public static final String BUYBACK_MONEY = "BUYBACK_MONEY";
|
||||
/**
|
||||
* 回购金额(本金+利息),不包含罚息 STRING(32)<br>
|
||||
*/
|
||||
public static final String ALL_REMAIN_MONEY = "ALL_REMAIN_MONEY";
|
||||
/**
|
||||
* 凭证状态:0,未生成,1,已生成 STRING(32)<br>
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user