📄 add_institution.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="cn.com.aheadsoft.util.StringFormat,cn.com.aheadsoft.recordset.DeptInfoRecordSet,cn.com.aheadsoft.util.UserInfo,cn.com.aheadsoft.manage.UserPurviewManage" %>
<%
DeptInfoRecordSet set = (DeptInfoRecordSet)request.getAttribute("result");
String[] sequency = (String[])request.getAttribute("sequency");
String quency = request.getParameter("quency");
UserInfo userinfo = (UserInfo)session.getAttribute("userinfo");
String username = "";
if(userinfo.GetUserID() != null){
username = userinfo.GetUserID();
}
UserPurviewManage priority = new UserPurviewManage();
/*int deptinsert = priority.getUserPopInt(userinfo, "4", "3", "i");
int deptupdate = priority.getUserPopInt(userinfo, "4", "3", "u");*/ //replace by zenghongli 2004.9.8
int deptinsert = priority.getUserPopInt(userinfo, "4", "1", "i");
int deptupdate = priority.getUserPopInt(userinfo, "4", "1", "u");
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
</head>
<script language="JavaScript" src="/krm/jsp/jscript/ls.js"></script>
<script language="JavaScript">
personsequency = new Array();
sequencycount = 0;
<%
int j = 0;
if(null != sequency){
for(int i = 0; i <sequency.length; i++){
out.println("personsequency["+i+"]='"+sequency[i]+"';");
j++;
}
}
out.println("sequencycount="+j+";");
%>
function isCheck(){
if(document.add.D_Name.value == null || document.add.D_Name.value == ""){
alert("请输入部门名称!");
document.add.D_Name.focus();
}else if(document.add.D_Sequency.value == null || document.add.D_Sequency.value == ""){
alert("请输入排序次序!");
document.add.D_Sequency.focus();
}else{
isOK = true;
for(i = 0; i < sequencycount; i++){
if(document.add.D_Sequency.value == personsequency[i]){
isOK = false;
break;
}
}
if(isOK){
document.add.submit();
}else{
alert("排序已存在!");
document.add.D_Sequency.focus();
}
}
}
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%if(set != null){
set.next();%>
<form name="add" method="POST" action="/krm/servlet/DeptServlet?module=dept&&status=u&&queryterm=ordinal&&id=<%=set.getDept_ID()%>">
<%}else{%>
<form name="add" method="POST" action="/krm/servlet/DeptServlet?module=dept&&status=i">
<%}%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<%if(null != set){%>
<tr class="trA">
<td> 您的位置:人事管理 >> 部门管理 >> <font class="fontcolor">部门设置修改</font></td>
</tr>
<%}else{%>
<tr class="trA">
<td> 您的位置:人事管理 >> 部门管理 >> <font class="fontcolor">添加部门</font></td>
</tr>
<%}%>
<tr height="8">
<td></td>
</tr>
<tr>
<td align="center">
<table border="0" width="98%" height="20%" class="collapse">
<%if(null != quency){%>
<div align="center"><font color="red">排序已存在!</font></div>
<%}%>
<%if(set != null){%>
<tr>
<td class="tdA" colspan="12" align="center"><div align="left">
修改部门</div></td>
</tr>
<tr>
<td width="100" class="common bgcolor">部门名称</td>
<td class="common"><input name="D_Name" type="text" class="long" maxlength="25" id="D_Name" value="<%=StringFormat.changeHTMLTags(set.getD_Name())%>"></td>
</tr>
<tr>
<td width="100" class="common bgcolor">排列次序</td>
<td class="common"><input name="D_Sequency" type="text" class="long" maxlength="25" id="D_Sequency" value="<%=set.getD_Sequency()%>" onKeyUp="atInput(this)"></td>
</tr>
<tr>
<td width="100" class="common bgcolor">部门职能</td>
<td class="common"><textarea name="D_Desc" id="D_Desc" cols="5" rows="5" style="overflow:auto"><%=set.getD_Desc()%></textarea></td>
</tr>
<%}else{%>
<tr>
<td class="tdA" colspan="9" align="center"><div align="left">
添加部门</div></td>
</tr>
<tr>
<td width="100" class="common bgcolor">部门名称</td>
<td class="common"><input name="D_Name" type="text" id="D_Name" class="long" maxlength="25"></td>
</tr>
<tr>
<td width="100" class="common bgcolor">排列次序</td>
<td class="common"><input name="D_Sequency" type="text" id="D_Sequency" class="long" maxlength="25" onKeyUp="atInput(this)"></td>
</tr>
<tr>
<td width="100" class="common bgcolor">部门职能</td>
<td class="common"><textarea name="D_Desc" id="D_Desc" cols="5" rows="5" style="overflow:auto"></textarea></td>
</tr>
<%}%>
<tr>
<td align="center" colspan="2" class="tdC">
<%if(set != null){%>
<%if((deptupdate > 0) || (username.equals("0"))){%>
<input type="button" value="修 改" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" onClick="isCheck();">
<%}%>
<%}else{%>
<%if((deptinsert > 0) || (username.equals("0"))){%>
<input type="button" value="添 加" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" onClick="isCheck();">
<%}%>
<%}%>
<input type="button" value="返 回" onmouseover="this.className='button2'" onmouseout="this.className='button1'" class="button1" onClick="history.back(1);">
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -