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

209 lines
9.6 KiB
Plaintext
Raw Permalink 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"%>
<%
/*
Content: 信用等级认定列表
*/
String PG_TITLE = "信用等级评估申请列表"; // 浏览器窗口标题 <title> PG_TITLE </title>
%>
<%
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()+" order by 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();
%>
<%/*~END~*/%>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
<%/*~[Describe=新增信用等级认定申请;]~*/%>
function newApply(){
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sObjectName = getItemValue(0,getRow(),"CustomerName");
var sFlowNo = getItemValue(0,getRow(),"FlowNo");
var sPhaseNo = getItemValue(0,getRow(),"PhaseNo");
AsDialog.PopView("/Common/Evaluate/EvaluateApplyCreateInfo.jsp",
"Action=display&ObjectType=<%=applyManager.getObjectType()%>&ApplyType=<%=sApplyType%>&FlowNo=<%=applyManager.getFlowNo()%>&PhaseNo=0010",
{title:"新增信用评级申请"},function(sReturns){
if (!$.isPlainObject(sReturns)) return;
var sObjectType = sReturns.ObjectType;
var sObjectNo = sReturns.ObjectNo;
var sModelType = sReturns.ModelType;
var sModelNo = sReturns.ModelNo;
var sAccountMonth = sReturns.AccountMonth;
var sReportScope = sReturns.ReportScope; //实现多口径,要加上报表口径这个参数。
var sReportStatus = sReturns.ReportStatus;
var sReturn=AsControl.RunJsp("/Common/Evaluate/ConsoleEvaluateAction.jsp","Action=add&ObjectType="+sObjectType+"&ObjectNo="+sObjectNo+"&ModelType="+sModelType+"&ModelNo="+sModelNo+"&AccountMonth="+sAccountMonth+"&ReportScope="+sReportScope+"&ReportStatus="+sReportStatus);
if (typeof(sReturn) != "undefined" && sReturn.length>=0 && sReturn == "EXIST"){
alert(getMessageText("ALS70189"));//本期信用等级评估记录已存在,请选择其他月份!
return;
}
if(typeof(sReturn) != "undefined" && sReturn.length>=0 && sReturn != "failed"){
//回调函数內不能在新窗口打开页面,否则会被一些浏览器拦截
AsControl.OpenTab("/Common/Evaluate/EvaluateDetail.jsp","Action=display&Editable=true&CustomerID="+sObjectNo+"&ObjectName="+sObjectName+
"&ObjectType="+sObjectType+"&ObjectNo="+sObjectNo+"&SerialNo="+sReturn+"&ModelNo="+sModelNo,{title:sObjectName+"("+sAccountMonth+")信用评级"});
}
reloadSelf();
});
}
<%/*~[Describe=信用等级评估详情;]~*/%>
function viewDetail(){
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sObjectName = getItemValue(0,getRow(),"CustomerName");
var sAccountMonth = getItemValue(0,getRow(),"AccountMonth");
var sUserID = getItemValue(0,getRow(),"UserID");
var sOrgID = getItemValue(0,getRow(),"OrgID");
var sObjectNo = getItemValue(0,getRow(),"ObjectNo");
var sPhaseNo = getItemValue(0,getRow(),"PhaseNo");
var sModelNo = getItemValue(0,getRow(),"ModelNo");
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
}else{
var sEditable="true";
if(sPhaseNo!="0010"){
sEditable="false";
}
AsControl.OpenTab("/Common/Evaluate/EvaluateDetail.jsp","Action=display&Editable="+sEditable+"&CustomerID="+sObjectNo+"&ObjectName="+sObjectName+
"&ObjectType="+sObjectType+"&ObjectNo="+sObjectNo+"&SerialNo="+sSerialNo+"&ModelNo="+sModelNo, {title:sObjectName+"("+sAccountMonth+")信用评级"});
reloadSelf();
}
}
<%/*~[Describe=删除记录;]~*/%>
function cancelApply(){
//获得类型、流水号
var ObjectType = getItemValue(0,getRow(),"ObjectType");
var SerialNo = getItemValue(0,getRow(),"SerialNo");
var sObjectNo = getItemValue(0,getRow(),"ObjectNo");
var sAccountMonth = getItemValue(0,getRow(),"AccountMonth");
var sReportScope = getItemValue(0,getRow(),"ReportScope");
if (typeof(SerialNo)=="undefined" || SerialNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
if(confirm(getMessageText('AWEW1002'))){ //您真的想删除该信息吗?
sReportStatus = '02';//取消评估申请时要将报表的状态设置为完成。01表示新增状态02表示完成状态03表示锁定状态。
sReturn = RunJavaMethodTrans("com.amarsoft.app.als.customer.common.action.CustomerFSAction","updateFSStatus","ObjectNo="+sObjectNo+",ReportStatus="+sReportStatus+",ReportDate="+sAccountMonth+",ReportScope="+sReportScope);
var sReturn = RunJavaMethodTrans("com.amarsoft.app.lending.bizlets.DeleteCreditCognTask","delete",
"ObjectType="+ObjectType+",ObjectNo="+SerialNo+",DeleteType=DeleteTask");
if (typeof(sReturn) != "undefined" && sReturn.length>=0){
alert("删除成功!");
}
reloadSelf();
}
}
//签署意见
function signOpinion(){
//获得类型、流水号、流程编号、阶段编号
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sObjectNo = getItemValue(0,getRow(),"ObjectNo");
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
var sFlowNo = getItemValue(0,getRow(),"FlowNo");
var sPhaseNo = getItemValue(0,getRow(),"PhaseNo");
var sEvaluateScore = getItemValue(0,getRow(),"EvaluateScore");
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
if (typeof(sEvaluateScore)=="undefined" || sEvaluateScore.length==0){
alert("请先进行模型评定!");//请先进行模型评定
return;
}
//获取任务流水号
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;
}
var sParaString = "TaskNo="+sTaskNo +"&ObjectType="+sObjectType +"&ObjectNo="+sObjectNo
+"&ERSerialNo="+sSerialNo +"&PhaseNo="+sPhaseNo;
AsDialog.PopView("/Common/WorkFlow/SignEvaluateOpinionInfo.jsp",sParaString,"dialogWidth=550px;dialogHeight=420px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;");
//将人工评估分数和结果更新到EVALUATE_RECORD表中 add by cbsu 2009-11-11
RunMethod("WorkFlowEngine","UpdateEvaluateManResult",sSerialNo + "," + sTaskNo);
reloadSelf();
}
<%/*~[Describe=查看审批意见;]~*/%>
function viewOpinions(){
//获得类型、流水号、流程编号、阶段编号
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
var sFlowNo = getItemValue(0,getRow(),"FlowNo");
var sPhaseNo = getItemValue(0,getRow(),"PhaseNo");
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
AsDialog.PopView("/Common/WorkFlow/ViewEvaluateOpinions.jsp","FlowNo="+sFlowNo+"&PhaseNo="+sPhaseNo+"&ObjectType="+sObjectType+"&ObjectNo="+sSerialNo,{width:"680px",height:"550px",title:"查看审批意见"});
}
/*~[Describe=提交;]~*/
function doSubmit(){
//获得类型、申请流水号、流程编号、阶段编号
var sObjectType = getItemValue(0,getRow(),"ObjectType");
var sSerialNo = getItemValue(0,getRow(),"SerialNo");
var sFlowNo = getItemValue(0,getRow(),"FlowNo");
var sPhaseNo = getItemValue(0,getRow(),"PhaseNo");
var sEvaluateScore = getItemValue(0,getRow(),"EvaluateScore");
var sFinishDate = "<%=StringFunction.getToday()%>";
var sUserId="<%=CurUser.getUserID()%>";
if (typeof(sSerialNo)=="undefined" || sSerialNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}else if (typeof(sEvaluateScore)=="undefined" || sEvaluateScore.length==0){
alert("请先进行模型评定!");//请先进行模型评定
return;
}
//获取任务流水号
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;
}
//检查是否签署意见
var sReturn = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","isSignOpinion","TaskNo="+sTaskNo);//返回值: yes-有意见; no-无意见; error-查询出错
if(sReturn!="yes") {
alert("请先签署认定意见,然后再提交!");//先签署认定意见
return;
}
//弹出审批提交选择窗口
AsDialog.PopView("/Common/WorkFlow/FlowSubmitDialog.jsp","TaskNo="+sTaskNo,
"dialogWidth=580px;dialogHeight=420px;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("提交成功!");
reloadSelf();
}else{
alert("提交失败!");
}
});
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>