139 lines
5.9 KiB
Plaintext
139 lines
5.9 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%><%@
|
|
include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
|
/*
|
|
Content: 风险分类认定签署意见
|
|
*/
|
|
String PG_TITLE = "风险分类认定签署意见";
|
|
//定义变量
|
|
String sSql="";
|
|
ASResultSet rs=null;
|
|
String sObjectNo="",sBusinessType="",sBusinessCurrency="";
|
|
String sAccountMonth="",sModeClassifyResult="",sCustomerName="",sCustomerID="";
|
|
double dBalance = 0.0;
|
|
//BC表或者BD表
|
|
String sTableName = "", jbo="";
|
|
String sTempletNo = "";
|
|
|
|
//获取组件参数
|
|
//FLOW_TASK表记录流水号
|
|
String sSerialNo = CurPage.getParameter("TaskNo");
|
|
//风险分类申请流水号
|
|
String sClassifyRecordNo = CurPage.getParameter("ObjectNo");
|
|
//风险分类类型:Classify
|
|
String sObjectType = CurPage.getParameter("ObjectType");
|
|
//风险分类是借据或合同
|
|
String sResultType = CurPage.getParameter("ResultType");
|
|
|
|
//将空值转化为空字符串
|
|
if(sSerialNo == null) sSerialNo = "";
|
|
if(sClassifyRecordNo == null) sClassifyRecordNo = "";
|
|
if(sObjectType == null) sObjectType = "";
|
|
if(sResultType == null) sResultType = "";
|
|
|
|
//根据sResultType来确定是对BUSINESS_DUEBILL(借据)或BUSINESS_CONTRACT(合同)表进行操作
|
|
if ("BusinessDueBill".equals(sResultType)) {
|
|
sTableName = "BUSINESS_DUEBILL";
|
|
jbo = "jbo.app.BUSINESS_DUEBILL";
|
|
sTempletNo = "SignClassifyOpinionInfo1";
|
|
}
|
|
if ("BusinessContract".equals(sResultType)) {
|
|
sTableName = "BUSINESS_CONTRACT";
|
|
jbo = "jbo.app.BUSINESS_CONTRACT";
|
|
sTempletNo = "SignClassifyOpinionInfo1";
|
|
}
|
|
|
|
//取得页面需要展现的数据信息:借据/合同流水号,业务品种,币种,余额,会计月份,模型评估结果
|
|
sSql = " select CR.ObjectNo,BT.BusinessType,BT.BusinessCurrency," +
|
|
" BT.Balance,CR.AccountMonth,CR.SecondResult," +
|
|
" BT.CustomerID,BT.CustomerName" +
|
|
" from "+SqlObject.getTable("jbo.app.CLASSIFY_RECORD")+" CR," + SqlObject.getTable(jbo) + " BT" +
|
|
" where CR.ObjectType = :ObjectType" +
|
|
" and CR.SerialNo = :SerialNo and CR.ObjectNo=BT.SerialNo";
|
|
rs = Sqlca.getASResultSet(new SqlObject(sSql).setParameter("ObjectType",sResultType).setParameter("SerialNo",sClassifyRecordNo));
|
|
if(rs.next()){
|
|
sObjectNo = rs.getString("ObjectNo");
|
|
sBusinessType = rs.getString("BusinessType");
|
|
sBusinessCurrency = rs.getString("BusinessCurrency");
|
|
//风险分类模型评估结果代码
|
|
sModeClassifyResult = rs.getString("SecondResult");
|
|
dBalance = rs.getDouble("Balance");
|
|
sAccountMonth = rs.getString("AccountMonth");
|
|
sCustomerName = rs.getString("CustomerName");
|
|
sCustomerID = rs.getString("CustomerID");
|
|
|
|
if (sObjectNo==null)sObjectNo="";
|
|
if (sBusinessType==null)sBusinessType="";
|
|
if (sBusinessCurrency==null)sBusinessCurrency="";
|
|
if (sModeClassifyResult==null)sModeClassifyResult="";
|
|
if (sAccountMonth==null)sAccountMonth="";
|
|
if (sCustomerName==null)sCustomerName="";
|
|
if (sCustomerID==null)sCustomerID="";
|
|
}
|
|
rs.getStatement().close();
|
|
|
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
|
dwTemp.Style="2"; //freeform形式
|
|
dwTemp.genHTMLObjectWindow(sSerialNo);
|
|
|
|
String sButtons[][] = {
|
|
{"true","","Button","保存","保存所有修改","saveRecord()","","","",""},
|
|
{"true","","Button","删除","删除意见","deleteRecord()","","","",""},
|
|
};
|
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<script type="text/javascript">
|
|
setDialogTitle("<%=PG_TITLE%>");
|
|
/*~[Describe=保存签署的意见;InputParam=无;OutPutParam=无;]~*/
|
|
function saveRecord(){
|
|
//不允许签署的意见为空白字符
|
|
if(/^\s*$/.exec(getItemValue(0,0,"PhaseOpinion2"))){
|
|
alert("请签署认定理由!");
|
|
setItemValue(0,0,"PhaseOpinion2","");
|
|
return;
|
|
}
|
|
as_save("myiframe0");
|
|
}
|
|
|
|
/*~[Describe=删除意见;InputParam=无;OutPutParam=无;]~*/
|
|
function deleteRecord(){
|
|
var sSerialNo=getItemValue(0,getRow(),"SerialNo");
|
|
var sOpinionNo = getItemValue(0,getRow(),"OpinionNo");
|
|
if (typeof(sOpinionNo)=="undefined" || sOpinionNo.length==0){
|
|
alert("您还没有签署意见,不能做删除意见操作!");
|
|
}else if(confirm("你确实要删除意见吗?")){
|
|
sReturn= RunMethod("BusinessManage","DeleteSignOpinion",sSerialNo+","+sOpinionNo);
|
|
if (sReturn==1){
|
|
alert("意见删除成功!");
|
|
}else{
|
|
alert("意见删除失败!");
|
|
}
|
|
}
|
|
reloadSelf();
|
|
}
|
|
|
|
/*~[Describe=插入一条新记录;InputParam=无;OutPutParam=无;]~*/
|
|
function initRow(){
|
|
//如果没有找到对应记录,则新增一条,并可以设置字段默认值
|
|
if (getRowCount(0)==0){
|
|
setItemValue(0,getRow(),"CustomerID","<%=sCustomerID%>");
|
|
setItemValue(0,getRow(),"CustomerName","<%=sCustomerName%>");
|
|
setItemValue(0,getRow(),"SerialNo","<%=sSerialNo%>");
|
|
setItemValue(0,getRow(),"ObjectNo","<%=sClassifyRecordNo%>");
|
|
setItemValue(0,getRow(),"ObjectType","<%=sObjectType%>");
|
|
setItemValue(0,getRow(),"BusinessCurrency","<%=sBusinessCurrency%>");
|
|
setItemValue(0,getRow(),"InputOrg","<%=CurOrg.getOrgID()%>");
|
|
setItemValue(0,getRow(),"InputOrgName","<%=CurOrg.getOrgName()%>");
|
|
setItemValue(0,getRow(),"InputUser","<%=CurUser.getUserID()%>");
|
|
setItemValue(0,getRow(),"InputUserName","<%=CurUser.getUserName()%>");
|
|
setItemValue(0,getRow(),"InputTime","<%=StringFunction.getToday()%>");
|
|
}
|
|
setItemValue(0,getRow(),"PhaseChoice","<%=sObjectNo%>");
|
|
setItemValue(0,getRow(),"BusinessTypeName","<%=sBusinessType%>");
|
|
setItemValue(0,getRow(),"Balance","<%=DataConvert.toMoney(dBalance)%>");
|
|
setItemValue(0,getRow(),"AccountMonth","<%=sAccountMonth%>");
|
|
setItemValue(0,getRow(),"PhaseOpinion1","<%=sModeClassifyResult%>");
|
|
}
|
|
|
|
initRow();
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |