📄 index.jsp
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ page import="com.woyi.page.*,java.util.*"%>
<%@ page import="com.woyi.dto.*"%>
<%@ page import="java.util.List"%>
<%@ page import="com.dc.common.*"%>
<html>
<%
PageInfo pageInfo = (PageInfo) request.getAttribute("pageInfo");
String sdepartname = (String) session.getAttribute("sdepartname")==null?"":(String) session.getAttribute("sdepartname");
String RenCode = (String) session.getAttribute(SysConstant.RETCODE);
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/style.css" type="text/css">
<script language="javaScript" src="<%=request.getContextPath()%>/scripts/check.js"></script>
<script language="javaScript" src="<%=request.getContextPath()%>/scripts/dialog.js"></script>
<script language="javaScript" src="<%=request.getContextPath()%>/scripts/pagination.js"></script>
<script language="javaScript" src="<%=request.getContextPath()%>/scripts/selectOption.js"></script>
<script language="javaScript" src="<%=request.getContextPath()%>/scripts/ajax.js"></script>
<title>部门管理</title>
</head>
<body class="navtree">
<form name="organization" method="POST" action="">
<table cellpadding="1" cellspacing="0" class="nav01">
<tr>
<td>
<img src="<%=request.getContextPath()%>/images/b1.gif" width="12" height="12" />
您现在的位置:系统管理>>部门管理<br>
</td>
</tr>
</table>
<%
if (RenCode !=null){
if (SysConstant.SUCRETCODE.equals(RenCode)) {
%>
<script language="javascript">
alert("部门信息删除成功!");
</script>
<%
}else{
%>
<script language="javascript">
alert("部门信息删除失败,请联系管理员!");
</script>
<%
}
session.removeAttribute(SysConstant.RETCODE);
}
%>
<html:errors />
<table border="1" bordercolor="#7FB0DE" bordercolordark="#ffffff" cellpadding="1" cellspacing="0" class="content01" width="50%">
<tr class="listHead">
<td colspan="4">[查询条件]</td>
</tr>
<tr class="listContent">
<td align=right>部门名称:</td>
<td align=left colspan=3>
<input type="text" name="departname" value="<%=sdepartname%>"/>
</td>
</tr>
<tr class="listContent">
<td colspan=4>
<input type=button class=add onClick="doAdd();"/>
<input type="button" class="query" onClick="doQry();"/>
</td>
</tr>
</table>
<%
if(pageInfo!=null)
{
%>
<div id="biaoge">
<table border="1" bordercolor="#7FB0DE" bordercolordark="#ffffff" cellpadding="1" cellspacing="0" class="content01" width="50%">
<tr class="listHead">
<td align="center" ><input type="checkbox" name="SELALL" id="SELALL" onClick="selectAllByCheckBox('CHECKBOXVAL','SELALL');" title="全选" class="nohborder"/></td>
<td align=center>部门名称</td>
<td align=center>部门电话</td>
<td align="center">部门负责人</td>
<td align="center">有效性</td>
<td align="center">部门描述</td>
<td align=center>操作员工号</td>
<td align=center>操作日期</td>
</tr>
<%
List sts = pageInfo.getPageData();
for(int i = 0; i < sts.size(); i++)
{
com.woyi.dto.Organization info =(com.woyi.dto.Organization)sts.get(i);
%>
<tr class="listContent">
<td align=center><input type="checkbox" name="CHECKBOXVAL" value="<%=info.getOrgcode()%>" class="noborder"/></td>
<td align=left><%=info.getOrgname()%> </td>
<td align="left"><%=info.getSvcnum()%> </td>
<td align="left"><%=info.getContact()%> </td>
<td align=left><%=info.getValidflag().equals("1")?"有效":"无效"%> </td>
<td align=left><%=info.getOrgdesc()%> </td>
<td align=left><%=info.getOptrid()%> </td>
<td align=left><%=info.getOptdate().toString().substring(0,info.getOptdate().toString().length()-2)%> </td>
</tr>
<%
}
%>
<tr class="listContent">
<td align=left colspan=10>
<input type="button" class="modify" onClick="doMod();">
<!-- <input type="button" class="delete" onClick="doDel();"> -->
</td>
</tr>
</table>
<%@ include file="../../common/page.jsp"%>
</div>
<%
}
%>
</form>
</body>
</html>
<script language="javascript">
/*
部门信息增加
*/
function doAdd(){
var sFeatures = "dialogWidth:800px;dialogHeight:600px;status:no;scroll:no;help:no;resizable:yes";
var rtnVal = window.showModalDialog('systemMgr.do?method=departAddInit' , '', sFeatures);
}
/*
部门信息查询
*/
function doQry(){
organization.action = "systemMgr.do?method=getDepartInfo&pageNo=1";
organization.submit();
}
/*
部门信息修改
*/
function doMod(){
var vehicleId = checkboxSingleValue("CHECKBOXVAL");
if(!vehicleId){
return false;
}
var sFeatures = "dialogWidth:800px;dialogHeight:600px;status:no;scroll:no;help:no;resizable:yes";
var rtnVal = window.showModalDialog('systemMgr.do?method=departUptInit&orgcode='+vehicleId, '', sFeatures);
}
/*
部门信息删除
*/
function doDel(){
var vehicleId = checkboxValue("CHECKBOXVAL");
if(!vehicleId){
return false;
}
organization.action = "systemMgr.do?method=delDepartInfo";
organization.submit();
}
/*
界面跳转
*/
function gotoPage(pageNo){
window.location.href="systemMgr.do?method=getDepartInfo&pageNo="+pageNo;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -