1.修改计算车价onchange时,融资额计算错误问题。

This commit is contained in:
zhangbb 2018-10-26 11:10:41 +08:00
parent 5079813d6a
commit 58e88d8dea

View File

@ -835,9 +835,9 @@ function getRatioByMoney(e){
}
var ratio = 100 - Number(firstPaymentRatio);
var firstPayment = equipAmt * Number(firstPaymentRatio) / 100;
if(Number(getItemValue(0, 0, "FIRST_PAYMENT")) != firstPayment) {
/* if(Number(getItemValue(0, 0, "FIRST_PAYMENT")) != firstPayment) {
firstPayment = Number(getItemValue(0, 0, "FIRST_PAYMENT"));
}
} */
cleanLeaseMoney = equipAmt - firstPayment + Number(allMoney);
setItemValue(0, 0, "RENT_RATIO", ((cleanLeaseMoney / equipAmt) * 100).toFixed(6) + "");
setItemValue(0, 0, "CLEAN_LEASE_MONEY", cleanLeaseMoney + "");
@ -871,6 +871,11 @@ function getRatioByMoney(e){
setValue(key,Number(money*fundRatio/100).toFixed(2));
}else{
if(Number(equipAmt)!=0){
if(key='FIRST_PAYMENT'){
fundMoney=firstPayment;
fundRatio=Number(fundMoney/money*100).toFixed(6);
setValue(key,fundMoney);
}
fundRatio=Number(fundMoney/money*100).toFixed(6);
}else{
fundRatio=Number(0).toFixed(6);
@ -881,7 +886,7 @@ function getRatioByMoney(e){
}
}
}
var firstPayment = Number(getItemValue(0, 0, "FIRST_PAYMENT"));
// var firstPayment = Number(getItemValue(0, 0, "FIRST_PAYMENT"));
if(allMoney != 0 && firstPayment != 0) {
setItemValue(0, 0, "ALL_FIRST_PAYMENT", firstPayment + "");
setItemValue(0, 0, "ALL_FIRST_PAYMENT_RATIO", ((firstPayment / allMoney) * 100).toFixed(6));