2018-06-03 22:26:41 +08:00

138 lines
4.9 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.are.lang.StringX"%>
<%@page contentType="text/html; charset=GBK"%>
<%@include file="/Frame/resources/include/include_begin.jspf"%>
<%
String phaseOpinionStr = CurPage.getParameter("PhaseOpinionStr");
if(StringX.isSpace(phaseOpinionStr)) phaseOpinionStr = "";
String taskNo = CurPage.getParameter("TaskNo");
if(StringX.isSpace(taskNo)) taskNo = "";
String userID = CurUser.getUserID();
if(!phaseOpinionStr.contains("@")) phaseOpinionStr+="@";
String[] phaseOpinion = phaseOpinionStr.split("@");
int iNum = phaseOpinion.length;
%>
<html>
<head>
<title>流程提交选择</title>
</head>
<style>
.opinion-style{
width:100%;
overflow:hidden;
display:inline-block;
margin-bottom:2px;
outline:none;
}
a.opinion-style:hover{
background-color:A8CAE5;
outline:none;
}
.opinion-focus{
background:A8CAE5;
}
</style>
<body>
<div id="nextopinionset">
<div style="margin-top:10px;margin-left:15px;font-size:14px;">
<font color="#000000">请选择下一阶段提交动作:</font>
</div>
<div style="margin-top:10px;margin-left:10px;font-size:12px;border:1px solid lightgray;padding:10px;">
<%
for(int i=0;i<iNum;i++){
out.println("<a class='opinion-style' href='javascript:void(0)' onclick='doActionList(this)'><input type='radio' name='phaseopinion' value='"+phaseOpinion[i]+"' >"+phaseOpinion[i]+"</input></a>");
}
%>
</div>
</div>
<div id="nextactionset">
<div style="margin-top:10px;margin-left:15px;font-size:14px;">
<font color="#000000">请选择下一阶段提交用户:</font>
</div>
<div id="phaseaction" style="margin-top:10px;margin-left:10px;font-size:12px;border:1px solid lightgray;padding:5px;"></div>
</div>
<div id="nextphaseset" style="margin-top:20px;margin-left:5px;font-size:14px;">
<table width="100%" align="center">
<tr>
<td align="center"><b><span id="nextpaseinfo" style="color: #FF0000" ></span></b></td>
</tr>
</table>
</div>
<div id="actionset" style="margin-top:5px;margin-left:10px;font-size:14px;">
<table align="center">
<tr>
<td width="50%" align="left"><%=new Button("确认","确认提交","javascript:commitAction();","","btn_icon_Submit","").getHtmlText()%></td>
<td width="50%" align="center"><%=new Button("取消","取消提交","javascript:doCancel();","","btn_icon_delete","").getHtmlText()%></td>
</tr>
</table>
</div>
</body>
</html>
<script type="text/javascript">
var taskNo = "<%=taskNo%>";
//提交动作选择
function doActionList(obj){
$(obj).siblings().removeClass("opinion-focus");
$(obj).addClass("opinion-focus");
$("#nextactionset").show();
var phaseOpinion = $(obj).find("input").val();
$(obj).find("input").attr("checked","true");
if(!phaseOpinion){
alert("请选择提交动作!");
return;
}
var phaseActionStr = RunJavaMethodSqlca("com.amarsoft.app.als.workflow.action.FlowManageAction","getActionList","TaskNo="+taskNo+",PhaseOpinion="+phaseOpinion);
if(phaseActionStr.indexOf("CONTINUE")<0){
$("#phaseaction").html("");
var phaseAction = $("#phaseaction");
for(var i=0;i<phaseActionStr.split("@").length;i++){
phaseAction.append("<a class='opinion-style' href='javascript:void(0)' onclick='getNextPhaseInfo(this)'><input type='radio' name='phaseaction' value='"+phaseActionStr.split("@")[i]+"'>"+phaseActionStr.split("@")[i]+"</input></a>");
}
}
$("#nextpaseinfo").text("");
$("#actionset").hide();
}
//获取下一阶段动作
function getNextPhaseInfo(obj){
$(obj).siblings().removeClass("opinion-focus");
$(obj).addClass("opinion-focus");
$(obj).find("input").attr("checked","true");
$("#nextphaseset").show();
$("#actionset").show();
var phaseOpinion = $("input[name='phaseopinion']:checked").val();
var phaseAction = $("input[name='phaseaction']:checked").val();
var nextPhaseInfo = RunJavaMethodSqlca("com.amarsoft.app.als.workflow.action.FlowManageAction","getNextPhaseInfo","TaskNo="+taskNo+",PhaseOpinion="+phaseOpinion+",PhaseAction="+phaseAction);
$("#nextpaseinfo").text(nextPhaseInfo);
}
//提交动作
function commitAction(){
var phaseOpinion = $("input[name='phaseopinion']:checked").val();
if(!phaseOpinion){
alert("请选择提交动作!");
return;
}
var phaseAction = $("input[name='phaseaction']:checked").val();
if(!phaseAction){
alert("请选择提交用户信息!");
return;
}
var nextPhaseInfo = $("#nextpaseinfo").text();
if (!confirm("该笔业务的"+nextPhaseInfo+"\r\n处理人是:"+phaseAction.split(" ")[1]+",\r\n你确定提交吗")) return;
var returnValue = RunJavaMethodTrans("com.amarsoft.app.als.workflow.action.FlowManageAction","commitTask","TaskNo="+taskNo+",PhaseOpinion="+phaseOpinion+",UserID=<%=userID%>,PhaseAction="+phaseAction);
top.returnValue = returnValue;
top.close();
}
function doCancel(){
if(confirm("您确定要放弃此次提交吗?")){
top.returnValue = "_CANCEL_";
top.close();
}
}
function init(){
$("#nextactionset").hide();
$("#nextphaseset").hide();
$("#actionset").hide();
}
init();
</script>
<%@include file="/Frame/resources/include/include_end.jspf"%>