187 lines
7.3 KiB
Plaintext
187 lines
7.3 KiB
Plaintext
<%@page contentType="text/html; charset=GBK"%>
|
|
<%@ include file="/Accounting/include_accounting.jspf"%>
|
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
|
|
|
|
<%
|
|
String PG_TITLE = "功能组件信息"; // 浏览器窗口标题 <title> PG_TITLE </title>
|
|
|
|
//获取参数
|
|
String objectType = CurPage.getParameter("ObjectType");//对象类型
|
|
String objectNo = CurPage.getParameter("ObjectNo");//对象编号
|
|
String termID = CurPage.getParameter("TermID");//组件ID
|
|
String status = CurPage.getParameter("Status");//状态
|
|
if(status == null) status = "";
|
|
|
|
BusinessObjectManager bomanager = BusinessObjectManager.createBusinessObjectManager();
|
|
BusinessObject businessObject= bomanager.keyLoadBusinessObject(objectType,objectNo);
|
|
if(businessObject==null){
|
|
throw new Exception("未取到业务主对象ObjectType="+objectType+",ObjectNo="+objectNo+",请检查!");
|
|
}
|
|
|
|
BusinessObject loan = bomanager.keyLoadBusinessObject(businessObject.getString("ObjectType"), businessObject.getString("ObjectNo"));
|
|
if(StringX.isEmpty(termID))
|
|
{
|
|
List<BusinessObject> ratList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rate_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and RateType='02' and Status in(:Status)",
|
|
"ObjectType",objectType,"ObjectNo",objectNo,"Status",status.split(","));
|
|
if(ratList != null && !ratList.isEmpty())
|
|
{
|
|
termID = ratList.get(0).getString("TermID");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
List<BusinessObject> ratList = bomanager.loadBusinessObjects(BUSINESSOBJECT_CONSTANTS.loan_rate_segment, "ObjectType=:ObjectType and ObjectNo=:ObjectNo and RateType='02' and TermID<>:TermID and Status in(:Status)",
|
|
"ObjectType",objectType,"ObjectNo",objectNo,"TermID",termID,"Status",status.split(","));
|
|
bomanager.deleteBusinessObjects(ratList);
|
|
bomanager.updateDB();
|
|
}
|
|
|
|
ASObjectModel doTemp = new ASObjectModel("FINSegmentInfo");
|
|
|
|
//利率选择项
|
|
List<BusinessObject> ratList = com.amarsoft.app.als.prd.config.loader.ProductConfig.getBusinessTypeConfig(loan.getString("BusinessType")).getBusinessObjectsBySql(BusinessComponentConfig.BUSINESS_COMPONENT, "Type='PRD0303'");
|
|
if(ratList == null || ratList.isEmpty()) ratList = BusinessComponentConfig.getComponents("Type='PRD0303'");
|
|
BusinessObjectHelper.sortBusinessObject(ratList, "ID");
|
|
String ratCodeTable="";
|
|
for(BusinessObject rat:ratList)
|
|
{
|
|
if(StringX.isEmpty(ratCodeTable)) ratCodeTable+= rat.getString("ID")+","+rat.getString("Name");
|
|
else ratCodeTable+= ","+rat.getString("ID")+","+rat.getString("Name");
|
|
}
|
|
doTemp.setDDDWCodeTable("TermID", ratCodeTable);
|
|
doTemp.setDefaultValue("TermID", termID);
|
|
|
|
//利率调整方式选择
|
|
String[] ptKeys = CashFlowConfig.getRepriceTypeConfigKeys();
|
|
String ptCodeTable="";
|
|
List<BusinessObject> ptList = new ArrayList<BusinessObject>();
|
|
for(String key:ptKeys)
|
|
{
|
|
ptList.add(CashFlowConfig.getRepriceTypeConfig(key));
|
|
}
|
|
BusinessObjectHelper.sortBusinessObject(ptList, "ID");
|
|
for(BusinessObject pt:ptList)
|
|
{
|
|
if(StringX.isEmpty(ptCodeTable)) ptCodeTable+= pt.getString("ID")+","+pt.getString("Name");
|
|
else ptCodeTable+= ","+pt.getString("ID")+","+pt.getString("Name");
|
|
}
|
|
doTemp.setDDDWCodeTable("RepriceType", ptCodeTable);
|
|
|
|
if(!StringX.isEmpty(termID))
|
|
{
|
|
BusinessObject ratComponent = BusinessObjectHelper.getBusinessObjectBySql(ratList, "ID='"+termID+"'");
|
|
List<BusinessObject> parameters = ratComponent.getBusinessObjects(BusinessComponentConfig.BUSINESS_PARAMETER);
|
|
for(BusinessObject parameter:parameters)
|
|
{
|
|
BusinessObject parameterDefine = BusinessComponentConfig.getParameterDefinition(parameter.getString("PARAMETERID"));
|
|
String apermission = parameter.getString("ARIGHTTYPE");
|
|
if("Required".equalsIgnoreCase(apermission)){
|
|
doTemp.setRequired(parameter.getString("PARAMETERID"), true);
|
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
|
}
|
|
else if("ReadOnly".equalsIgnoreCase(apermission)){
|
|
doTemp.setReadOnly(parameter.getString("PARAMETERID"), true);
|
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
|
}
|
|
else if("Hide".equalsIgnoreCase(apermission)){
|
|
doTemp.setRequired(parameter.getString("PARAMETERID"), false);
|
|
doTemp.setVisible(parameter.getString("PARAMETERID"), false);
|
|
}
|
|
else{
|
|
doTemp.setVisible(parameter.getString("PARAMETERID"), true);
|
|
}
|
|
|
|
String valueList = parameter.getString("OPTIONALVALUE");
|
|
String valueListName = parameter.getString("OPTIONALVALUENAME");
|
|
if(!StringX.isEmpty(valueList))
|
|
{
|
|
String[] values = valueList.split(",");
|
|
String[] valueNames = valueListName.split(",");
|
|
String codeTable = "";
|
|
for(int i = 0; i < values.length; i ++)
|
|
{
|
|
if(StringX.isEmpty(codeTable)) codeTable+=values[i]+","+valueNames[i];
|
|
else codeTable+=","+values[i]+","+valueNames[i];
|
|
}
|
|
doTemp.setDDDWCodeTable(parameter.getString("PARAMETERID"), codeTable);
|
|
}
|
|
|
|
String defaultValue = parameter.getString("Value");
|
|
if(!StringX.isEmpty(defaultValue))
|
|
{
|
|
doTemp.setDefaultValue(parameter.getString("PARAMETERID"), defaultValue);
|
|
}
|
|
}
|
|
}
|
|
doTemp.setDefaultValue("ObjectType", objectType);
|
|
doTemp.setDefaultValue("ObjectNo", objectNo);
|
|
//获取贷款基本信息
|
|
String currency = "";
|
|
String putoutDate = "";
|
|
String maturityDate = "";
|
|
int yearDays = 360;
|
|
if(loan!=null)
|
|
{
|
|
currency = loan.getString("currency");
|
|
putoutDate = loan.getString("PutOutDate");
|
|
maturityDate = loan.getString("MaturityDate");
|
|
yearDays = CashFlowHelper.getYearBaseDay(loan);
|
|
}
|
|
|
|
doTemp.appendJboWhere(" and O.Status in('"+status.replaceAll(",","','")+"')");
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage ,doTemp,request);
|
|
|
|
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
|
|
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
|
|
|
|
|
|
//生成HTMLDataWindow
|
|
dwTemp.genHTMLObjectWindow(objectNo+","+objectType+","+termID);
|
|
|
|
//依次为:
|
|
//0.是否显示
|
|
//1.注册目标组件号(为空则自动取当前组件)
|
|
//2.类型(Button/ButtonWithNoAction/HyperLinkText/TreeviewItem/PlainText/Blank)
|
|
//3.按钮文字
|
|
//4.说明文字
|
|
//5.事件
|
|
//6.资源图片路径
|
|
String sButtons[][] = {
|
|
};
|
|
|
|
%>
|
|
<%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
|
|
<script type="text/javascript" src="<%=sWebRootPath%>/Accounting/js/loan/term/rateterm.js"></script>
|
|
<script language=javascript>
|
|
var currency = "<%=currency%>";
|
|
var putoutDate = "<%=putoutDate%>";
|
|
var maturityDate = "<%=maturityDate%>";
|
|
var businessDate = "<%=DateHelper.getBusinessDate()%>";
|
|
var yearDays = "<%=yearDays%>";
|
|
|
|
function saveRecord(){
|
|
if(!iV_all("myiframe0")) return false;
|
|
as_save("myiframe0");
|
|
return true;
|
|
}
|
|
|
|
function changeTerm(){
|
|
var termID = getItemValue(0,getRow(),"TermID");
|
|
if(typeof(termID) == "undefined" || termID.length == 0 || "<%=termID%>" == termID) return;
|
|
|
|
var view = AsControl.RunJavaMethod("com.amarsoft.app.base.config.impl.BusinessComponentConfig","getComponentAttribute","componentID="+termID+",attributeID=format");
|
|
if("1"==view)
|
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessFINInfo.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
|
else
|
|
AsControl.OpenView("/Accounting/LoanDetail/LoanTerm/BusinessFINList.jsp","ObjectType=<%=objectType%>&ObjectNo=<%=objectNo%>&Status=<%=status%>&TermID="+termID,"_self","");
|
|
}
|
|
if("ReadOnly" != "<%=CurPage.getParameter("RightType")%>")
|
|
{
|
|
setBaseRateGrade();
|
|
setRepriceInfo();
|
|
}
|
|
</script>
|
|
|
|
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |