From 18635a120e812a9fb9ba4b61960930f425f66448 Mon Sep 17 00:00:00 2001 From: zhulianghua Date: Sat, 11 Aug 2018 17:07:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E4=BB=98=E6=AC=BE?= =?UTF-8?q?=E4=BA=92=E7=AE=97=E9=97=AE=E9=A2=98=20=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=93=AA=E4=B8=AA=E9=80=97=E6=AF=94=E6=8F=90=E4=BA=A4=E7=9A=84?= =?UTF-8?q?debugger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Accounting/LoanSimulation/LoanBasicInfo.jsp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 0cc57cbc4..5d84b9024 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -227,7 +227,6 @@ $(function(){ getRatioByMoney(getObj(0, "EQUIP_AMT")); }); function changgeCompare(){ - debugger; var nowTotal=Number("<%=nowTotal%>"); var equipAmt=Number(getItemValue(0, 0, "EQUIP_AMT")); var flag="<%=flag%>"; @@ -802,6 +801,9 @@ function changeRateType(){ //根据金额算比例 function getRatioByMoney(e){ + if(e.value === "") { + setItemValue(0, 0, e.id, "0"); + } var equipAmt=getItemValue(0,0,"EQUIP_AMT");//设备款 var cleanLeaseMoney=getItemValue(0,0,"CLEAN_LEASE_MONEY");//融资额 var allMoney = 0; @@ -823,14 +825,15 @@ function getRatioByMoney(e){ } //得到总价款 setItemValue(0, 0, "TOTAL_ALL", eval(allMoney + "+" + equipAmt) + ""); - //计算综合融资额 var firstPaymentRatio = getItemValue(0, 0, "FIRST_PAYMENT_RATIO_0"); - var ratio = 100 - Number(firstPaymentRatio); - if(ratio > 0) { - cleanLeaseMoney = equipAmt * (ratio / 100) + Number(allMoney); - setItemValue(0, 0, "RENT_RATIO", ((cleanLeaseMoney / equipAmt) * 100).toFixed(6)); - setItemValue(0, 0, "CLEAN_LEASE_MONEY", cleanLeaseMoney); + //计算综合融资额 + if(e.id == "FIRST_PAYMENT") { + firstPaymentRatio = Number(getItemValue(0, 0, "FIRST_PAYMENT"))/Number(equipAmt)*100; } + var ratio = 100 - Number(firstPaymentRatio); + cleanLeaseMoney = equipAmt * (ratio / 100) + Number(allMoney); + setItemValue(0, 0, "RENT_RATIO", ((cleanLeaseMoney / equipAmt) * 100).toFixed(6) + ""); + setItemValue(0, 0, "CLEAN_LEASE_MONEY", cleanLeaseMoney + ""); allMoney = eval(allMoney + "+" + equipAmt); for(var key in fundRules){