searchtrainingplan.jsp
来自「java jsp教程」· JSP 代码 · 共 424 行 · 第 1/2 页
JSP
424 行
<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表为ttriningplan表,b表为texorginfo,c表为ttrainingorg
StringBuffer param=new StringBuffer();
StringBuffer clause=new StringBuffer();
clause.append(" 1=1 ");
if(xPlanYear!=null && !xPlanYear.equals("9999"))//计划年度
clause.append(" AND to_char(A.BEGINDATE,'yyyy')='"+xPlanYear+"' ");
if(planName!=null && !planName.equals(""))//计划名称
clause.append(" AND A.TRAININGNAME like '%"+planName+"%' ");
if(xplanState!=null && !xplanState.equals(""))//计划状态
clause.append(" AND A.TRAININGSTATE='"+xplanState+"' ");
if(auditingOrgName!=null && !auditingOrgName.equals(""))//主办单位
clause.append(" AND A.TRAININGORG like '%"+auditingOrgName+"%' ");
if(undertakeorg!=null && !undertakeorg.equals(""))//承办单位
clause.append(" AND A.UNDERTAKEORG like '%"+undertakeorg+"%' ");
if(sjpxCode!=null && !sjpxCode.equals(""))//培训类型
clause.append(" AND A.TRAININGMODEID = '"+sjpxCode+"' ");
if(pxfsCode!=null && !pxfsCode.equals(""))//培训方式
clause.append(" AND A.TRAININGTYPE_ID = '"+pxfsCode+"' ");
if(xBegintime!=null && !xBegintime.equals(""))//开始时间
clause.append(" AND A.BEGINDATE>=TO_DATE('"+xBegintime+"','YYYY-MM-DD') ");
if(xEndtime!=null && !xEndtime.equals(""))//结束时间
clause.append(" AND A.BEGINDATE<=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="searchtrainingplan.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?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/SearchTrainingPlanServlet";
document.form1.submit();
}
function _clear()
{
document.form1.planYear.options[0].selected=true;
document.form1.planState.options[0].selected=true;
document.form1.auditingOrgName.value="";
document.form1.planName.value="";
document.form1.undertakeorg.value="";
document.form1.sjpx.value="";
document.form1.sjpxCode.value="";
document.form1.begintime.value="";
document.form1.endtime.value="";
document.form1.pxfs.value="";
document.form1.pxfsCode.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 + -
显示快捷键?