From e37a8b7f74061008de317406c9939efb58c7cc13 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Tue, 10 Aug 2021 16:54:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LCCalcSubsectionInfoTempList.jsp | 20 +++++++++++++++++-- .../reckon/product/ProductCondition.java | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp index e8b6393e0..0b32932c6 100644 --- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp +++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp @@ -78,7 +78,7 @@ fcleanLeaseMoney = Decimal( cleanLeaseMoney ).mul( cleanLeaseRatio ).div( 100 ).toFixed( 2 ) } var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ) ; - if( (fcleanLeaseMoney*1) > (maxLeaseMoney*1) ){ + if( (Number(fcleanLeaseMoney) ) > ( Number(maxLeaseMoney) ) ){ alert("该段的融资金额不能大于:"+maxLeaseMoney+",请检查!"); setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); @@ -96,7 +96,7 @@ var cleanLeaseMoney = parent.getItemValue( 0, 0, 'CLEAN_LEASE_MONEY' ); var clm = getItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY' ); var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ); - if( (clm*1) > (maxLeaseMoney*1) ){ + if( Number(clm) > Number(maxLeaseMoney) ){ alert("该段的融资金额不能大于:"+maxLeaseMoney+",请检查!"); setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', ''); setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', ''); @@ -132,6 +132,16 @@ if ( '' === discount ) { alert( '请填写第' + ( i + 1 ) + '行贴息金额' ); return; + }else{ + var ifd = getItemValue( 0, i, 'IS_FIXED_DISCOUNT' ); + if(ifd=="N"){ + var mind = getItemValue( 0, i, 'MINIMUM_DISCOUNT' ); + var maxd = getItemValue( 0, i, 'MAXIMUM_DISCOUNT' ); + if( Number(discount) < Number(mind) || Number(discount)>Number(maxd) ){ + alert( '请填写第' + ( i + 1 ) + '行贴息金额不在产品配置的区间内,请检查!' ); + return; + } + } } } else { var discountRate = getItemValue( 0, i, 'DISCOUNT_RATE' ); @@ -179,6 +189,12 @@ $("input[id*=FINANCING_RATE_"+i+"]").attr('readonly',true); $("input[id*=FINANCING_RATE_"+i+"]").css('border','0'); } + + var ifdr = getItemValue( 0, i, 'IS_FIXED_DISCOUNT_RATE' ); + if(ifdr=="Y"){ + $("input[id*=DISCOUNT_RATE_"+i+"]").attr('readonly',true); + $("input[id*=DISCOUNT_RATE_"+i+"]").css('border','0'); + } } } diff --git a/calc/com/tenwa/reckon/product/ProductCondition.java b/calc/com/tenwa/reckon/product/ProductCondition.java index 6b2e790b8..471893761 100644 --- a/calc/com/tenwa/reckon/product/ProductCondition.java +++ b/calc/com/tenwa/reckon/product/ProductCondition.java @@ -765,7 +765,7 @@ public class ProductCondition { if ( bos.size() == 0 ) { Map>> configs = ProductParamUtil.getProductComponentDecisionTable( productId, "PRD0301", "Rate", "Discount", "DiscountRate", "DiscountCalcMethod", "IsBalanceLending", "DiscountCollectionPeriod", "MaximumDiscount" ,"incomeNumber", - "isFixedDiscount","isUpdateLeaseMoneyRatio","maxLeaseMoney","MinimumDiscount"); + "isFixedDiscount","isUpdateLeaseMoneyRatio","maxLeaseMoney","MinimumDiscount","isFixedDiscountRate"); List> sf = configs.get( "segmented_financing" ); int i = 1; String discountCalcMethod = null ; @@ -806,6 +806,7 @@ public class ProductCondition { bo.setAttributeValue( "IS_UPDATE_LEASE_MONEY_RATIO", f.get( "isUpdateLeaseMoneyRatio" ) ); bo.setAttributeValue( "MAX_LEASE_MONEY", f.get( "maxLeaseMoney" ) ); bo.setAttributeValue( "MINIMUM_DISCOUNT", f.get( "MinimumDiscount" ) ); + bo.setAttributeValue( "IS_FIXED_DISCOUNT_RATE", f.get( "isFixedDiscountRate" ) ); bom.saveObject( bo ); i ++;