📄 pigeonhole_list.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.ijipin.tool.*" %>
<%@ page import="com.ijipin.database.*" %>
<%@ page import="com.ijipin.property.*" %>
<%@ include file="/userinfor.jsp" %>
<%@ include file="/share/page/page_request.jsp"%>
<%@ page import="com.ijipin.oa.document.*" %>
<%@ page import="com.ijipin.flow.*" %>
<%
String strSWLB = "38";
////////////////////////////列表页面所必须有的公共变量
final String strSkin = "../../" + userInfor_session.getPFLJ(); //皮肤路径
final String strLevel = Draft.strLevel; //本页所在的层次
final String strLink = "pigeonhole_list.jsp" ; //本页的地址
int iModuleID = Draft.iModuleID;
//查询条件,在包含页面中使用
String str_search[][] = null;
int i_search = 0;
int iCurrentPage = 1;
int iRecordCount = 0;
int iPageCount = 0;
int i=0;
PageInfor pageInfor = null;
//设置查询参数
String sTable = "";
String sField = "";
String sCond = "";
String sSortField = "" ;
int iOrder = 0;
//新建一个连接
DataConn dataConn = new DataConn();
Statement stmt = null;
ResultSet rs = null;
DataList dataList = null;
DataConn dataConn_read = null; //需要判断是否有“新”标志才需要
if (dataConn_read == null) {
dataConn_read = new DataConn();
}
Transact transact = new Transact(dataConn_read);
%>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Message.COMPANY_NAME%></title>
<link href="<%=strSkin%>css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
iModuleID = 70;
%>
<%@ include file="/share/page/bar_top.jsp"%>
<%
iModuleID = Draft.iModuleID;
%>
<%
try {
stmt = dataConn.getConnection().createStatement();
dataList = new DataList(stmt);
//获取本模块信息
Module module = new Module(dataConn);
moduleInfor_session = (ModuleInfor)module.getInfor(iModuleID);
//如果需要管理员可以看,而又不是管理人员
if (1 == moduleInfor_session.getSXGLBJ() && !isManager) {
out.println("<Script language='JavaScript'>");
out.println("alert('您不是管理人员,不能访问本页面');");
out.println("document.location.href='" + strLevel + "logout.jsp'");
out.println("</Script>");
return ;
}
//关联表及其他关联信息
String relateTable = "";
String relateField = "";
String relateValue = "0";
String relateName = "";
String relateCond = " and 1=1 ";
%>
<%@ include file="/share/property/list_property.jsp" %>
<%
/////////本页数据获取
//查询条件
sCond = " 1= 1";
if (!searchKey.equalsIgnoreCase("")){
sCond = searchField + " like '%" + searchKey + "%'";
}
//分页
try {
iCurrentPage = Integer.parseInt(strPage);
}
catch(Exception e) {}
//排序条件
sSortField = moduleInfor_session.getSXPX();
if (!sortField.equals("")) {
sSortField = sortField;
}
if (sortOrder.equals("")) {
iOrder = 1;
}
else {
iOrder = 1 - Integer.parseInt(sortOrder);
}
//组合查询条件
sTable = moduleInfor_session.getSXBM() + relateTable;
sField = sField.substring(1, sField.length());
sCond += relateCond + " AND WZGD=1";
////////////////////////管理条件,增加归档标志为1,为1的话已经归档
rs = dataList.getResultSet(sTable, sField, sCond, sSortField, iOrder, iCurrentPage);
//分页信息
pageInfor = dataList.getPageInfor();
iRecordCount = pageInfor.getRecordCount();
iPageCount = pageInfor.getPageCount();
iCurrentPage = pageInfor.getCurrentPage();
%>
<!-- 列表工具条上 2004-04-28 -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr class="toptr2">
<td>
<table width="100%" border=0 cellpadding=3 cellspacing=0 class="msglistcntrl" id="msglistcntrl">
<form name="form1" action="<%=strLink%>" method="post">
<tr>
<% if (isManager) {%>
<td><input type="button" name="del" value="" class="buttonDel" OnClick="javaScript:goFormUrlConfirm(formList,'pigeonhole_control.jsp?ACTION=DELETE','删除将不能恢复,是否继续?')"></td>
<% } %>
<td nowrap><%@ include file="/share/page/page_search.jsp"%></td>
<td align="right" nowrap><%@ include file="/share/page/page_top.jsp"%></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<!-- 列表数据区 2004-04-28 -->
<!-- 列表数据区 2004-04-28
/share/page/page_hidden.jsp 放分页,查询等hidden
selectField,selectValue 放列表查询的值,主要是针对按栏目分类
-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#D4D0C8">
<form name="formList" method="post" action="<%=strLink%>">
<tr class="toptr">
<%@include file="/share/page/page_hidden.jsp"%>
<input type="hidden" value="<%=selectField%>" name="<%=selectValue%>">
<%
iterField = field.getList().iterator();
while (iterField != null && iterField.hasNext()) {
fieldInfor = (FieldInfor)iterField.next();
%>
<%
if (fieldInfor.getZDLB() == 1) {
%>
<td <% if (fieldInfor.getZDLBKD()>0) {%> width="<%=fieldInfor.getZDLBKD()%>"<%}%>>
<a href="javaScript:goFormUrl(formList,'<%=strLink%>?sortOrder=<%=iOrder%>&sortField=<%=fieldInfor.getZDMC()%>')">
<%=fieldInfor.getZDSM()%>
<% if (iOrder ==1 && sSortField.equals(fieldInfor.getZDMC())) {%><img src="<%=strSkin%>common/order_down.gif" border="0">
<%} else if (iOrder ==0 && sSortField.equals(fieldInfor.getZDMC())) { %><img src="<%=strSkin%>common/order_up.gif" border="0"><%}%>
</a>
</td>
<% } else if (fieldInfor.getZDLB() == 2){ %>
<td align="center" <% if (fieldInfor.getZDLBKD()>0) {%> width="<%=fieldInfor.getZDLBKD()%>"<%}%>>
<input type="checkbox" name="checkall" value="1" onclick="CheckAll(this.form)">
</td>
<%
}
}
%>
<td width="45">状态</td>
<% if (iOperater > 0) {%>
<td width="<%=iOperater*15%>"><p align="center">操作</td>
<% } %>
</tr>
<!--值-->
<%
i = 0;
str_value = "";
str_field = "";
key_field = "";
key_value = "";
//状态
int iState = 0;
String strState = "";
//办理人员
while (rs != null && rs.next()) {
%>
<tr class="toptr3" onMouseOver="javascript:this.style.background= '#ECF2FC'" onMouseOut="javascript:this.style.background = '#FFFFFF'">
<%
isBarManager = false;
hasRead = false;
iterField = field.getList().iterator();
i_list = 1;
while (iterField != null && iterField.hasNext()) {
fieldInfor = (FieldInfor)iterField.next();
if (fieldInfor.getZDLB() ==0) {
continue;
}
str_field = fieldInfor.getZDMC();
str_value = Convert.toUnicode(rs.getString(i_list));
//////////是否有关联
if (!Convert.toSpaceStr(fieldInfor.getZDGLBM()).equals("")) {
/////下一个才是要显示的,这个是找管理的关联
relateValue = "," + Convert.toZeroStr(str_value) + ",";
////检查是否具备管理权限
if (strManager_bar.indexOf(relateValue)>=0 && !str_value.equals("0")) {
isBarManager = true;
}
i_list++;
str_value = Convert.toUnicode(rs.getString(i_list));
}
if (fieldInfor.getZDLB() == 2) {
key_field = str_field;
key_value = Convert.toZeroStr(str_value);
if (hasReadTable) {
hasRead = read.hasRead(Integer.parseInt(key_value), userInfor_session.getYGID());
}
}
//////////////是否已读
%>
<%
if (fieldInfor.getZDLB() == 1) {
i_list++;
%>
<td><% if(hasReadTable &&i_list==3 && !hasRead){ %><font color="red">[新]</font><%}%><%=str_value%></td>
<% } else if (fieldInfor.getZDLB() == 2){
i_list++;
%>
<td align="center">
<input type="checkbox" name="C_ID" value="<%=str_value%>">
</td>
<%
}
}
%>
<td><%=strState%></td>
<!--按纽-->
<td>
<a href="javascript:FunView(0,<%=key_value%>);">查看</a>
<% if (iState==2 && isManager) { %><a href="javaScript:goFormUrlConfirm(formList,'pigeonhole_control.jsp?WZID=<%=key_value%>&ACTION=GUIDANG','确定要取消归档?')">取消归档</a><% } %>
</td>
</tr>
<%
i++;
}
%>
<% if (0==i) { %>
<tr class="toptr3"><td colspan="20" align="center">没有任何数据! </td></tr>
<% } %>
</form>
</table>
<!-- 列表工具条下 2004-04-28 -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr class="toptr2">
<td>
<table width="100%" border=0 cellpadding=3 cellspacing=0 class="msglistcntrl" id="msglistcntrl">
<form name="form2" action="<%=strLink%>" method="post">
<tr>
<% if (isManager) {%>
<td><input type="button" name="del" value="" class="buttonDel" OnClick="javaScript:goFormUrlConfirm(formList,'pigeonhole_control.jsp?ACTION=DELETE','删除将不能恢复,是否继续?')"></td>
<% } %>
<td nowrap><%@ include file="/share/page/page_search.jsp"%></td>
<td align="right" nowrap><%@ include file="/share/page/page_bottom.jsp"%></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<script language="javascript">
//查看窗口
function FunView(BLID, WZID) {
var ww=window.screen.availwidth-120;
var hh=window.screen.availheight-120;
var url = "http://<%=strServer_session%>:<%=strPort_session%><%=rootPath_session%>/oa/document/transact/transact_detail.jsp?WZID="+WZID+"&BLID="+BLID;
viewWin = window.open(url ,"","left=50,top=50,scrollbars=yes,resizable=yes,status=no,full=yes,width="+ww+",height="+hh);
}
</script>
<%
}
catch(Exception e) {
System.out.println("异常="+e);
}
finally {
if (stmt != null) {
stmt.close();
}
if (dataConn != null) {
dataConn.close();
}
if (dataConn_read != null) {
dataConn_read.close();
}
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -