📄 sys_dptmaintain_precombine.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@ page import="java.util.*" %>
<%@ page import="com.galaxy.dao.*" %>
<%@ page import="com.galaxy.vo.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<link rel="stylesheet" type="text/css" href="../css/css.css"/>
<head>
<base href="<%=basePath%>">
<title>My JSP 'sys_dptmaintain_precombine.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<script>
function Move(col1,col2)
{
if(col1.SelectedIndex==-1)return;
toMove = col1.options[col1.selectedIndex];
opt=new Option(toMove.text,toMove.value,false,false);
col1.options[col1.selectedIndex]=null;
col2.options[col2.length]=opt;
col2.selectedIndex=col2.length-1;
return true;
}
function ReturnValue()
{
List = document.form1.select2;
if(List.length > 3)
{
alert("最多只能合并三个部门!")
return false;
}
if(List.length == 0)
{
alert("请选择待合并部门!")
return false;
}
if(List.length == 1)
{
alert("合并的部门不能为一个!")
return false;
}
for(var i = 0; i < List.length; i++){
List.options[i].selected = true;
}
var deptsname="";
var deptsid="";
for(i=0;i<List.length;i++)
{
deptsname+=','+List.options[i].text;
deptsid+=','+List.options[i].value;
}
window.returnValue=deptsname+"-"+deptsid;
window.close();
}
</script>
<%
List deptlist = new ArrayList();
DeptInfoDAO deptinfodao = new DeptInfoDAO();
deptlist = deptinfodao.queryByCondition("and di_state='可用'");
%>
<body>
<br>
<br>
<br>
<hr>
<form name="form1" method="post" action="">
<table class="toBeSetBgColor" width="100%" height="139" border="1" cellpadding="0" cellspacing="0" >
<tr class="RowHeader">
<td width="20%"></td>
<td align="center">
<br>
所有可用部门:<br>
<select name="select1" size=<%=deptlist.size() %> style="width:100 " multiple>
<%
for(int i = 0; i < deptlist.size(); i++){
DeptInfoVO deptvo = new DeptInfoVO();
deptvo = (DeptInfoVO)deptlist.get(i);
%>
<option value=<%=deptvo.getDiId() %>><%=deptvo.getDiName() %></option>
<%} %>
</select>
</td>
<td width="20%" align="center">
<input name="left" type="button" value="---->" onClick="Move(select1,select2)"/>
<br>
<br>
<input name="right" type="button" value="<----" onClick="Move(select2,select1)"/>
</td>
<td width="20%" align="center">
<br>
待合并部门:<br>
<select name="select2" size=<%=deptlist.size() %> style="width:100 " multiple>
</select>
</td>
<td width="20%"></td>
</tr>
</table>
<hr><div align="center">
<input type="button" value=" 确 定 " onclick="ReturnValue()">
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -