apzl_leasing/WebContent/Common/Evaluate/AddEvaluateMessage.jsp
2018-06-03 22:26:41 +08:00

164 lines
5.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@page import="com.amarsoft.biz.evaluate.EvaluateManager"%>
<%@ page contentType="text/html; charset=GBK"%><%@ include file="/IncludeBeginMD.jsp"%><%
/*
Content: 新增评级
Input Param:
ObjectType: 对象类型
ObjectNo : 对象编号
ModelType : 评估模型类型 010--信用等级评估 030--风险度评估 080--授信限额 018--信用村镇评定 具体由'EvaluateModelType'代码说明
*/
String sDefaultModelNo="", sAccountMonthInputType = "", sAccountMonthExplanation="";
String sObjectType = CurPage.getParameter("ObjectType");
String sObjectNo = CurPage.getParameter("ObjectNo");
String sModelType = CurPage.getParameter("ModelType");
if(sModelType==null) sModelType = "";
JBOTransaction tx = JBOFactory.createJBOTransaction();
EvaluateManager evalManager = null;
try{
evalManager = new EvaluateManager(sObjectType, sObjectNo,sModelType, tx);
tx.commit();
}catch(Exception e){
tx.rollback();
throw e;
}
String sModelTypeAttributes = evalManager.getModelTypeAttributes();
/* 等级评估变量说明
sModelTypeAttributes 模型相关的参数定义串
sAccountMonthSelectSQL
sAccountMonthExplanation 对于会计月份的补充说明
sDefaultModelNoSQL 取得对应类型的查询语句
*/
sAccountMonthInputType = StringFunction.getProfileString(sModelTypeAttributes,"AccountMonthInputType");
//sAccountMonthSelectSQL = StringFunction.getProfileString(sModelTypeAttributes,"AccountMonthSelectSQL");
sAccountMonthExplanation = StringFunction.getProfileString(sModelTypeAttributes,"AccountMonthExplanation");
//sDefaultModelNoSQL = StringFunction.getProfileString(sModelTypeAttributes,"DefaultModelNoSQL");
//取得对应的评估模型
sDefaultModelNo = evalManager.getModelNo();
String EVALUATE_CATALOG = SqlObject.getTable("jbo.sys.EVALUATE_CATALOG");
%>
<html>
<head><title><%=evalManager.getModelTypeName()%> - 新增</title></head>
<body leftmargin="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%">&nbsp;</td>
<td width="100%" align="left" valign="top">
<form name="evaluate">
<table width="100%" align="left" border="0" cellspacing="0" cellpadding="5">
<tr>
<td>&nbsp;</td>
</tr>
<%
if(sAccountMonthInputType.equals("select")){
%>
<tr>
<td nowrap> 月份:
<select name="AccountMonth" class="right">
<%=HTMLControls.generateDropDownSelect(evalManager.getMonthSelectValue(), evalManager.getMonthSelectName(), "")%>
</select>
(<%=sAccountMonthExplanation%>)
</td>
</tr>
<%
}else{
%>
<tr>
<td nowrap> 月份:
<SELECT id="AccountMonth" name="AccountMonth" class=loginInput>
<%
int iMonth = 0;
String sVisibleString = StringFunction.getToday().substring(0,7);
for(iMonth=0;iMonth<24;iMonth++){
out.println("<OPTION value='"+sVisibleString+"'>"+sVisibleString+"</OPTION>");
sVisibleString = StringFunction.getRelativeAccountMonth(sVisibleString,"Month",-1);
}
%>
</SELECT>
</td>
</tr>
<%
}
%>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td nowrap> 模型:
<select name="ModelNo" class="right">
<%
if (sModelType.equals("010")||sModelType.equals("012")) out.print(HTMLControls.generateDropDownSelect(Sqlca,"select ModelNo,ModelName from "+EVALUATE_CATALOG+" where ModelType='"+sModelType+"' and ModelNo = '"+sDefaultModelNo+"' order by ModelNo ",1,2,sDefaultModelNo));
else out.print(HTMLControls.generateDropDownSelect(Sqlca,"select ModelNo,ModelName from "+EVALUATE_CATALOG+" where ModelType='"+sModelType+"' order by ModelNo ",1,2,sDefaultModelNo));
%>
</select>
</td>
</tr>
<tr> <td>&nbsp;</td> </tr>
<tr>
<td>
<table style="width: 70%;border: 0;">
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td><%=new Button("确定", "确定进行新评估", "setNext()", "", "").getHtmlText()%></td>
<td><%=new Button("取消", "取消新评估", "parent.AsDialog.ClosePage();", "", "").getHtmlText()%></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
<script type="text/javascript">
function setNext() {
sDateScopeCustomerID = document.forms["evaluate"].AccountMonth.value;
var str = sDateScopeCustomerID.split("@");
sAccountMonth = str[0];
sReportScope = str[1];
sCustomerID = str[2];
sModelNo = document.forms["evaluate"].ModelNo.value;
if(sAccountMonth==""){
alert(getMessageText("ALS70191"));//请先选择会计报表月份!
return;
}
if(!isDateForAccountMonth(sAccountMonth+"/01")){
alert(getMessageText("ALS70192"));//请输入正确的会计报表月份格式YYYY/MM
return;
}
if(sModelNo==""){
alert(getMessageText("ALS70193"));//请先选择一个模型!
return;
}
//sReportScope != "undefined" 说明为公司客户
if(typeof(sReportScope) != "undefined" && sReportScope.length > 0){
//将财务报表设置为锁定状态
sReportStatus = '03';
}else{
//个人客户没有报表口径,设为空
//设置为空字符串兼容ORACLE数据库对空值的处理
sReportScope=' ';
}
returnValue={"ObjectType":"<%=sObjectType%>","ObjectNo":"<%=sObjectNo%>","ModelType":"<%=sModelType%>","ModelNo":sModelNo,"AccountMonth":sAccountMonth,"ReportScope":sReportScope,"ReportStatus":sReportStatus};
parent.AsDialog.ClosePage(returnValue);
}
function isDateForAccountMonth(sItemName) {
var sItems = sItemName.split("/");
if (sItems.length!=3) return false;
if (isNaN(sItems[0])) return false;
if (isNaN(sItems[1])) return false;
if (isNaN(sItems[2])) return false;
if (parseInt(sItems[0],10)<1900 || parseInt(sItems[0],10)>2050) return false;
if (parseInt(sItems[1],10)<1 || parseInt(sItems[1],10)>12) return false;
if (parseInt(sItems[2],10)<1 || parseInt(sItems[2],10)>31) return false;
return true;
}
</script>
<%@ include file="/IncludeEnd.jsp"%>