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

268 lines
12 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 contentType="text/html; charset=GBK"%>
<%@page import="com.amarsoft.biz.workflow.ApplyManager"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%>
<%
/*
Content: 该页面主要处理五级分类相关的申请列表,如待认定的申请列表,认定中的申请列表,认定通过的申请列表
*/
%>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%>
<%
String PG_TITLE = "五级分类申请列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
%>
<%/*~END~*/%>
<%
String sApplyType = CurPage.getParameter("ApplyType");
String sPhaseType = CurPage.getParameter("PhaseType");
if(sApplyType == null) sApplyType = "";
if(sPhaseType == null) sPhaseType = "";
//根据申请类型applyType、阶段类型phaseType 得到申请主树图申请按钮申请列表显示模板申请列表where条件等。
ApplyManager applyManager = new ApplyManager(sApplyType,sPhaseType,CurUser);
ASObjectModel doTemp = new ASObjectModel(applyManager.getDono());
doTemp.setLockCount(2);
doTemp.appendJboWhere(applyManager.getWhereClause());
doTemp.setJboOrder("objectNo desc");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //设置为Grid风格
//dwTemp.MultiSelect = true;//允许多选
dwTemp.ReadOnly = "1";//编辑模式
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = applyManager.getButtonArr();
String sResultType = CurConfig.getConfigure("ClassifyObjectType");
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=自定义函数;]~*/%>
<script type="text/javascript">
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
function newApply(){
//将jsp中的变量值转化成js中的变量值
var sObjectType = "<%=applyManager.getObjectType()%>";
var sResultType = "<%=sResultType%>";
var sApplyType = "<%=sApplyType%>";
var sPhaseType = "<%=sPhaseType%>";
//弹出新增申请参数对话框
var sCompURL = "/CreditManage/CreditCheck/ClassifyDialog.jsp";
AsDialog.PopView(sCompURL,"ObjectType="+sObjectType+"&ResultType="+sResultType+"&PhaseType="+sPhaseType+"&ClassifyType=010",
{title:"新增风险分类申请"},function(sReturn){
if(typeof(sReturn)=="undefined" || sReturn=="" || sReturn=="_CANCEL_" || sReturn.length == 0) return;
RunMethod("WorkFlowEngine","UpdateClassifyModelResult",sReturn);
reloadSelf();
});
}
/*~[Describe=删除记录;InputParam=无;OutPutParam=无;]~*/
function cancelApply(){
//获得申请类型、申请流水号
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sObjectNo = getItemValue(0,getRow(),"ObjectNo");
if (typeof(sObjectNo)=="undefined" || sObjectNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
if(confirm(getMessageText('AWEW1070'))){ //您真的想取消该信息吗?
AsControl.RunJavaMethodTrans("com.amarsoft.biz.classify.Classify","delete", "ObjectType="+sObjectType+",ObjectNo="+sObjectNo);
reloadSelf();
}
}
/*~[Describe=模型分类;InputParam=无;OutPutParam=无;]~*/
function viewDetail(){
//获得ObjectType(五级分类对象类型,值为"Classify"),ObjectNo(借据号或合同号),SerialNo(Classify_Record表的SerialNo即五级分类申请流水号)
//AccountMonth(会计月份),ModelNo(五级分类评估模型号),ResultType(五级分类是借据或合同,值为"BusinessDueBill"或"BusinessContract")
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sObjectNo = getItemValue(0,getRow(),"DuebillNo");
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
var sAccountMonth = getItemValue(0,getRow(),"AccountMonth");
var sResultType = "<%=sResultType%>";
//五级分类的阶段ID待处理的申请认定中的申请认定通过的申请
var sPhaseType = "<%=sPhaseType%>";
//根据sClassifyType来确定在显示ClassifyDetail.jsp页面时是否显示"保存""测算"按钮。
if (sPhaseType == "1010") {
sClassifyType = "010";
} else {
sClassifyType = "020";
}
if (typeof(sObjectNo)=="undefined" || sObjectNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
//将以上参数组合成参数字符串
var sCompURL = "/CreditManage/CreditCheck/ClassifyDetail.jsp";
var sParameter = "1=1"+ "&Action=_DISPLAY_"+ "&ClassifyType="+sClassifyType+
"&ObjectType="+sObjectType+ "&ObjectNo="+sObjectNo+ "&SerialNo="+sSerialNo+ "&AccountMonth="+sAccountMonth+
"&ModelNo=Classify1"+ "&ResultType="+sResultType;
AsControl.OpenNewWin(sCompURL,sParameter);
if (sClassifyType == "010") {
//将模型分类结果更新到CLASSIFY_RECORD表的FinallyResult字段。
RunMethod("WorkFlowEngine","UpdateClassifyModelResult",sSerialNo);
}
reloadSelf();
}
/*~[Describe=打开详情;InputParam=无;OutPutParam=无;]~*/
function viewTab(){
//获得ObjectType(五级分类对象类型,为"Classify") SerialNo(Classify_Record表的SerialNo即五级分类申请流水号)sDuebillNo(借据号或合同号),
//AccountMonth(会计月份),ResultType(五级分类是借据或合同,值为"BusinessDueBill"或"BusinessContract")
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
var sObjectNo = getItemValue(0,getRow(),"DuebillNo");
var sAccountMonth = getItemValue(0,getRow(),"AccountMonth");
var sPhaseType = "<%=sPhaseType%>"; //五级分类的阶段ID待处理的申请认定中的申请认定通过的申请
if (sPhaseType == "1010") {
sClassifyType = "010";
sViewID = "000";//jschen@20100423 控制tab可修改
} else {
sClassifyType = "020";
sViewID = "002";//jschen@20100423 控制tab只读
}
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
var sResultType = "<%=sResultType%>";
var sParamString = "ComponentName=风险分类参考模型"+
"&OpenType=Tab"+ //jschen@20100412 用来区分打开分类模型界面的方式
"&Action=_DISPLAY_"+ "&ClassifyType="+sClassifyType+ "&ObjectType="+sObjectType+
"&ObjectNo="+sSerialNo+ "&SerialNo="+sObjectNo+ "&AccountMonth="+sAccountMonth+ "&ModelNo=Classify1"+
"&ResultType="+sResultType+ "&ViewID="+sViewID;
AsControl.OpenObjectTab(sParamString);
if (sClassifyType == "010") {
//将模型分类结果更新到CLASSIFY_RECORD表的FinallyResult字段.
RunMethod("WorkFlowEngine","UpdateClassifyModelResult",sSerialNo);
}
reloadSelf();
}
/*~[Describe=提交;InputParam=无;OutPutParam=无;]~*/
function doSubmit(){
//获得申请类型、申请流水号、流程编号、阶段编号、申请类型
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sObjectNo = getItemValue(0,getRow(),"ObjectNo");
var sCRSerialNo = getItemValue(0,getRow(),"SerialNo");
var sFlowNo = getItemValue(0,getRow(),"FlowNo");
var sPhaseNo = getItemValue(0,getRow(),"PhaseNo");
if (typeof(sObjectNo)=="undefined" || sObjectNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
//检查该业务是否已经提交了(解决用户打开多个界面进行重复操作而产生的错误)
var sNewPhaseNo = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","getCurPhaseNo","ObjectType="+sObjectType+",ObjectNo="+sObjectNo);
if(sNewPhaseNo != sPhaseNo) {
alert(getMessageText("ALS70486"));//该申请已经提交了,不能再次提交!
reloadSelf();
return;
}
//检查该业务是否已经进行模型评定
var sModeResult = RunMethod("WorkFlowEngine","CheckClassifyModeResult",sCRSerialNo);
if(typeof(sModeResult)=="undefined" || sModeResult.length==0) {
alert("请先进行模型评定");
return;
}
//获取任务流水号
var sTaskNo = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","getUnfinishedTaskNo",
"ObjectType="+sObjectType+",ObjectNo="+sObjectNo+",FlowNo="+sFlowNo+",PhaseNo="+sPhaseNo+",UserID=<%=CurUser.getUserID()%>");
if(typeof(sTaskNo)=="undefined" || sTaskNo.length==0) {
alert(getMessageText("ALS70500"));//该申请所对应的流程任务不存在,请核对!
return;
}
//检查是否签署意见
var sReturn = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","isSignOpinion","TaskNo="+sTaskNo);//返回值: yes-有意见; no-无意见; error-查询出错
if(sReturn!="yes") {
alert(getMessageText("ALS70501"));//该业务未签署意见,不能提交,请先签署意见!
return;
}
//弹出审批提交选择窗口
AsDialog.PopView("/Common/WorkFlow/FlowSubmitDialog.jsp","TaskNo="+sTaskNo,
"dialogWidth=580px;dialogHeight=450px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(sPhaseInfo){
if(typeof(sPhaseInfo)=="undefined" || sPhaseInfo=="" || sPhaseInfo==null || sPhaseInfo=="null" || sPhaseInfo=="_CANCEL_") return;
else if (sPhaseInfo == "Success" ||sPhaseInfo == "success"){
alert(getMessageText('AWEW1018'));//提交成功!
//更新finallyResult方法此方法已经默认为把最新的人工认定结果赋值给finallyResult如果有其他的更新逻辑请自行更新类方法。
RunMethod("WorkFlowEngine","UpdateClassifyManResult",sCRSerialNo + "," +sTaskNo);
}else{
alert("提交失败!");
}
reloadSelf();
});
}
/*~[Describe=签署意见;InputParam=无;OutPutParam=无;]~*/
function signOpinion(){
var sObjectType = getItemValue(0,getRow(),"ObjectType"); //"Classify"
var sSerialNo = getItemValue(0,getRow(),"SerialNo");//五级分类申请流水号
var sFlowNo = getItemValue(0,getRow(),"FlowNo");
var sPhaseNo = getItemValue(0,getRow(),"PhaseNo");
var sResultType = "<%=sResultType%>"; //五级分类借据或合同
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
//检查该业务是否已经进行模型评定
var sModeResult = RunMethod("WorkFlowEngine","CheckClassifyModeResult",sSerialNo);
if(typeof(sModeResult)=="undefined" || sModeResult.length<1) {
alert("请先进行模型评定");
return;
}
//获取Flow_Task表中的任务流水号
var sTaskNo = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","getUnfinishedTaskNo",
"ObjectType="+sObjectType+",ObjectNo="+sSerialNo+",FlowNo="+sFlowNo+",PhaseNo="+sPhaseNo+",UserID=<%=CurUser.getUserID()%>");
if(typeof(sTaskNo)=="undefined" || sTaskNo.length==0) {
alert(getMessageText("ALS70500"));//该申请所对应的流程任务不存在,请核对!
return;
}
AsDialog.PopView("/Common/WorkFlow/SignClassifyOpinionInfo.jsp","TaskNo="+sTaskNo+"&ResultType="+sResultType+"&ObjectType="+sObjectType+"&ObjectNo="+sSerialNo+"&PhaseNo="+sPhaseNo,"dialogWidth=700px;dialogHeight=600px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;");
}
/*~[Describe=查看审批意见;InputParam=无;OutPutParam=无;]~*/
function viewOpinions(){
//获得申请类型、申请流水号、流程编号、阶段编号
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sObjectNo = getItemValue(0,getRow(),"ObjectNo");
var sFlowNo = getItemValue(0,getRow(),"FlowNo");
var sPhaseNo = getItemValue(0,getRow(),"PhaseNo");
if (typeof(sObjectNo)=="undefined" || sObjectNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
AsDialog.PopView("/Common/WorkFlow/ViewClassifyFlowOpinions.jsp","FlowNo="+sFlowNo+"&PhaseNo=0010&ObjectType="+sObjectType+"&ObjectNo="+sObjectNo,{title:"查看审批意见"});
}
function showGraph(){
//获得申请类型、申请流水号、流程编号、阶段编号
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sObjectNo = getItemValue(0,getRow(),"ObjectNo");
var sFlowNo = getItemValue(0,getRow(),"FlowNo");
if (typeof(sObjectNo)=="undefined" || sObjectNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
//ShowFlowInst.jsp
AsDialog.PopView("/Frame/ShowFlowTab.jsp","flowNo="+sFlowNo+"&objectType="+sObjectType+"&objectNo="+sObjectNo+"","dialogWidth=800px;dialogHeight=500px");
}
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>