⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 history_list.jsp

📁 会议流程管理系统
💻 JSP
字号:
<%   
/**********************************************************
history_list.jsp
***********************************************************/
%>

<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,oa.main.*"%>
<jsp:useBean id="pb" class="oa.main.ParentBean" scope="page"/>
<link href="../../css/person.css" type=text/css rel=stylesheet>
<%
oa.bean.PersonBean personBean =null;
try{
	String uid = (String)session.getAttribute("zgbh");		
	if(uid==null)
	{
		response.sendRedirect("../../session_oa.htm");
		return;
	}

	DealString ds = new DealString();
	//取出当前人的职工编号
	String person_ID = ds.toString((String)session.getAttribute("zgbh"));
	
	//取得职工的级别
	String mlevel =  pb.toName("ZZ_ZGB","ZGBH","MLEVEL",person_ID);
	if(mlevel.equals("")) mlevel = "3";

	//查询条件
	String strTile = ds.toGBK(ds.toString((String)request.getParameter("txt_title")));
	String strKey = ds.toGBK(ds.toString((String)request.getParameter("txt_key")));
	if (pb.getConn() == null){
		%>		
		数据库无法响应,请<a href="javascript:window.history.back(-1);">返回</a>重试
		<%out.close();
	}
	final int num_per_page = 15; //临时设置,每页记录数
	int  recsum = 0;  //记录总数
	int  sum = 1;  //总页数

	String str_cur = ds.toString(request.getParameter("cur")); //翻页时传递页码
	int cur=1;
	if(!str_cur.equals(""))
		cur = Integer.parseInt(str_cur);

	// 设置查询的 SQL 语句
	String sql = "select A.ID,A.TITLE,A.SENDER,D.XM,A.TIME,E.XM as CHECKER_XM,A.CHECKERTIME,A.RECEIVERS,A.PERFORM,A.PERFORMER,A.MLEVEL from HG2_MEET_SUMMARY_HISTORY A,ZZ_ZGB D,ZZ_ZGB E where A.SENDER=D.ZGBH and A.CHECKER=E.ZGBH  and LOWER(A.TITLE) like '%"+strTile.toLowerCase()+"%' and LOWER(A.KEYWORD) like '%"+strKey.toLowerCase()+"%'";

	String where_condition = ""; 
	if (!person_ID.equals("1")){  //不是系统管理员
		where_condition = "( A.MLEVEL>="+mlevel+" or A.SENDER='"+person_ID+"' or A.CHECKER='"+person_ID+"' or A.PERFORMER='"+person_ID+"' or ( A.RECEIVERSZGBH like '%,"+uid+"' or A.RECEIVERSZGBH like '"+uid+",%' or A.RECEIVERSZGBH like  '%,"+uid+",%' ) )  ";
	}
	
	String order_condition = "order by TIME desc ";
	Vector vect = null;
	//生成SQL语句
	if(!where_condition.equals("")){
		sql = sql + " and "  + where_condition;
	}

	sql = sql + " " + order_condition ;
	
	//out.print(sql);
	//取得一页记录
	vect = pb.getOnePage(sql,cur,num_per_page,false);

	//总记录数
	Vector v1 = pb.getDataBySql(sql);
	recsum = v1.size();

	//总页数
	sum = Integer.parseInt((String)vect.get(0));
%>
<html>
  <head>
    <title>会议纪要历史</title>
	<link href="css/table.css" type=text/css rel=stylesheet>
	<link href="css/links.css" type=text/css rel=stylesheet>
	<script src="summary.js"></script>
  </head>

<script>
	function chkdata()	{
		if(!isDigit(document.all.cur.value)) {
			alert("输入的页码不是数字!");
			document.all.cur.value="";
			document.all.cur.focus();
			return false;
		}
		if(document.all.cur.value==""){
			alert("请输入页码!");
			document.all.cur.focus();
			return false;
		}
		else{
			var t = document.all.cur.value;
			var curpage = <%=cur%>;
			var sum = <%=sum%>;

			while(t.length>curpage.length) {
				alert("请跳至1和"+sum+"之间!");
				document.all.cur.value="";
				document.all.cur.focus();
				return false;
			}			
			if (t == curpage) {
				return false;
			}			
			if(t.length>sum.length)	{
				alert("请跳至1和"+sum+"之间!");
				document.all.cur.value="";
				document.all.cur.focus();
				return false;
			}
			if(t<1||t>sum){		
				alert("请跳至1和"+sum+"之间!");
				document.all.cur.value="";
				document.all.cur.focus();
				return false;
			}
		}
		document.all.form1.action = "history_list.jsp";
	}
	
	function firsrpg()	{
		document.all.form1.action = "history_list.jsp?cur=1";
		document.all.form1.submit();
	}
	function lastpg()	{
		document.all.form1.action = "history_list.jsp?cur=<%=cur-1%>";
		document.all.form1.submit();
	}
	function nextpg()	{
		document.all.form1.action = "history_list.jsp?cur=<%=cur+1%>";
		document.all.form1.submit();
	}
	function finalpg()	{
		document.all.form1.action = "history_list.jsp?cur=<%=sum%>";
		document.all.form1.submit();
	}
	function search(){
		document.all.form1.action = "history_list.jsp?cur=";
		document.all.form1.submit();
	}
	function goclear(){
		document.all.txt_title.value="";
		document.all.txt_key.value="";

	}
</script>

<BODY leftMargin=0 topMargin=0 >
<form name="form1" method="post" action="history_list.jsp">
<br>&nbsp;&nbsp;&nbsp;<font color="#505050" size=2>当前位置:会议管理>><a href="history_list.jsp">会议查询</a></font>

<div align=center>
<font color="#666666" size=3><b>会议查询结果<b></font>
</div>
<br>
<hr width="100%">
<TABLE border=0 cellSpacing=1 cellPadding=3 width="95%" align=center   style="word-break:break-all;">
    <tr   height=25>
      <td width="15%" align=left>标题:&nbsp;
	  <input type="text" name="txt_title" maxlength=80 size="20" class=text value="<%=strTile%>" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0">
	  &nbsp;&nbsp;关键字:&nbsp;<input type="text" name="txt_key" maxlength=80 size="20" class=text value="<%=strKey%>" style="color: #000000; background-color: #FFFFFF;font-family:宋体; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0">
	<input type="button" value="搜索"  onclick="return search()">&nbsp;<input type="button" value="清空"  onclick="return  goclear()">
	</td>

    </tr>
</table>
<br>
<TABLE class="tab" cellSpacing=1 cellPadding=3 width="95%" align=center  bgcolor=#A5BEE0 style="word-break:break-all;">
<TBODY>
	<TR bgColor="#666666" height=25>
	<font color="#ffffff">
	<TD>
	  <CENTER><B><font color="#ffffff">纪要标题</font></B></CENTER></TD>
	<TD>
	  <CENTER><B><font color="#ffffff">级别</font></B></CENTER></TD>

	<TD>
	  <CENTER><B><font color="#ffffff">发布人</font></B></CENTER></TD>
	<TD>
	  <CENTER><B><font color="#ffffff">发布时间</font></B></CENTER></TD>
	<TD>
	  <CENTER><B><font color="#ffffff">审核领导</font></B></CENTER></TD>
	<TD>
	  <CENTER><B><font color="#ffffff">督办人</font></B></CENTER></TD>
	<TD>
	  <CENTER><B><font color="#ffffff">纪要接收人</font></B></CENTER></TD>
	</font>
	</TR>
<%
	personBean=new oa.bean.PersonBean();
	int k=vect.size();
	String[] bgcolor={"#ffffff","#E0E0E0"};
	for(int i=1;i<k;i++){
		Hashtable hash = (Hashtable)vect.get(i);

		String ID = ds.toString((String)hash.get("ID"));
		String TITLE = ds.toString((String)hash.get("TITLE"));
		String SENDER = ds.toString((String)hash.get("SENDER"));
		String SENDERXM = ds.toString((String)hash.get("XM"));
		String TIME = ds.toString((String)hash.get("TIME"));
		String CHECKERXM = ds.toString((String)hash.get("CHECKER_XM"));
		String CHECKERTIME = ds.toString((String)hash.get("CHECKERTIME"));
		String RECEIVERS = ds.toString((String)hash.get("RECEIVERS"));
		String PERFORMER = ds.toString((String)hash.get("PERFORMER"));
		String PERFORMERNAME = pb.toName("ZZ_ZGB","ZGBH","XM",PERFORMER);
		String strLevel = ds.toString((String)hash.get("MLEVEL"));
		if(strLevel.equals("1")){
			strLevel = "一级";
		}
		if(strLevel.equals("2")){
			strLevel = "二级";
		}
		if(strLevel.equals("3")){
			strLevel = "三级";
		}

		String bmbh=personBean.toName("ZZ_ZGB","ZGBH","BMBH",SENDER);
		String bm=ds.toString(personBean.getFatherName(bmbh))+ds.toString(personBean.getApartName(bmbh));
	%>
	<tr bgcolor="<%=bgcolor[i%2]%>" height=25>
	<TD align=left>
	  <a style="cursor:hand;color:#000000" onmouseover="this.style.color = 'red';" onmouseout = "this.style.color = 'black';" href="history_read.jsp?id=<%=ID%>" title="纪要标题"><%=TITLE%></a></TD>
	<TD align=center>
	  <%=strLevel%></TD>
	<TD align=center title="<%=SENDERXM%>:<%=bm%>">
	  <%=SENDERXM%></TD>
	<TD align=center>
	  <%=TIME.substring(0,16)%></TD>
	<TD align=center>
	  <%=CHECKERXM%></TD>
	<TD align=center>
	  <%=PERFORMERNAME%></TD>	
	<TD align=center<%if(RECEIVERS.length()>23){%> title="<%=RECEIVERS%>"<%}%>>
	  <%if(RECEIVERS.length()>23){%><%=RECEIVERS.substring(0,10)+"..."%><%}else{%><%=RECEIVERS%><%}%> </TD>
	</tr>
<%
	}
%>
	<tr height=25 class="table_body">
		<TD align=right colspan=7 bgColor=#E0E0E0>
		共有记录数:<%=recsum%>&nbsp;&nbsp;&nbsp;&nbsp;
<%if(vect.size()>1){%>
		当前<font color=red><%=cur%></font>/<%=sum%>页&nbsp;&nbsp;&nbsp<a onclick="firsrpg()" style="cursor:hand">第一页&nbsp;&nbsp;&nbsp </a>
		<%if(cur>1){%>
		<a onclick="lastpg()" style="cursor:hand">上一页&nbsp;&nbsp;&nbsp </a><%}%>
		<%if(cur<sum){%>
		<a onclick="nextpg()" style="cursor:hand">下一页&nbsp;&nbsp;&nbsp</a><%}%>&nbsp;&nbsp
		<a onclick="finalpg()" style="cursor:hand">最后页&nbsp;&nbsp;&nbsp </a>
		直接<input type=image src="../../images/hand.gif" name="gotof" onclick="return chkdata()">
		<input type=text size=5 name="cur" class=formcolor >页</TD>
<%}%>
	</tr>

</tbody>
</table>
</form>
</body>
</html>
<script>
	document.all.form1.onsubmit=chkdata;
</script>
<%}catch(Exception e){
	out.println(e);
}finally{
	if(pb!=null)
		pb.closeConn();
	if(personBean!=null)personBean.closeConn();
}%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -