searchperson.jsp
来自「java jsp教程」· JSP 代码 · 共 308 行
JSP
308 行
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %>
<%@ page import="java.sql.Timestamp" %>
<%@ page import="com.icss.cnpc.plan.vo.PlanInfo" %>
<%@ page import="com.icss.cnpc.plan.vo.PerformTaskVO" %>
<%@ page import="com.icss.cnpc.advancesearch.vo.RoPersonVO" %>
<%@ taglib uri="/WEB-INF/runqianReport.tld" prefix="report"%>
<%@ page session="true" import="java.lang.StringBuffer,com.runqian.report.usermodel.*"%>
<%@ page import="com.icss.cnpc.util.Config" %>
<%
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
%>
<%
String root = request.getContextPath();
String search=request.getParameter("search");
if(search==null)
search="";
%>
<script type="text/javascript" src="<%=root%>/common/codeDict.js"></script>
<script type="text/javascript" src="<%=root%>/common/xtree.js"></script>
<script type="text/javascript" src="<%=root%>/common/xmlextras.js"></script>
<script type="text/javascript" src="<%=root%>/common/xloadtree.js"></script>
<script type="text/javascript" src="<%=root%>/common/common.js"></script>
<script type="text/javascript">
webFXTreeConfig.rootIcon = "<%=root%>/images/xp/folder.png";
webFXTreeConfig.openRootIcon = "<%=root%>/images/xp/openfolder.png";
webFXTreeConfig.folderIcon = "<%=root%>/images/xp/folder.png";
webFXTreeConfig.openFolderIcon= "<%=root%>/images/xp/openfolder.png";
webFXTreeConfig.fileIcon = "<%=root%>/images/xp/file.png";
webFXTreeConfig.lMinusIcon = "<%=root%>/images/xp/Lminus.png";
webFXTreeConfig.lPlusIcon = "<%=root%>/images/xp/Lplus.png";
webFXTreeConfig.tMinusIcon = "<%=root%>/images/xp/Tminus.png";
webFXTreeConfig.tPlusIcon = "<%=root%>/images/xp/Tplus.png";
webFXTreeConfig.iIcon = "<%=root%>/images/xp/I.png";
webFXTreeConfig.lIcon = "<%=root%>/images/xp/L.png";
webFXTreeConfig.tIcon = "<%=root%>/images/xp/T.png";
webFXTreeConfig.blankIcon = "<%=root%>/images/xp/blank.png";
</script>
<HTML><HEAD><TITLE>无标题文档</TITLE>
</HEAD>
<LINK href="<%=request.getContextPath()%>/css/style.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript>
function popUpCalendarDlg(ctrlobj) {
showx = event.screenX - event.offsetX - 4 - 210 ; // + deltaX;
showy = event.screenY - event.offsetY + 18; // + deltaY;
newWINwidth = 210 + 4 + 18;
retval = window.showModalDialog("<%=root%>/include/date.htm", "", "dialogWidth:220px; dialogHeight:220px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scroll:no;Resizable:no; " );
if( retval != null ){
ctrlobj.value = retval;
}
}
function selectAuditingUnit() {
wx=200;
wy=200;
urlstr="<%=request.getContextPath()%>/jsp/advancesearch/orgtree.jsp";
x=(window.screen.width-wx)/2;
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
window.open(urlstr,"选择单位","width="+wx+",height="+wy+",scrollbars=yes,status=yes"+wposition);
}
function showDiv(divId) {
drag(eval(divId));
var x = event.clientX;
var y = event.clientY;
eval("document.all." + divId).style.posLeft=x-178;
eval("document.all." + divId).style.posTop=y-2;
eval("document.all." + divId).style.visibility="visible";
document.getElementById(divId).style.display="block";
}
function fillCode(codeField, nameField, codeDiv, code, name)
{
name=name.substring(name.lastIndexOf("-")+1);
eval("document.form1." + codeField ).value =code;
eval("document.form1." + nameField ).value =name;
document.getElementById(codeDiv).style.display="none";
}
function _clear()
{
document.form1.pname.value = "";
document.form1.isauditor.options[0].selected = true;
document.form1.pcode.options[0].selected = true;
document.form1.ryxx002Code.value = "";
document.form1.ryxx002.value = "";
document.form1.auditingOrgName.value = "";
document.form1.auditingOrgId.value = "";
document.form1.ryxx001.value = "";
document.form1.ryxx001Code.value = "";
}
function showPersonInfo(puuid)
{
wx=700;
wy=400;
urlstr="<%=request.getContextPath()%>/servlet/ShowPersonViewInfoServlet?curPersonUuid="+puuid;
x=(window.screen.width-wx)/2;
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
window.open(urlstr,"选择单位","width="+wx+",height="+wy+",scrollbars=yes,status=yes"+wposition);
}
</SCRIPT>
<BODY text=#000000 leftMargin=0 background=<%=root%>/images/grid.gif
topMargin=10>
<form name="form1" action="<%=request.getContextPath()%>/servlet/SearchPersonServlet">
<input type="hidden" name="option" value="search">
<input type="hidden" name="search" value="search">
<TR>
</td>
</tr>
</TBODY>
</TABLE>
<table width=98% border="0" cellspacing="1" cellpadding="4" bgcolor="#426199" align=center>
<TR bgcolor="#a6d0f2">
<TD colspan="6" height=30 align=middle>
<div align="center" size="6">
<font size="2" color="red">人员花名册 </font>查询条件</font>
</div>
</TD>
</TR>
<tr bgcolor="#a6d0f2">
<td width="124" height="10" align="left"><div align="right">姓名:</div></td>
<% String pname = request.getParameter("pname");
if (pname == null) {
pname = "";
}
%>
<TD width="176" height="25" bgcolor="#a6d0f2"><div align="left">
<input class="inp1" value="<%=pname%>" name="pname" type="text" id="projectname" style="background:white" size="20">
</div></TD>
<TD width="87" bgcolor="#a6d0f2"><div align="right">是否审计:</div></TD>
<% String isauditor = request.getParameter("isauditor");
if (isauditor == null) {
isauditor = "";
}
%>
<TD width="180" bgcolor="#a6d0f2"><div align="left">
<select name="isauditor" style="width:135">
<option value="" <%if(isauditor.equals("")){%>selected<%}%>></option>
<option value="1" <%if(isauditor.equals("1")){%>selected<%}%>>审计</option>
<option value="0" <%if(isauditor.equals("0")){%>selected<%}%>>非审计</option>
</select>
</div></TD>
<%
String ryxx002 = request.getParameter("ryxx002");
if (ryxx002==null) {
ryxx002="";
}
String ryxx002Code = request.getParameter("ryxx002Code");
if (ryxx002Code==null) {
ryxx002Code = "";
}
%>
<TD width="100"><div align="right">技术职称:</div></TD>
<td width="180"><input name="ryxx002" type="text" class="txt1" value="<%=ryxx002%>" readonly >
<input name="ryxx002Code" type="hidden" class="txt1" value="<%=ryxx002Code%>" readonly >
<img src="<%=root%>/images/fuction.gif" width="20" height="15" style="cursor:hand;" onClick="showDiv('ryxx002div')"></td>
</tr>
<tr bgcolor="#a6d0f2">
<td height="20" align="left"><div align="right">填报单位:</div></td>
<%
String xAuditingOrgCode = request.getParameter("auditingOrgId");
if (xAuditingOrgCode==null) {
xAuditingOrgCode="";
}
String xAuditingOrgName = request.getParameter("auditingOrgName");
if (xAuditingOrgName==null) {
xAuditingOrgName = "";
}
%>
<td bgcolor="#a6d0f2" >
<div align="left">
<input type="hidden" name="auditingOrgId" value="<%=xAuditingOrgCode%>">
<input type="text" name="auditingOrgName" value="<%=xAuditingOrgName%>" size="20" readonly>
<img src="<%=root%>/images/icon-15.gif" alt="选择单位" name="unit" width="22" height="15" class="bt1" style="cursor:hand;" onClick="selectAuditingUnit()"> </div>
</td>
<td bgcolor="#a6d0f2" ><div align="right">政治面貌:</div></td>
<% String pcode = request.getParameter("pcode");
if (pcode == null) {
pcode = "";
}
%>
<td bgcolor="#a6d0f2" ><select name="pcode" style="width:135">
<option value="" <%if(pcode.equals("")){%>selected<%}%>></option>
<option value="0" <%if(pcode.equals("0")){%>selected<%}%>>中共党员</option>
<option value="1" <%if(pcode.equals("1")){%>selected<%}%>>共青团员</option>
<option value="2" <%if(pcode.equals("2")){%>selected<%}%>>群众</option>
<option value="3" <%if(pcode.equals("3")){%>selected<%}%>>预备党员</option>
<option value="4" <%if(pcode.equals("4")){%>selected<%}%>>民建会员</option>
<option value="5" <%if(pcode.equals("5")){%>selected<%}%>>民进会员</option>
</select>
</td>
<td bgcolor="#a6d0f2" ><div align="right">学历:</div></td>
<%
String ryxx001 = request.getParameter("ryxx001");
if (ryxx001 == null) {
ryxx001 = "";
}
String ryxx001Code = request.getParameter("ryxx001Code");
if (ryxx001Code == null) {
ryxx001Code="";
}
%>
<td><input name="ryxx001" type="text" class="txt1" value="<%=ryxx001%>" readonly >
<input name="ryxx001Code" type="hidden" class="txt1" value="<%=ryxx001Code%>" readonly >
<img src="<%=root%>/images/fuction.gif" width="20" height="15" style="cursor:hand;" onClick="showDiv('ryxx001div')">
</td>
</tr>
</table>
<div align="center"><br>
<img src="<%=root%>/images/search.gif" name="search111" style="cursor:hand;" alt="查 询" class="bt1" onClick="submit()" >
<img src="<%=root%>/images/chzh.gif" name="Clear" style="cursor:hand;" alt="清空查询条件" class="bt1" onclick="_clear()" >
</div>
</form>
<TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0>
<TBODY>
<TR>
<%if(search.equals("search")){%>
<%
String defaultorgclause=(String)request.getAttribute("defaultorgclause");
//A表为ro_person表,B表为tperson,C表为RO_ORGPERSON,D表为TEXORGINFO
StringBuffer param=new StringBuffer();
StringBuffer clause=new StringBuffer();
clause.append(" 1=1 ");
if(pname!=null && !pname.equals(""))//姓名
clause.append(" and A.CNNAME like '%"+pname+"%' ");
if(isauditor!=null && !isauditor.equals(""))//是否审计
clause.append(" and b.isauditor='"+isauditor+"' ");
if(ryxx002Code!=null && !ryxx002Code.equals(""))//技术职称
clause.append(" and B.TECH_POSTCODE='"+ryxx002Code+"' ");
if(ryxx001Code!=null && !ryxx001Code.equals(""))//学历
clause.append(" and b.STUDY_EXPCODE='"+ryxx001Code+"' ");
if(pcode!=null && !pcode.equals(""))//政治面貌
clause.append(" and a.pcode='"+pcode+"' ");
if(defaultorgclause!=null && !defaultorgclause.equals(""))
clause.append(defaultorgclause);
System.out.println("查询条件=="+clause.toString());
param.append("clause=\""+clause.toString()+"\";");
%>
<TD align=middle width="100%" >
<report:html name="report1" reportFileName="searchperson.raq"
width="810"
height="600"
funcBarLocation="bottom"
needPageMark="yes"
separator=" "
needSaveAsExcel="yes"
needSaveAsPdf="no"
needPrint="no"
firstPageLabel="第一页"
prevPageLabel="上一页"
nextPageLabel="下一页"
lastPageLabel="最后页"
pageMarkLabel="第{currpage}页/共{totalPage}页"
printLabel="打印"
generateParamForm="no"
displayNoLinkPageMark="yes"
canModifyBeforePrint="yes"
params="<%=param.toString()%>"
submit="提交到服务器"
needOfflineInput="yes"
needImportExcel="yes"
excelPageStyle="0"
importExcelLabel="导入excel"
/><%}%>
</TD>
</TR>
</TBODY>
</TABLE>
<div id="ryxx001div" style="position:absolute;display:none; left:250px; top:177px; width:180px; z-index:901; height: 150px;" onmouseover="this.style.display='block'" onMouseOut="this.style.display='none'">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#EEFFF7">
<td height="150" valign="top">
<script>
var tree = new WebFXLoadTree("学历", "<%=request.getContextPath()%>/servlet/TcodeXmlTreeServlet?code=ryxx001&codeField=ryxx001Code&nameField=ryxx001&divId=ryxx001div");
document.write(tree);
</script>
</td>
</tr>
</table>
</div>
<div id="ryxx002div" style="position:absolute;display:none; left:250px; top:177px; width:180px; z-index:901; height: 150px;" onmouseover="this.style.display='block'" onMouseOut="this.style.display='none'">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#EEFFF7">
<td height="150" valign="top">
<script>
var tree = new WebFXLoadTree("职称", "<%=request.getContextPath()%>/servlet/TcodeXmlTreeServlet?code=ryxx002&codeField=ryxx002Code&nameField=ryxx002&divId=ryxx002div");
document.write(tree);
</script>
</td>
</tr>
</table>
</div>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?