📄 sys_dptmaintain_delete.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@ page import="java.util.*" %>
<%@ page import="com.galaxy.dao.*" %>
<%@ page import="com.galaxy.vo.*" %>
<%@ page import="com.galaxy.util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {
font-size: 24px;
font-weight: bold;
}
.style2 {
font-size: 12px;
font-weight: bold;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<script>
function toEditDpt()
{
document.form1.action="sys_dptmaintain_edit.htm";
document.form1.submit();
}
</script>
<script>
<!-- 翻页操作 -->
function changpage(currentpage){
document.form1.currentPage.value=currentpage;
document.form1.opflag.value='init';
document.form1.submit();
return false;
}
function del_select()
{
if(!confirm("确定要删除?"))
return false;
var checked = 0;
for(var k = 0; k < document.form1.elements.length; k++)
{
if(document.form1.elements[k].type == "checkbox"
&& document.form1.elements[k].checked == true)
{
checked = 1;
}
}
if(checked == 0)
{
alert("请选择删除的数据!")
return false;
}
document.form1.action = "SM_DeptInfoServlet?opflag=del"
document.form1.submit();
}
function editdept()
{
var checked = 0;
for(var k = 0; k < document.form1.elements.length; k++)
{
if(document.form1.elements[k].type == "checkbox"
&& document.form1.elements[k].checked == true)
{
checked += 1;
}
}
if(checked == 0)
{
alert("请选择编辑的数据!")
return false;
}
if(checked > 1)
{
alert("只能编辑一条数据!")
return false;
}
document.form1.action = "sys_manage\\sys_dptmaintain_edit.jsp"
document.form1.submit();
}
function Redirect(addr)
{
document.form1.action=addr;
document.form1.submit();
}
function chaxun()
{
document.form2.action="SM_DeptInfoServlet?opflag=init";
document.form2.submit();
}
</script>
<link rel="stylesheet" type="text/css" href="css/css.css"/>
</head>
<%
String currentPage="1";
PageHelp pagehelp=new PageHelp();//实例化PageHelp对象pageHelp
if(request.getAttribute("pagehelp")!=null){
pagehelp=(PageHelp)request.getAttribute("pagehelp");
}
List deptlist=pagehelp.getObjectlist();
if(pagehelp.getCurrentpage()!=0 ){
currentPage=String.valueOf( pagehelp.getCurrentpage());
}
%>
<body>
<div id="Layer2" style="position:absolute; left:0px; top:58px; width:800px; height:98px; z-index:2">
<form name="form2" method="post" action="SM_DeptInfoServlet">
<h1 align="center">部门列表</h1>
<table width="100%" border="1" cellpadding="0" cellspacing="0" class="toBeSetBgColor">
<tr class="RowHeader">
<td width="10%" height="22"></td>
<td width="28%" class="style2">部门名称:<input type="text" name="deptname" value=""></td>
<td width="28%" class="style2">部门经理:<input type="text" name="deptmanager" value=""></td>
<td width="18%" class="style2" height="22">
状态:<select name="depstate">
<option value=0 selected>选择状态</option>
<option value=1 >可用</option>
<option value=2 >不可用</option>
<option value=3 >被合并</option>
</td>
<td width="16%" align="center"><input type="button" name="deptmanager" value=" 查 询 " onClick="chaxun()"></td>
</tr>
</table>
</form>
<form name="form1" method="post" action="SM_DeptInfoServlet">
<table width="100%" border="1" cellpadding="0" cellspacing="0" class="toBeSetBgColor">
<tr class="RowHeader">
<td width="10%" height="22"><div align="center" class="style2">选择</div></td>
<td width="15%"><div align="center" class="style2">部门名称</div></td>
<td width="15%"><div align="center" class="style2">部门级别</div></td>
<td width="15%"><div align="center" class="style2">上级部门</div></td>
<td width="15%"><div align="center" class="style2">部门经理</div></td>
<td width="15%"><div align="center" class="style2">部门人数</div></td>
<td width="15%"><div align="center" class="style2">部门状态</div></td>
</tr>
<%
DeptInfoVO deptinfovo = new DeptInfoVO();
DeptInfoDAO deptinfodao = new DeptInfoDAO();
DeptInfoVO updeptvo = new DeptInfoVO();
for(int i = 0; i < deptlist.size(); i++){
deptinfovo = (DeptInfoVO)deptlist.get(i);
updeptvo.setDiId(deptinfovo.getDiUp());
updeptvo = (DeptInfoVO)deptinfodao.readObject(updeptvo);
%>
<tr <%if(i%2 == 0){%>class="OddRow"<%}else{%>class="EvenRow"<%}%> onMouseOver="this.style.backgroundColor='white'"
onMouseOut="this.style.backgroundColor=''">
<td><div align="center">
<input type="checkbox" name="checkbox" value=<%=deptinfovo.getDiId() %>>
</div></td>
<td align="center"><%=deptinfovo.getDiName() %></td>
<td align="center"><%=deptinfovo.getLevelInfo().getLiName() %></td>
<td align="center"><%if(updeptvo.getDiId() == 0){%>无<%}else {%><%=updeptvo.getDiName()%><%} %></td>
<td align="center"><%=deptinfovo.getDiManager() %></td>
<td align="center"><%=deptinfovo.getDiNumber() %></td>
<td align="center"><%=deptinfovo.getDiState() %></td>
</tr>
<%} %>
</table>
<%if(deptlist.size()==0) {%>
<table width="100%" border="1" cellpadding="0" cellspacing="0" class="toBeSetBgColor">
<tr>
<td align=center width=10% height=25 ><font color="#FF0000">没有符合查询条件的信息!请重新输入</font></td>
</tr>
</table>
<%} %>
<input type="hidden" name="opflag" value=""/>
<input type="hidden" name="currentPage" value="<%=currentPage%>"/>
<input type="hidden" name="cond" value="<%=pagehelp.getCondition()%>"/>
<table width="800" border="0" align="center">
<tr>
<td style="text-align:center" class="style2"><%=pagehelp.getPagebar()%></td>
</tr>
</table>
<table width="100%" height="37" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%"></td>
<td width="15%"><div align="center">
<input type="button" name="Submit2" value=" 添加部门 " onClick="Redirect('sys_manage\\sys_dptmaintain_add.jsp')">
</div></td>
<td width="15%"><div align="center">
<input type="button" name="Submit4" value="删除所选部门" onClick="del_select()">
</div></td>
<td width="15%"><div align="center">
<input type="button" name="Submit2" value="编辑所选部门" onClick="editdept()">
</div></td>
<td width="15%"><div align="center">
<input type="button" name="Submit2" value=" 合并部门 " onClick="Redirect('sys_manage\\sys_dptmaintain_combine.jsp')">
</div></td>
<td width="20%"></td>
</tr>
</table>
</form>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -