From d6ea10a743cdf1b5aba20bab9eb490d2e3e364e7 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Sat, 30 Jun 2018 19:28:49 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=A7=9F=E9=87=91=E6=B5=8B?= =?UTF-8?q?=E7=AE=97=E9=A1=B5=E9=9D=A2=E3=80=82=202.=E6=95=B4=E7=90=86?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E9=85=8D=E7=BD=AE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation/LoanBasicInfo.jsp | 18 ++++++++++-- .../etc/app/component/component-config.xml | 26 ++++++++--------- .../component/component-parameter-config.xml | 6 ++-- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 29 ++++++++++--------- .../reckon/product/ProductCondition.java | 26 ++++++++++++++++- .../product/ProductConditionService.java | 1 + 6 files changed, 73 insertions(+), 33 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 3d979c1c7..45f37746d 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -17,6 +17,7 @@ String flowunid = CurPage.getParameter("FlowUnid"); String plannumber=CurPage.getParameter("plannumber"); String productId=CurPage.getParameter("ProductId"); + String productName = CurPage.getParameter("ProductName"); String ishistory=CurPage.getParameter("IsHistory"); String nodeNo=CurPage.getParameter("NodeNo"); String RightType= CurPage.getParameter("RightType"); @@ -165,12 +166,16 @@ var adjustType; var count = 0; $(function(){ hideItem(0,'IRR'); + var productName="<%=productName%>"; + setItemValue(0,0,"PRODUCT_NAME",productName); + isFina(); //document.getElementById('div_my0').innerHTML = '
'+document.getElementById('div_my0').innerHTML+'
'; if("ReadOnly"!="<%=RightType%>"){ rentOrRateOption=$("#RENT_OR_RATE").children(); incomeNumberYear=$("#INCOME_NUMBER_YEAR").children(); adjustType=$("#ADJUST_TYPE").children(); console.info(calcRules); + var fundRules=calcRules["fund"]; for(var key in fundRules){ $("#"+key).bind("change",function(){ @@ -194,7 +199,16 @@ $(function(){ changeSettleMethod3(); } }); - +function isFina(){ + var fundRules=calcRules["fund"]; + for(var key in fundRules){ + var flag = getItemValue(0,0,key+"_FINA"); + if(flag=="finatype01"){ + setItemValue(0,0,key+"_FIRST_PAYMENT_RATIO",""); + setItemValue(0,0,key+"_FINANCE",""); + } + } +} function importCustomerQuot(){ AsDialog.OpenSelector("SelectCustomerQuot","flowunid,<%=flowunid%>,productid,<%=productId%>","dialogWidth=800px;dialogHeight=500px", function(sReturn){ @@ -720,7 +734,7 @@ function changeRateType(){ //根据金额算比例 function getRatioByMoney(e){ - debugger; + var equipAmt=getItemValue(0,0,"EQUIP_AMT");//设备款 var cleanLeaseMoney=getItemValue(0,0,"CLEAN_LEASE_MONEY");//融资额 var fundRules=calcRules["fund"]; diff --git a/WebContent/WEB-INF/etc/app/component/component-config.xml b/WebContent/WEB-INF/etc/app/component/component-config.xml index f53476003..309f3429b 100644 --- a/WebContent/WEB-INF/etc/app/component/component-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-config.xml @@ -13,7 +13,7 @@ - + @@ -27,7 +27,7 @@ - + @@ -1078,10 +1078,10 @@ - - - - + + + + @@ -1092,17 +1092,17 @@ - + - - - + + + - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml index c34fab25a..9c677a393 100644 --- a/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml +++ b/WebContent/WEB-INF/etc/app/component/component-parameter-config.xml @@ -117,11 +117,11 @@ - + - + @@ -150,7 +150,7 @@ - + diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index dd088a6d8..a45d1d9f2 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -2831,7 +2831,8 @@ - + + @@ -2843,8 +2844,8 @@ - - + + @@ -2943,23 +2944,23 @@ - + - + - - - + + + - - + + - - - - + + + + diff --git a/calc/com/tenwa/reckon/product/ProductCondition.java b/calc/com/tenwa/reckon/product/ProductCondition.java index 3833ca8bc..925b3d42e 100644 --- a/calc/com/tenwa/reckon/product/ProductCondition.java +++ b/calc/com/tenwa/reckon/product/ProductCondition.java @@ -204,11 +204,18 @@ public class ProductCondition { String col=fee.getAttribute("relativecode").getString();//费用项在表中的字段 String colName=fee.getAttribute("itemname").getString();//费用名称 String isFina=fee.getAttribute("attribute2").getString();//是否参与融资 + String fina = ProductParamUtil.getProductParameterValue(productId, "PRD0315",col,"FINAN"); + if("Y".equals(fina)){ + fina = "finatype02"; + }else if("N".equals(fina)){ + fina = "finatype01"; + } if(fee.getAttribute("itemno").getString().equals("feetype10")){ rule=prodSer.getEquipRule(doTemp, map,col,vali); }else{ if(map.containsKey(col)){//产品配置了该费用项 rule=prodSer.getFeeRule(doTemp, map, col,colName,vali); + doTemp.setDefaultValue(col+"_FINA",fina); /*if("FINA".equals(isFina)){ doTemp.setRequired(col, true); doTemp.setRequired(col+"_"+isFina, true); @@ -329,6 +336,8 @@ public class ProductCondition { doTemp.setColumnAttribute("ADJUST_STYLE","colvisible", "0"); doTemp.setColumnAttribute("ADJUST_TYPE","colvisible", "0"); }else if("Y".equals(rule.get("ISADJUST_INTEREST"))){ + doTemp.setColumnAttribute("ADJUST_STYLE","colvisible", "1"); + doTemp.setColumnAttribute("ADJUST_TYPE","colvisible", "1"); //调息生效节点 doTemp.setColumnAttribute("ADJUST_STYLE","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='adjust_style' and itemno in ("+this.getSqlWhere(rule.get("adjust_style"))+") order by sortno"); //调息方式 @@ -420,11 +429,26 @@ public class ProductCondition { } return s; } - //获取保证金比例 + public void getCautionRatio(ASObjectModel doTemp,String productId) throws Exception{ String caution_money = ProductParamUtil.getProductParameterValue(productId, "PRD0315","CAUTION_MONEY","CostType09"); + String handle_charge_money = ProductParamUtil.getProductParameterValue(productId, "PRD0315","HANDLING_CHARGE_MONEY","CostType09"); String INCOME_NUMBER = ProductParamUtil.getProductParameterValue(productId, "PRD0350","product_rate","INCOME_NUMBER"); + String CAR_FIRST_PAYMENT_RATIO = ProductParamUtil.getProductParameterValue(productId, "PRD0315","FIRST_PAYMENT","CostType09"); doTemp.setDefaultValue("CAUTION_MONEY_RATIO",caution_money); + doTemp.setDefaultValue("HANDLING_CHARGE_MONEY_RATIO",handle_charge_money); doTemp.setDefaultValue("INCOME_NUMBER",INCOME_NUMBER); + doTemp.setDefaultValue("CAR_FIRST_PAYMENT_RATIO",CAR_FIRST_PAYMENT_RATIO); + String ProductType = ProductParamUtil.getProductParameterValue(productId, "PRD0350","product_rate","ProductType"); + String isReadOnly = ProductParamUtil.getProductParameterValue(productId, "PRD0350","product_rate","ProductRateReadOnly"); + String YEAR_RATE = ProductParamUtil.getProductParameterValue(productId, "PRD0350","product_rate","ProductRate"); + //利率为0,费率为1 + if("1".equals(ProductType)){ + doTemp.setColumnAttribute("YEAR_RATE","colheader","测算费率"); + } + if("Y".equals(isReadOnly)){ + doTemp.setColumnAttribute("YEAR_RATE","colreadyonly","1"); + } + doTemp.setDefaultValue("YEAR_RATE",YEAR_RATE); } } diff --git a/calc/com/tenwa/reckon/product/ProductConditionService.java b/calc/com/tenwa/reckon/product/ProductConditionService.java index e14cb3b7a..c130513e7 100644 --- a/calc/com/tenwa/reckon/product/ProductConditionService.java +++ b/calc/com/tenwa/reckon/product/ProductConditionService.java @@ -115,6 +115,7 @@ public class ProductConditionService { if(defaultValue.length()>0){ doTemp.setDefaultValue(col, defaultValue); doTemp.setColumnAttribute(col,"colreadonly", "1"); + doTemp.setColumnAttribute(col+"_FINA","colreadonly", "1"); } if("N".equals(isShowRatio)){ doTemp.setColumnAttribute(col,"colfilterrefid", "");//不显示比例