searchfeedback.jsp
来自「java jsp教程」· JSP 代码 · 共 340 行
JSP
340 行
<!-- edit by lyf-->
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.icss.cnpc.util.*" %>
<%@ page import="com.icss.cnpc.plan.vo.*" %>
<%@ 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="";
%>
<HTML><HEAD><TITLE>计划信息查询</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%=root%>/css/style.css">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<style type="text/css">
<!--
.style5 {font-size: 16px; font-weight: bold; }
.style1 {font-size: 16px}
.style2 { font-size: 12px;
font-weight: bold;
}
-->
</style>
</HEAD>
<script type="text/javascript" src="<%=root%>/common/codeDict.js"></script>
<SCRIPT language="JavaScript" src="<%=root%>/common/common.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="<%=root%>/common/calendar.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">
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>
<BODY text=#000000 leftMargin=0 background=<%=root%>/images/grid.gif
topMargin=10 >
<form name="form1" method="post" >
<input type="hidden" name="search" value="search">
<input type="hidden" name="cata">
<table width="810" border="0" cellspacing="1" cellpadding="0" 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="92" height="10" align="left"><div align="right">姓名:</div></td>
<TD width="163" height="25" bgcolor="#a6d0f2">
<div align="left">
<%
String name = request.getParameter("name");
if (name==null) {
name = "";
}
%>
<input name="name" type="text" value="<%=name%>" id="name" style="background:white" size="20" class="inp1" >
</div></TD>
<TD width="84" bgcolor="#a6d0f2"><div align="right">培训班编号:</div></TD>
<TD width="169" bgcolor="#a6d0f2"><div align="left">
<%
String trainingno = request.getParameter("trainingno");
if (trainingno==null) {
trainingno = "";
}
%>
<input name="trainingno" type="text" class="inp1" id="trainingno" style="background:white" value="<%=trainingno%>" size="20" maxlength="32" >
</div></TD>
<TD width="100"><div align="right">培训班名称:</div></TD>
<TD width="195" bgcolor="#a6d0f2"><div align="left">
<% String trname = request.getParameter("trname");
if (trname == null) {
trname = "";
}
%>
<input name="trname" type="text" value="<%=trname%>" id="planName" style="background:white" size="20" class="inp1" >
</div>
</TD>
</tr>
<tr bgcolor="#a6d0f2">
<%
String xBegintime = request.getParameter("begintime");
if (xBegintime == null) {
xBegintime = "";
}
String xEndtime = request.getParameter("endtime");
if (xEndtime == null) {
xEndtime="";
}
%>
<td align="center" ><div align="right">开始时间 从:</div></td>
<td bgcolor="#a6d0f2" ><div align="left">
<input name="begintime" type="text" size="20" readonly style="background:white" class="inp1" value="<%=xBegintime%>">
<img src="<%=root%>/images/calendar.gif" style="cursor:hand;" width="18" height="18" border=0 align="absmiddle" alt="弹出日历下拉菜单" onClick="popUpCalendarDlg(begintime)">
</div></td>
<td bgcolor="#a6d0f2" ><div align="right">至:</div></td>
<td bgcolor="#a6d0f2" ><div align="left">
<input name="endtime" type="text" size="20" readonly style="background:white" class="inp1" value="<%=xEndtime%>">
<img src="<%=root%>/images/calendar.gif" style="cursor:hand;" width="18" height="18" border=0 align="absmiddle" alt="弹出日历下拉菜单" onClick="popUpCalendarDlg(endtime)">
</div></td>
<td ><div align="right">培训班制定单位:</div></td>
<td >
<%
String xAuditingOrgCode = request.getParameter("auditingOrgId");
if (xAuditingOrgCode == null) {
xAuditingOrgCode = "";
}
String xAuditingOrgName = request.getParameter("auditingOrgName1");
if (xAuditingOrgName == null) {
xAuditingOrgName="";
}
%>
<input type="hidden" name="auditingOrgId" value="<%=xAuditingOrgCode%>">
<input type="text" name="auditingOrgName1" 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()">
</td>
</tr>
</table>
<div align="center"><br>
<img src="<%=root%>/images/search.gif" name="Submit" style="cursor:hand;" alt="查 询" class="bt1" onClick="_search()">
<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");
//System.out.println("defaultorgclause=="+defaultorgclause);
//A表为TTRAININGFEEDBACK表,b表为ttrainingplan,c表为texorginfo
StringBuffer param=new StringBuffer();
StringBuffer clause=new StringBuffer();
clause.append(" 1=1 ");
if(name!=null && !name.equals(""))//姓名
clause.append(" AND A.TRAININGPERSONNAME like '%"+name+"%' ");
if(trainingno!=null && !trainingno.equals(""))//培训班编号
clause.append(" AND A.TRAININGNO like '%"+trainingno+"%' ");
if(trname!=null && !trname.equals(""))//培训班名称
clause.append(" AND A.TRAININGNAME like '%"+trname+"%' ");
if(xBegintime!=null && !xBegintime.equals(""))//开始时间
clause.append(" AND A.FEEDBACKDATE>=TO_DATE('"+xBegintime+"','YYYY-MM-DD') ");
if(xEndtime!=null && !xEndtime.equals(""))//结束时间
clause.append(" AND A.FEEDBACKDATE<=TO_DATE('"+xEndtime+"','YYYY-MM-DD') ");
//范围
if(defaultorgclause!=null && !defaultorgclause.equals(""))
clause.append(defaultorgclause);
param.append("clause=\""+clause.toString()+"\";");
System.out.println("报表查询的条件为:"+param.toString());
%>
<TD align=middle width="100%" >
<report:html name="report1" reportFileName="searchfeedback.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>
<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("<%=request.getContextPath()%>/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 selectUnit()
{
wx=200;
wy=200;
urlstr="<%=request.getContextPath()%>/jsp/advancesearch/auditedtree.jsp?nameField=auditedOrgName&idField=auditedOrgCode";
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=no"+wposition);
}
function selectAuditingUnit() {
wx=200;
wy=200;
urlstr="<%=request.getContextPath()%>/jsp/advancesearch/auditingtree.jsp?type=1&nameField=auditingOrgName1&idField=auditingOrgId";
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 _search() {
if ( Compare_Date(document.form1.begintime.value,document.form1.endtime.value) ) {
alert("开始时间要小于结束时间");
return;
}
document.form1.action = "<%=root%>/servlet/SearchFeedbackServlet";
document.form1.submit();
}
function _clear()
{
document.form1.name.value="";
document.form1.trainingno.value="";
document.form1.trname.value="";
document.form1.begintime.value="";
document.form1.endtime.value="";
document.form1.auditingOrgId.value="";
document.form1.auditingOrgName1.value="";
}
function viewPlanInfo(planno)
{
wx=600;
wy=400;
x=(window.screen.width-wx)/2;
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
urlstr="<%=request.getContextPath()%>/servlet/ViewPlanInfoServlet?planno=" + planno;//计划信息
window.open(urlstr,"查看计划信息","width="+wx+",height="+wy+",scrollbars=yes,status=no"+wposition);
}
function ShowAllAudited(planno)
{
wx=600;
wy=400;
urlstr="<%=request.getContextPath()%>/servlet/GetAllAuditedListOfPlanServlet?planno="+planno;
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=no"+wposition);
// showx = event.screenX - 250; // + deltaX;
// showy = event.screenY ; // + deltaY;
// retval = window.showModalDialog("<%=request.getContextPath()%>/servlet/GetAllAuditedListOfPlanServlet?planno="+planno, "计划的所有被审单位", "dialogWidth:250px; dialogHeight:250px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scroll:auto;Resizable:yes; " );
}
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 showDiv(divId) {
drag(eval(divId));
var x = event.clientX;
var y = event.clientY;
eval("document.all." + divId).style.posLeft=x-180;
eval("document.all." + divId).style.posTop=y;
eval("document.all." + divId).style.visibility="visible";
document.getElementById(divId).style.display="block";
}
function openPlanBasicInfo(trainingno){
wx=600;
wy=400;
urlstr= "<%=request.getContextPath()%>/servlet/TrainingPlan_ViewPlanInfoServlet?trainingno=" + trainingno;
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=no"+wposition);
}
</SCRIPT>
</BODY></HTML>
<div id=pxfsdiv 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=pxfs&codeField=pxfsCode&nameField=pxfs&divId=pxfsdiv");
document.write(tree);
</script>
</td>
</tr>
</table>
</div>
<div id=sjpxdiv 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=sjpx&codeField=sjpxCode&nameField=sjpx&divId=sjpxdiv");
document.write(tree);
</script>
</td>
</tr>
</table>
</div>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?