📄 actionrelation.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="cn.com.aheadsoft.recordset.AppFlowActionRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.ApprovalFlowRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.AppActionRelationRecordSet" %>
<%@ page import="cn.com.aheadsoft.util.StringFormat" %>
<jsp:useBean id="userinfo" scope="session" class="cn.com.aheadsoft.util.UserInfo"/>
<jsp:useBean id="upm" scope="session" class="cn.com.aheadsoft.manage.UserPurviewManage"/>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
<title>财务管理流程步骤设置</title>
<%
/*int q3 = upm.getUserPopInt(userinfo,"9","3","q");
int i3 = upm.getUserPopInt(userinfo,"9","3","i");
int u3 = upm.getUserPopInt(userinfo,"9","3","u");
int d3 = upm.getUserPopInt(userinfo,"9","3","d");*/ //replace by zenghongli 2004.9.7
int i6 = upm.getUserPopInt(userinfo,"9","6","i");
int u6 = upm.getUserPopInt(userinfo,"9","6","u");
int d6 = upm.getUserPopInt(userinfo,"9","6","d");
%>
<%
ApprovalFlowRecordSet flowRecordSet=(ApprovalFlowRecordSet) request.getAttribute("AppFlow");
AppFlowActionRecordSet ActionRecordSet=(AppFlowActionRecordSet) request.getAttribute("AppFlowAction");
%>
<script>
<!--
action = new Array();
<%
if(ActionRecordSet != null && ActionRecordSet.size() > 0) {
int i = 0;
while(ActionRecordSet.next()) {
out.println("action["+String.valueOf(i)+"]=new Array();");
out.println("action["+String.valueOf(i)+"][0]='"+StringFormat.Source2GB(ActionRecordSet.getFA_Name())+"';");
out.println("action["+String.valueOf(i)+"][1]='"+StringFormat.Source2GB(ActionRecordSet.getFA_ID())+"';");
out.println("action["+String.valueOf(i)+"][2]='"+StringFormat.Source2GB(ActionRecordSet.getFA_FlowID())+"';");
i++;
}
}
%>
function selectAction() {
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
len=document.Relation.FAR_PreActionID.options.length;
if(len>0){
for(i=len-1;i>=0;i--){
document.Relation.FAR_PreActionID.remove(i);
document.Relation.FAR_NextActionID.remove(i);
}
}
index=document.Relation.FAR_FlowID.selectedIndex;
values=document.Relation.FAR_FlowID.options[index].value;
for(i=0;i<action.length;i++) {
if(action[i][2]==values) {
optionnew=document.createElement("option");
optionnew.text=action[i][0];
optionnew.value=action[i][1];
optionnew1=document.createElement("option");
optionnew1.text=action[i][0];
optionnew1.value=action[i][1];
if(isIE) {
document.Relation.FAR_PreActionID.add(optionnew);
document.Relation.FAR_NextActionID.add(optionnew1);
}else {
document.Relation.FAR_PreActionID.appendChild(optionnew);
document.Relation.FAR_NextActionID.appendChild(optionnew1);
}
}
}
}
function update(id,key,preid,nextid) {
document.Relation.FAR_ID.value = id;
document.Relation.FAR_FlowID.value = key;
selectAction() ;
document.Relation.FAR_PreActionID.value = preid;
document.Relation.FAR_NextActionID.value = nextid;
document.Relation.status.value = "u";
document.Relation.FAR_FlowID.focus();
}
function atSubmit(){
index1=document.all.FAR_PreActionID.options.selectedIndex;
index2=document.all.FAR_NextActionID.options.selectedIndex;
document.all.FAR_PreActionName.value = document.Relation.FAR_PreActionID.options[index1].text;
document.all.FAR_NextActionName.value = document.Relation.FAR_NextActionID.options[index2].text;
}
function atDelete() {
return confirm("您确定要删除吗?");
}
-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="selectAction()">
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr height="8">
<td class="trA"> 您的位置:财务管理 >> 参数设置 >> <font class="fontcolor">步骤关系设置</font>
</td>
</tr>
<tr height="8">
<td></td>
</tr>
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" width="98%" align="center" class="collapse">
<tr >
<td class="tdA" colspan="9">
步骤关系设置</td>
</tr>
<form action="/krm/servlet/AppActionRelationServlet" method="post" name="Relation" >
<tr >
<td width="100" class="common bgcolor" > 审批流程名称</td>
<td class="common"> <select style="font-size:9pt;font-color:#FFFFFF" name="FAR_FlowID" alt"审批流程" onchange="selectAction()">
<%
if(flowRecordSet != null && flowRecordSet.size() > 0) {
while(flowRecordSet.next()) {
%>
<option value="<%= flowRecordSet.getAF_ID() %>"><%= StringFormat.Source2GB(flowRecordSet.getAF_Name()) %></option>
<%
}
}
%>
</select> </td>
</tr>
<tr>
<td class="common bgcolor"> 前步骤选择</td>
<td class="common"><select style="font-size:9pt;font-color:#FFFFFF" name="FAR_PreActionID" alt"前步骤" >
</select><input type="Hidden" name="FAR_PreActionName"></td>
</tr>
<tr>
<td width="100" class="common bgcolor"> 后步骤选择</td>
<td class="common"><select style="font-size:9pt;font-color:#FFFFFF" name="FAR_NextActionID" alt"后步骤" >
</select> <input type="Hidden" name="FAR_NextActionName"></td>
</tr>
<input type="Hidden" name="status" value="i">
<input type="Hidden" name="FAR_ID" value="0">
<tr>
<td align="center" class="tdC" colspan="2">
<%
if(i6 > 0) {
%>
<INPUT type="submit" value="提 交" onClick="return atSubmit()" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1">
<%
}
%>
</td>
</tr>
</form>
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="98%" align="center">
<tr >
<td width="8%" class="tdB" align="center">序号</td>
<td width="31%" class="tdB" align="center">流程名称</td>
<td width="18%" class="tdB" align="center">前步骤名称</td>
<td width="16%" class="tdB" align="center">后步骤名称</td>
<td width="12%" class="tdB" align="center">修改</td>
<td width="15%" class="tdB" align="center">删除</td>
</tr>
<%
AppActionRelationRecordSet recordset = (AppActionRelationRecordSet)request.getAttribute("ActionRelation");
if(recordset != null && recordset.size() > 0) {
int num = 1;
while(recordset.next()) {
%>
<tr <%
if(num%2==0){
%> class="bgcolor"<%}%>>
<td width="8%" align="center" class="common"><%= num %></td>
<td width="31%" class="common" align="center"><%= StringFormat.Source2GB(recordset.getFAR_FlowName()) %></td>
<td width="18%" class="common" align="center"><%= StringFormat.Source2GB(recordset.getFAR_PreActionName()) %></td>
<td width="16%" class="common" align="center"><%= StringFormat.Source2GB(recordset.getFAR_NextActionName()) %></td>
<td width="12%" class="common" align="center">
<%
if(u6 > 0) {
%>
<a href="javascript:update("<%= StringFormat.Source2GB(recordset.getFAR_ID()) %>","<%= StringFormat.Source2GB(recordset.getFAR_FlowID()) %>" ,"<%= StringFormat.Source2GB(recordset.getFAR_PreActionID()) %>","<%= StringFormat.Source2GB(recordset.getFAR_NextActionID()) %>");">修改</a>
<%
}else {
out.print("修改");
}
%>
</td>
<td width="15%" class="common" align="center">
<%
if(d6 > 0) {
%>
<a href="/krm/servlet/AppActionRelationServlet?status=d&FAR_ID=<%= recordset.getFAR_ID() %>" onclick="return atDelete()">删除</a>
<%
}else {
out.print("删除");
}
%>
</td>
</tr>
<%
num++;
}
}
%>
<tr><td colspan="6" class="tdC"> </td>
</tr>
</table>
<br>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -