📄 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.RightBean rtBean =null;
oa.bean.PersonBean personBean =null;
try{
String uid = (String)session.getAttribute("zgbh");
if(uid==null)
{
response.sendRedirect("../../session_oa.htm");
return;
}
rtBean=new oa.bean.RightBean();
rtBean.setUID(uid);
DealString ds = new DealString();
//取出当前人的职工编号
String person_ID = ds.toString((String)session.getAttribute("zgbh"));
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,A.CHECKER,E.XM as CHECKER_XM,A.ISCHECK,A.CHECKERTIME,A.ISPERFORM,A.ISFILED,count(B.id) as COUNT from HG2_MEET_SUMMARY A left join HG2_MEET_SUMMARY_MEN B on A.ID=B.SUMMARYID,ZZ_ZGB D,ZZ_ZGB E where A.SENDER=D.ZGBH and A.CHECKER=E.ZGBH";
String where_condition = "";
if (!person_ID.equals("1")){ //不是系统管理
where_condition = " (SENDER='" + person_ID
+ "' or CHECKER='" + person_ID + "')";
}
//统计分组条件
String group_condition = "group by A.ID,A.TITLE,A.SENDER,D.XM,A.TIME,A.CHECKER,E.XM,A.ISCHECK,A.CHECKERTIME,A.ISPERFORM,A.ISFILED ";
//排序字段
String order_condition = "order by TIME desc";
Vector vect = null;
//生成SQL语句
if(!where_condition.equals("")){
sql = sql + " and " + where_condition;
}
sql = sql + " " + group_condition + " " + order_condition;
// out.print(sql);
//取得一页记录
vect = pb.getOnePage(sql,cur,num_per_page,false);
//总页数
sum = Integer.parseInt((String)vect.get(0));
//out.println(vect);
%>
<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 = "list.jsp";
//return true;
}
function firsrpg() {
document.all.form1.action = "list.jsp?cur=1";
document.all.form1.submit();
}
function lastpg() {
document.all.form1.action = "list.jsp?cur=<%=cur-1%>";
document.all.form1.submit();
}
function nextpg() {
document.all.form1.action = "list.jsp?cur=<%=cur+1%>";
document.all.form1.submit();
}
function finalpg() {
document.all.form1.action = "list.jsp?cur=<%=sum%>";
document.all.form1.submit();
}
</script>
<BODY leftMargin=0 topMargin=0 >
<form name="form1" method="post" action="list.jsp">
<br> <font color="#505050" size=2>当前位置:会议管理>><a href="list.jsp?cur=<%=str_cur%>">会议纪要</a></font>
<div align=center>
<font color="#666666" size=3><b>纪要列表<b></font>
</div>
<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>
<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>
<TR bgColor=#ffffff height=25>
<TD colSpan=9 height=25 ></TD>
<TD align="center" ><%if(rtBean.isRightMode("会议纪要","起草纪要")){%>
<p align="center"><FONT color="#FF6600">
<A href="edit.jsp?action=add" style="cursor:hand;color:#0000FF">[起草纪要]</A></FONT></p><%}%>
</TD>
</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 keyword = ds.toString((String)hash.get("KEYWORD"));
// String content = (String)hash.get("WORD");
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 CHECKER = ds.toString((String)hash.get("CHECKER"));
String CHECKERXM = ds.toString((String)hash.get("CHECKER_XM"));
String ISCHECK =ds.toString((String)hash.get("ISCHECK"));
String CHECKERTIME = ds.toString((String)hash.get("CHECKERTIME"));
String count = ds.toString((String)hash.get("COUNT"));
String ISPERFORM = ds.toString((String)hash.get("ISPERFORM"));
String ISFILED = ds.toString((String)hash.get("ISFILED"));
if(CHECKERTIME.equals("")) CHECKERTIME=" ";
String ISCHECK_STR=ISCHECK.equals("1")?"<font color=green>是</font>":"<font color=blue>否</font>";
String ISPERFORM_STR=ISPERFORM.equals("1")?"<font color=green>是</font>":"<font color=blue>否</font>";
String ISFILED_STR=ISFILED.equals("1")?"<font color=green>是</font>":"<font color=blue>否</font>";
//out.print("SENDER:"+SENDER+" person_ID:"+person_ID+" ISFILED:"+ISFILED);
String bmbh=personBean.toName("ZZ_ZGB","ZGBH","BMBH",SENDER);
String bm=ds.toString(personBean.getFatherName(bmbh))+ds.toString(personBean.getApartName(bmbh));
//是否成文
boolean filed=false;
if(ISFILED.equals("1")) filed=true;
//是否审核
boolean check=false;
if(ISCHECK.equals("1")) check=true;
//删除权限
boolean del_r=false;
if(SENDER.equals(person_ID) && !check) del_r=true;
//修改权限
boolean mod_r=false;
if(SENDER.equals(person_ID) && !check) mod_r=true;
//审核权限
boolean check_r=false;
if(CHECKER.equals(person_ID) && !filed && !check) check_r=true;
//成文权限
boolean filed_r=false;
if(SENDER.equals(person_ID) && check && !filed) filed_r=true;
//out.print("sender======="+SENDER+"------");
//out.print("person_ID=="+person_ID);
//是否督办
boolean perform=false;
if(ISPERFORM.equals("1")) perform=true;
//归档权限
boolean store_r=false;
if(SENDER.equals(person_ID) && check && filed && perform) store_r=true;
//取得有多少人收到纪要
String sqlsum = "select ID from HG2_MEET_SUMMARY_MEN where SUMMARYID='"+ID+"' and ISREAD = '1'";
Vector vectsum = pb.getDataBySql(sqlsum);
%>
<tr bgcolor="<%=bgcolor[i%2]%>" height=25>
<TD align=left WIDTH="180">
<a style="cursor:hand;color:#000000" onmouseover="this.style.color = 'red';" onmouseout = "this.style.color = 'black';" href="read.jsp?id=<%=ID%>&cur=<%=str_cur%>" title="纪要标题"><%=TITLE%></a></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>
<%=ISCHECK_STR%></TD>
<TD align=center>
<%=ISFILED_STR%></TD>
<TD align=center>
<%=ISPERFORM_STR%></TD>
<TD align=center>
<%=count%>人</TD>
<TD align=center>
<%=vectsum.size()%>人</TD>
<TD align=center>
<%if(del_r){%> <a onclick="return confirm('确定要删除吗?')" style="cursor:hand;color:#0000FF" href="servlet.jsp?action=del&id=<%=ID%>&cur=<%=str_cur%>">[删除]</a><%}%>
<%if(mod_r){%><a style="cursor:hand;color:#0000FF" href="modify.jsp?action=mod&id=<%=ID%>&cur=<%=str_cur%>">[修改]</a><%}%>
<%if(check_r){%><a style="cursor:hand;color:#0000FF" href="check.jsp?id=<%=ID%>&cur=<%=str_cur%>">[审核]</a><%}%>
<%if(filed_r)
{%><a style="cursor:hand;color:#0000FF" onclick="return confirm('成文后将纪要分发给接收人,要继续吗?')" href="servlet.jsp?action=filed&id=<%=ID%>&cur=<%=str_cur%>">[成文]</a><%}%>
<%if(store_r)
{%><a style="cursor:hand;color:#0000FF" onclick="return confirm('确定要归档吗?')" href="servlet.jsp?action=pigeonhole&id=<%=ID%>&cur=<%=str_cur%>">[归档]</a><%}%>
</TD>
</tr>
<%
}
%>
<tr height=25 class="table_body">
<TD align=right colspan=10 bgColor=#E0E0E0>
<%if(vect.size()>1){%>
当前<%=cur%>/<%=sum%>页  <a onclick="firsrpg()" style="cursor:hand">第一页   </a>
<%if(cur>1){%>
<a onclick="lastpg()" style="cursor:hand">上一页   </a><%}%>
<%if(cur<sum){%>
<a onclick="nextpg()" style="cursor:hand">下一页  </a><%}%>  
<a onclick="finalpg()" style="cursor:hand">最后页   </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>
</html>
<script>
document.all.form1.onsubmit=chkdata;
</script>
<%}catch(Exception e){
e.printStackTrace();
}finally{
if(pb!=null)
pb.closeConn();
if(rtBean!=null)rtBean.closeConn();
if(personBean!=null)personBean.closeConn();
}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -