From 0f9f006c1a2874ad1d35d5b044c8a8730b47ba08 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Fri, 28 Sep 2018 17:56:31 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8F=90=E5=89=8D=E7=BB=93=E6=B8=85=E7=A7=9F?= =?UTF-8?q?=E9=87=91=E6=B5=8B=E7=AE=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanBasicInfoBusiness.jsp | 1269 +++++++++++++++++ .../LoanBasicInfoBusiness.jsp | 1269 +++++++++++++++++ .../LoanSimulation_old/condition_plan.jsp | 2 +- .../LoanBasicInfoBusiness.jsp | 15 +- 4 files changed, 2548 insertions(+), 7 deletions(-) create mode 100644 WebContent/Accounting/LoanSimulation_new/LoanBasicInfoBusiness.jsp create mode 100644 WebContent/Accounting/LoanSimulation_old/LoanBasicInfoBusiness.jsp diff --git a/WebContent/Accounting/LoanSimulation_new/LoanBasicInfoBusiness.jsp b/WebContent/Accounting/LoanSimulation_new/LoanBasicInfoBusiness.jsp new file mode 100644 index 000000000..77139aa56 --- /dev/null +++ b/WebContent/Accounting/LoanSimulation_new/LoanBasicInfoBusiness.jsp @@ -0,0 +1,1269 @@ +<%@page import="jbo.prd.BUSINESS_TYPE"%> +<%@page import="com.tenwa.reckon.util.TbBeanTools"%> +<%@page import="com.tenwa.reckon.bean.TabCalBean"%> +<%@page import="com.amarsoft.awe.control.model.Parameter"%> +<%@page import="com.amarsoft.app.base.util.DateHelper"%> +<%@page import="com.tenwa.util.SerialNumberUtil"%> +<%@page import="com.tenwa.reckon.product.ProductCondition"%> +<%@page import="com.amarsoft.app.util.ProductParamUtil"%> +<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %> +<%@ page import="java.util.Vector" %> +<%@ page import="com.amarsoft.awe.dw.ui.validator.ValidateRule" %> +<%@ page import="com.tenwa.reckon.product.ASObjectWindowCalc" %> +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%> +<% + /*获取参数*/ + String flowunid = CurPage.getParameter("FlowUnid"); + String plannumber=CurPage.getParameter("plannumber"); + String productId=CurPage.getParameter("ProductId"); + String ishistory=CurPage.getParameter("IsHistory"); + String nodeNo=CurPage.getParameter("NodeNo"); + String RightType= CurPage.getParameter("RightType"); + String calType = CurPage.getParameter("calType"); + //判断是否为汽车业务 + boolean isCarProduct = "004".equals(productId) ? false : true; + /*获取参数*/ + /*根据参数判断 是否去数据库查询*/ + BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid); + if(productId==null){ + productId=flow.getAttribute("productId").getString(); + } + if(calType == null){ + calType = "proj_process"; + } + TabCalBean tcb=TbBeanTools.getTabInfo(calType); + String planCName=tcb.getPlanCName(); + //方案编号 + if(plannumber==null){ + if("pay_process".equals(calType)||"onHire_process".equals(calType)){ + BizObject condtion=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid and PAYMENT_NUMBER is not null and length(PAYMENT_NUMBER)>0 ").setParameter("flowunid", flowunid).getSingleResult(false); + if(condtion!=null){ + plannumber=condtion.getAttribute(planCName).getString(); + } + }else{ + String planType=ProductParamUtil.getProductParameterValue(productId, "PRD0314", "planinformation"); + if("SinglePlan".equals(planType)){ + BizObject condtion=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + if(condtion!=null){ + plannumber=condtion.getAttribute(planCName).getString(); + } + } + } + } + //新增数据 自动生成方案编号 + if(plannumber==null){ + String sSerialType=""; + JBOTransaction tx=JBOFactory.createJBOTransaction(); + if("proj_process".equals(calType)){ + BizObject proj=JBOFactory.createBizObjectQuery("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + sSerialType=proj.getAttribute("PROJECT_NO").getString(); + }else{ + BizObject contract=JBOFactory.createBizObjectQuery("jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + sSerialType=contract.getAttribute("CONTRACT_NO").getString(); + } + plannumber=SerialNumberUtil.getPlannumber(sSerialType,calType,tx); + tx.commit(); + } + /*根据参数判断 是否去数据库查询*/ + + String sTempletNo = "LoanSimulationBasicInfoBusiness";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + + + + /*设置字段事件*/ + doTemp.setHtmlEvent("SETTLE_METHOD", "onchange", "changeSettleMethod");//租金计算方式 + doTemp.setHtmlEvent("RENT_OR_RATE", "onchange", "rentOrRateChange");//租金推算方法 + doTemp.setHtmlEvent("INCOME_NUMBER_YEAR", "onchange", "changeIncomeNumber");//还款间隔 + doTemp.setHtmlEvent("INCOME_INTERVAL_MONTH", "onchange", "changeIntervalMonth");//还款间隔(月) + doTemp.setHtmlEvent("INCOME_NUMBER", "onchange", "changeNumber");//还款次数 + doTemp.setHtmlEvent("PERIOD_TYPE", "onchange", "changePeriod");//期初/期末 + doTemp.setHtmlEvent("GRACE", "onchange", "changeGrace");//宽限期RATTermID + doTemp.setHtmlEvent("RATE_FLOAT_TYPE", "onchange", "changeRateFloat");//利率计算方式 + doTemp.setHtmlEvent("BASE_RATE", "onchange", "changeBaseRate");//基准利率 + doTemp.setHtmlEvent("RATE_FLOAT_AMT", "onchange", "changeRateFloatAmt");//利率调整值 + doTemp.setHtmlEvent("CAUTION_MONEY", "onchange", "cautionMoney");//保证金 + doTemp.setHtmlEvent("CAUTION_DEDUCTION_MONEY", "onchange", "cautionDeductionMoney");//保证金抵扣金额 + doTemp.setHtmlEvent("LEASE_AMT_DATE", "onchange", "changeLeaseAmtDate");//投放日 + doTemp.setHtmlEvent("START_DATE", "onchange", "changeStartDate");//起租日 + doTemp.setHtmlEvent("FIRST_PLAN_DATE", "onchange", "changeFistPlanDate");//第一期计划日期 + doTemp.setHtmlEvent("CORPUS_RATIO", "onchange", "changeCorpusRatio");//期限内本金比例 + doTemp.setHtmlEvent("RATE_TYPE", "onchange", "changeRateTypeNew");//利率类型 + /*设置字段事件*/ + + /*设置模板属性*/ + Vector vali=new Vector(); + //费用规则 + ProductCondition pc=new ProductCondition(); + pc.getProductFundRules(doTemp, productId); + String calcRules=pc.getProductRulesBusiness(doTemp, productId,vali); + + if("quoted_price".equals(calType)){//客户报价 流程号存的是客户主键 + doTemp.setDefaultValue("cust_id", flowunid); + } + doTemp.setColumnAttribute(planCName,"isipdate","1"); + doTemp.setJboClass(tcb.getCondition_tb()); + doTemp.setDefaultValue(planCName, plannumber); + doTemp.setDefaultValue("flowunid", flowunid); + doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'"); + if(null!=ishistory&&ishistory.equals("true")){ + doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcCondtionInfoArachiveShow");//如果是历史则新显示历史数据 + } + /*设置模板属性*/ + + /*设置页面属性*/ + CurPage.getCurComp().setAttribute("RightType", null); + Parameter p=new Parameter("plannumber",plannumber); + Vector v=CurPage.parameterList; + v.add(p); + /*设置页面属性*/ + + + ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request); + + + dwTemp.Style = "2";//freeform + if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ + dwTemp.ReadOnly = "-2";//只读模式 + }else{ + } + isShowButton=false; + dwTemp.setVali(vali); + dwTemp.setAttr("inputWidth","120"); + dwTemp.setAttr("spanWidth","107"); + dwTemp.setAttr("showRatio", true); + dwTemp.genHTMLObjectWindow(flowunid); + CurPage.getCurComp().setAttribute("RightType", RightType); + + String compClientID = request.getParameter("CompClientID"); + dwTemp.replaceColumn("condition_plan", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("even_subsection", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("knowing_config", "", CurPage.getObjectWindowOutput()); + String sButtons[][] = { + + }; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Accounting/LoanSimulation_old/LoanBasicInfoBusiness.jsp b/WebContent/Accounting/LoanSimulation_old/LoanBasicInfoBusiness.jsp new file mode 100644 index 000000000..dad3956dc --- /dev/null +++ b/WebContent/Accounting/LoanSimulation_old/LoanBasicInfoBusiness.jsp @@ -0,0 +1,1269 @@ +<%@page import="jbo.prd.BUSINESS_TYPE"%> +<%@page import="com.tenwa.reckon.util.TbBeanTools"%> +<%@page import="com.tenwa.reckon.bean.TabCalBean"%> +<%@page import="com.amarsoft.awe.control.model.Parameter"%> +<%@page import="com.amarsoft.app.base.util.DateHelper"%> +<%@page import="com.tenwa.util.SerialNumberUtil"%> +<%@page import="com.tenwa.reckon.product.ProductCondition"%> +<%@page import="com.amarsoft.app.util.ProductParamUtil"%> +<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %> +<%@ page import="java.util.Vector" %> +<%@ page import="com.amarsoft.awe.dw.ui.validator.ValidateRule" %> +<%@ page import="com.tenwa.reckon.product.ASObjectWindowCalc" %> +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%> +<% + /*获取参数*/ + String flowunid = CurPage.getParameter("FlowUnid"); + String plannumber=CurPage.getParameter("plannumber"); + String productId=CurPage.getParameter("ProductId"); + String ishistory=CurPage.getParameter("IsHistory"); + String nodeNo=CurPage.getParameter("NodeNo"); + String RightType= CurPage.getParameter("RightType"); + String calType = CurPage.getParameter("calType"); + //判断是否为汽车业务 + boolean isCarProduct = "004".equals(productId) ? false : true; + /*获取参数*/ + /*根据参数判断 是否去数据库查询*/ + BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid); + if(productId==null){ + productId=flow.getAttribute("productId").getString(); + } + if(calType == null){ + calType = "proj_process"; + } + TabCalBean tcb=TbBeanTools.getTabInfo(calType); + String planCName=tcb.getPlanCName(); + //方案编号 + if(plannumber==null){ + if("pay_process".equals(calType)||"onHire_process".equals(calType)){ + BizObject condtion=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid and PAYMENT_NUMBER is not null and length(PAYMENT_NUMBER)>0 ").setParameter("flowunid", flowunid).getSingleResult(false); + if(condtion!=null){ + plannumber=condtion.getAttribute(planCName).getString(); + } + }else{ + String planType=ProductParamUtil.getProductParameterValue(productId, "PRD0314", "planinformation"); + if("SinglePlan".equals(planType)){ + BizObject condtion=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + if(condtion!=null){ + plannumber=condtion.getAttribute(planCName).getString(); + } + } + } + } + //新增数据 自动生成方案编号 + if(plannumber==null){ + String sSerialType=""; + JBOTransaction tx=JBOFactory.createJBOTransaction(); + if("proj_process".equals(calType)){ + BizObject proj=JBOFactory.createBizObjectQuery("jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + sSerialType=proj.getAttribute("PROJECT_NO").getString(); + }else{ + BizObject contract=JBOFactory.createBizObjectQuery("jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false); + sSerialType=contract.getAttribute("CONTRACT_NO").getString(); + } + plannumber=SerialNumberUtil.getPlannumber(sSerialType,calType,tx); + tx.commit(); + } + /*根据参数判断 是否去数据库查询*/ + + String sTempletNo = "TLoanSimulationBasicInfo_old";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + + + + /*设置字段事件*/ + doTemp.setHtmlEvent("SETTLE_METHOD", "onchange", "changeSettleMethod");//租金计算方式 + doTemp.setHtmlEvent("RENT_OR_RATE", "onchange", "rentOrRateChange");//租金推算方法 + doTemp.setHtmlEvent("INCOME_NUMBER_YEAR", "onchange", "changeIncomeNumber");//还款间隔 + doTemp.setHtmlEvent("INCOME_INTERVAL_MONTH", "onchange", "changeIntervalMonth");//还款间隔(月) + doTemp.setHtmlEvent("INCOME_NUMBER", "onchange", "changeNumber");//还款次数 + doTemp.setHtmlEvent("PERIOD_TYPE", "onchange", "changePeriod");//期初/期末 + doTemp.setHtmlEvent("GRACE", "onchange", "changeGrace");//宽限期RATTermID + doTemp.setHtmlEvent("RATE_FLOAT_TYPE", "onchange", "changeRateFloat");//利率计算方式 + doTemp.setHtmlEvent("BASE_RATE", "onchange", "changeBaseRate");//基准利率 + doTemp.setHtmlEvent("RATE_FLOAT_AMT", "onchange", "changeRateFloatAmt");//利率调整值 + doTemp.setHtmlEvent("CAUTION_MONEY", "onchange", "cautionMoney");//保证金 + doTemp.setHtmlEvent("CAUTION_DEDUCTION_MONEY", "onchange", "cautionDeductionMoney");//保证金抵扣金额 + doTemp.setHtmlEvent("LEASE_AMT_DATE", "onchange", "changeLeaseAmtDate");//投放日 + doTemp.setHtmlEvent("START_DATE", "onchange", "changeStartDate");//起租日 + doTemp.setHtmlEvent("FIRST_PLAN_DATE", "onchange", "changeFistPlanDate");//第一期计划日期 + doTemp.setHtmlEvent("CORPUS_RATIO", "onchange", "changeCorpusRatio");//期限内本金比例 + doTemp.setHtmlEvent("RATE_TYPE", "onchange", "changeRateTypeNew");//利率类型 + /*设置字段事件*/ + + /*设置模板属性*/ + Vector vali=new Vector(); + //费用规则 + ProductCondition pc=new ProductCondition(); + pc.getProductFundRules(doTemp, productId); + String calcRules=pc.getProductRulesBusiness(doTemp, productId,vali); + + if("quoted_price".equals(calType)){//客户报价 流程号存的是客户主键 + doTemp.setDefaultValue("cust_id", flowunid); + } + doTemp.setColumnAttribute(planCName,"isipdate","1"); + doTemp.setJboClass(tcb.getCondition_tb()); + doTemp.setDefaultValue(planCName, plannumber); + doTemp.setDefaultValue("flowunid", flowunid); + doTemp.appendJboWhere(" and "+planCName+"='"+plannumber+"'"); + if(null!=ishistory&&ishistory.equals("true")){ + doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.calcarchive.CalcCondtionInfoArachiveShow");//如果是历史则新显示历史数据 + } + /*设置模板属性*/ + + /*设置页面属性*/ + CurPage.getCurComp().setAttribute("RightType", null); + Parameter p=new Parameter("plannumber",plannumber); + Vector v=CurPage.parameterList; + v.add(p); + /*设置页面属性*/ + + + ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request); + + + dwTemp.Style = "2";//freeform + if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ + dwTemp.ReadOnly = "-2";//只读模式 + }else{ + } + isShowButton=false; + dwTemp.setVali(vali); + dwTemp.setAttr("inputWidth","120"); + dwTemp.setAttr("spanWidth","107"); + dwTemp.setAttr("showRatio", true); + dwTemp.genHTMLObjectWindow(plannumber); + CurPage.getCurComp().setAttribute("RightType", RightType); + + String compClientID = request.getParameter("CompClientID"); + dwTemp.replaceColumn("condition_plan", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("even_subsection", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("knowing_config", "", CurPage.getObjectWindowOutput()); + String sButtons[][] = { + + }; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Accounting/LoanSimulation_old/condition_plan.jsp b/WebContent/Accounting/LoanSimulation_old/condition_plan.jsp index 32bd5c4a8..e2e882de5 100644 --- a/WebContent/Accounting/LoanSimulation_old/condition_plan.jsp +++ b/WebContent/Accounting/LoanSimulation_old/condition_plan.jsp @@ -10,7 +10,7 @@ String sTabStrip[][] = { {"true", "租金计划", "/Accounting/LoanSimulation_old/RentPlanList.jsp",params, "", "", "false"}, {"true", "资金计划", "/Accounting/LoanSimulation_old/FundPlanList.jsp",params, "", "", "false"}, - {"true", "现金流", "/Accounting/LoanSimulation_old/RentPlanList.jsp",params, "", "", "false"}, + {"true", "现金流", "/Accounting/LoanSimulation_old/CashFlowList.jsp",params, "", "", "false"}, }; %> <%@ include file="/Resources/CodeParts/Tab01.jsp"%> diff --git a/WebContent/Accounting/LoanSimulation_onhire/LoanBasicInfoBusiness.jsp b/WebContent/Accounting/LoanSimulation_onhire/LoanBasicInfoBusiness.jsp index 5db307d87..bbd3cba0e 100644 --- a/WebContent/Accounting/LoanSimulation_onhire/LoanBasicInfoBusiness.jsp +++ b/WebContent/Accounting/LoanSimulation_onhire/LoanBasicInfoBusiness.jsp @@ -156,6 +156,7 @@ var incomeNumberYear; var adjustType; var count = 0; $(function(){ + changeRateTypeNew(); //document.getElementById('div_my0').innerHTML = '
'+document.getElementById('div_my0').innerHTML+'
'; if("ReadOnly"!="<%=RightType%>"){ changeRateTypeNew(); @@ -184,8 +185,10 @@ $(function(){ count++; }else{ changeSettleMethod3(); + changeRateTypeNew(); } getRatioByMoney(getObj(0, "EQUIP_AMT")); + changeRateTypeNew(); }); function importCustomerQuot(){ @@ -207,12 +210,12 @@ function importCustomerQuot(){ } -function changeRateTypeNew() { + function changeRateTypeNew() { if("ratetype01" == getItemValue(0, 0, "RATE_TYPE")) { - setItemRequired(0, "ADJUST_STYLE", true); - setItemReadOnly(0, 0, "ADJUST_STYLE", false); - setItemRequired(0, "ADJUST_TYPE", true); - setItemReadOnly(0, 0, "ADJUST_TYPE", false); + // setItemRequired(0, "ADJUST_STYLE", true); + // setItemReadOnly(0, 0, "ADJUST_STYLE", false); + // setItemRequired(0, "ADJUST_TYPE", true); + // setItemReadOnly(0, 0, "ADJUST_TYPE", false); } else { setItemValue(0, 0, "ADJUST_STYLE", ""); setItemRequired(0, "ADJUST_STYLE", false); @@ -221,7 +224,7 @@ function changeRateTypeNew() { setItemRequired(0, "ADJUST_TYPE", false); setItemReadOnly(0, 0, "ADJUST_TYPE", true); } -} +} var CalcControl={}; CalcControl.IncomeNumberView=function(){