From 9c712386966b27be99cf85fe4f2f68bc317bce50 Mon Sep 17 00:00:00 2001 From: tenwaPC Date: Mon, 10 Sep 2018 09:51:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=A0=E7=BB=9F=E4=BA=A7=E5=93=81=20?= =?UTF-8?q?=E8=9E=8D=E8=B5=84=E9=A2=9D=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation/LoanBasicInfoBusiness.jsp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfoBusiness.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfoBusiness.jsp index 50a31cc80..c2d742fd0 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfoBusiness.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfoBusiness.jsp @@ -102,10 +102,14 @@ String productType = Sqlca.getString(new SqlObject("select attribute2 from business_type where typeno='"+productId+"'")); if("car_product".equals(productType)){ doTemp.setReadOnly("CLEAN_LEASE_MONEY", false); - }else{ + }else if("business_product".equals(productType)){ /* doTemp.setVisible("CORPUS_RATIO", true); doTemp.setVisible("CORPUS", true); doTemp.setRequired("CORPUS_RATIO", true); */ + doTemp.setHtmlEvent("EQUIP_AMT", "onchange", "calcRaisedForTraditional"); + doTemp.setHtmlEvent("INSURANCE_PREMIUM", "onchange", "calcRaisedForTraditional"); + doTemp.setHtmlEvent("OTHER_INCOME", "onchange", "calcRaisedForTraditional"); + doTemp.setHtmlEvent("FIRST_PAYMENT", "onchange", "calcRaisedForTraditional"); } if("quoted_price".equals(calType)){//客户报价 流程号存的是客户主键 doTemp.setDefaultValue("cust_id", flowunid); @@ -1048,7 +1052,7 @@ function rentOrRateChange(){ CalcControl.RentOrRateView(); //document.all("frame_list_knowing").src = document.all("frame_list_knowing").src; - + debugger; if(count > 0){ AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runDelteKnowing","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>,planCName=<%=planCName%>,calType=<%=calType%>"); @@ -1230,7 +1234,16 @@ var fundError={}; catch(e){} } } - + //传统业务 融资额计算 +function calcRaisedForTraditional(){ + var EquipAmt = getItemValue(0,0,'EQUIP_AMT');//租赁物成本 + var InsurancePermium = getItemValue(0,0,'INSURANCE_PREMIUM');//保险费 + var otherIncome = getItemValue(0,0,'OTHER_INCOME');//其他收入 + var FirstPayment = getItemValue(0,0,'FIRST_PAYMENT');//首付款 + var abc = Number(EquipAmt ? EquipAmt : 0 ); + var cleanLeaseMoney = (Number(EquipAmt ? EquipAmt : 0 )-Number(FirstPayment ? FirstPayment : 0 )+Number(InsurancePermium ? InsurancePermium : 0 )+Number(otherIncome ? otherIncome : 0 )).toFixed(2); + setItemValue(0,0,'CLEAN_LEASE_MONEY',cleanLeaseMoney); + } jQuery.validator.prototype.showLabel = function(element,message){ var id=element.getAttribute('id'); if(element.getAttribute('errorInfo')){