分段融添加固定值计算
This commit is contained in:
parent
c2e40bbce5
commit
304385e673
@ -13,14 +13,20 @@
|
||||
doTemp.setHtmlEvent( "CLEAN_LEASE_RATIO", "onblur", "changeCleanLeaseRatio" );
|
||||
doTemp.setHtmlEvent( "CLEAN_LEASE_MONEY", "onblur", "changeCleanLeaseMoney" );
|
||||
String discountCalcMethod = Sqlca.getString("select DISCOUNT_CALC_METHOD from LC_CALC_SUBSECTION_INFO_TEMP where FLOWUNID='"+flowunid+"'");
|
||||
if(discountCalcMethod != null && discountCalcMethod.equals("1")){
|
||||
if(discountCalcMethod != null){
|
||||
if(discountCalcMethod.equals("1")){
|
||||
doTemp.setReadOnly("DISCOUNT",true);
|
||||
doTemp.setReadOnly("DISCOUNT_RATE",false);
|
||||
}else{
|
||||
}else if (discountCalcMethod.equals("2")){
|
||||
doTemp.setReadOnly("DISCOUNT",false);
|
||||
doTemp.setReadOnly("DISCOUNT_RATE",true);
|
||||
}else if (discountCalcMethod.equals("3")){//固定值,对应的值改为只读
|
||||
doTemp.setReadOnly("DISCOUNT_RATE",true);
|
||||
doTemp.setReadOnly("FINANCING_RATE",true);
|
||||
doTemp.setReadOnly("INCOME_NUMBER",true);
|
||||
doTemp.setReadOnly("DISCOUNT",true);
|
||||
}
|
||||
}
|
||||
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "0"; //只读模式
|
||||
@ -30,7 +36,7 @@
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存","save()","","","","btn_icon_save",""},
|
||||
{"true","All","Button","ÏêÇé","±£´æ","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","详情","保存","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
@ -195,6 +201,12 @@
|
||||
$("input[id*=DISCOUNT_RATE_"+i+"]").attr('readonly',true);
|
||||
$("input[id*=DISCOUNT_RATE_"+i+"]").css('border','0');
|
||||
}
|
||||
|
||||
var ifd = getItemValue( 0, i, 'IS_FIXED_DISCOUNT' );
|
||||
if(ifd =="Y"){
|
||||
$("input[id*=DISCOUNT_"+i+"]").attr('readonly',true);
|
||||
$("input[id*=DISCOUNT_"+i+"]").css('border','0');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1541,6 +1541,15 @@ function changeSettleMethod3(){
|
||||
//setItemRequired(0,"RATE",false);
|
||||
//setItemRequired(0,"ADDITIONAL_RATE",false);
|
||||
}
|
||||
var settleMethod=getItemValue(0,0,"SETTLE_METHOD");
|
||||
document.all( 'A_Group_0020' ).style.display = 'none';
|
||||
showItem(0,"SUBSECTION_CONDIG",'none');
|
||||
if ( settleMethod === 'segmented_financing' ) {
|
||||
showItem(0,"SUBSECTION_CONDIG",'block');
|
||||
document.all( 'A_Group_0020' ).style.display = 'block';
|
||||
var param = 'CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>';
|
||||
AsControl.OpenView( '/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp', param, 'subsection_list' );
|
||||
}
|
||||
}
|
||||
var ischeck=true;
|
||||
function checkModified(){
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -4,6 +4,7 @@ import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.tenwa.comm.exception.BusinessException;
|
||||
import com.tenwa.reckon.bean.ConditionBean;
|
||||
import com.tenwa.reckon.bean.FundRentPlanBean;
|
||||
import com.tenwa.reckon.bean.TabCalBean;
|
||||
@ -84,7 +85,7 @@ public class SegmentedFinancingExecutor extends FundRentPlanExecutor {
|
||||
}
|
||||
bo.setAttributeValue( tcb.getPlanCName(), tcb.getPlanCValue() );
|
||||
bom.saveObject( bo );
|
||||
} else {
|
||||
} else if("2".equals( discountCalcMethod )) { //根据金额算利率
|
||||
// 季口쏜띨
|
||||
BigDecimal discount = new BigDecimal( bo.getAttribute( "DISCOUNT" ).getString() );
|
||||
// 깃硫적쪽셕炬理쏜
|
||||
@ -107,7 +108,17 @@ public class SegmentedFinancingExecutor extends FundRentPlanExecutor {
|
||||
}
|
||||
bo.setAttributeValue( tcb.getPlanCName(), tcb.getPlanCValue() );
|
||||
bom.saveObject( bo );
|
||||
}else if("3".equals( discountCalcMethod )) { // 固定值
|
||||
financingRate = new BigDecimal( bo.getAttribute( "FINANCING_RATE" ).getString() ).divide( new BigDecimal( 100 ), 20, 4 );
|
||||
} else {
|
||||
throw new BusinessException( "分段信息没有配置计算规则,无法测算!" );
|
||||
}
|
||||
//校验贴息是否在配置的区间内
|
||||
BigDecimal discountCheck = new BigDecimal( bo.getAttribute( "DISCOUNT" ).getString() );
|
||||
if ( !( discountCheck.compareTo( new BigDecimal( bo.getAttribute( "MAXIMUM_DISCOUNT" ).getString() ) ) <= 0 && discountCheck.compareTo( new BigDecimal( bo.getAttribute( "MINIMUM_DISCOUNT" ).getString() ) ) >= 0 ) ) {
|
||||
throw new BusinessException( "分段融的第"+subsectionNumber+"段的贴息金额不在产品配置的区间内!" );
|
||||
}
|
||||
|
||||
// 휨栗퍅적쪽
|
||||
BigDecimal preFinancingRate = financingRate.divide( incomeNumberYear, 20, 4 );
|
||||
// 茄셥理쏜
|
||||
|
||||
@ -781,7 +781,11 @@ public class ProductCondition {
|
||||
if ( "1".equals( discountCalcMethod ) ) {
|
||||
bo.setAttributeValue( "DISCOUNT_RATE", f.get( "DiscountRate" ) );
|
||||
bo.setAttributeValue( "FINANCING_RATE", f.get( "DiscountRate" ) );
|
||||
} else {
|
||||
} else if( "2".equals( discountCalcMethod ) ){
|
||||
bo.setAttributeValue( "DISCOUNT", f.get( "Discount" ) );
|
||||
}else if ( "3".equals( discountCalcMethod ) ){
|
||||
bo.setAttributeValue( "DISCOUNT_RATE", f.get( "DiscountRate" ) );
|
||||
bo.setAttributeValue( "FINANCING_RATE", f.get( "DiscountRate" ) );
|
||||
bo.setAttributeValue( "DISCOUNT", f.get( "Discount" ) );
|
||||
}
|
||||
String isBalanceLending = f.get( "IsBalanceLending" );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user