commonsearchplan.jsp

来自「java jsp教程」· JSP 代码 · 共 197 行

JSP
197
字号
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %>
<%@ page import="com.icss.cnpc.plan.vo.PlanInfo" %>
<%@ page import="com.icss.cnpc.util.*" %>


<%
    response.setHeader("Pragma", "No-cache");
    response.setHeader("Cache-Control", "no-cache");
    response.setDateHeader("Expires", 0);
%>
<%
	System.out.println("XXXXXXXXXXXXXX");
	List Planlist=(List)request.getAttribute("Planlist");
	String chosenYear = (String) request.getAttribute("chosenYear");
	Integer year = null;
	if (chosenYear != null) {
		year = new Integer(chosenYear);
	}
	
%>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/style.css">
<SCRIPT language=JavaScript src="<%=request.getContextPath()%>/common/common.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="<%=request.getContextPath()%>/common/calendar.js"></SCRIPT>
<script language="javascript">
function _ShowOrgList()
{
	url = "<%=request.getContextPath()%>/servlet/ShowOrgListServlet";
	window.open(url,"","toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,menubar=no,width=500,height=440,top=190,left=210");
}
function viewPlanInfo(planno)
{
	wx=600;
	wy=400;
	urlstr="<%=request.getContextPath()%>/servlet/ViewPlanInfoServlet?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);
}
function showunitinfo(auditedorgid)
{
	wx=800;
	wy=500;
	urlstr="<%=request.getContextPath()%>/servlet/ViewAuditedOrgInfoServlet?auditedorgid="+auditedorgid;
	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 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 _changeYear() {
	document.form1.action="<%=request.getContextPath()%>/servlet/CommonSearchPlanServlet";
	document.form1.submit();
	}
</script>
<html>
<head><title></title>
<style type="text/css">
<!--
.style1 {font-size: 16px}
.style2 {	font-size: 12px;
	font-weight: bold;
}
-->
</style>
</head>
<body background="<%=request.getContextPath()%>/images/grid.gif">
<form name="form1">
<TABLE cellSpacing=0 cellPadding=0 width="95%" align=center border=0>
  <TBODY>
    <TR>
      <TD align=middle><TABLE cellSpacing=1 borderColorDark=#dfdfff cellPadding=2 
            width="100%" align=center bgColor=#b3c4db borderColorLight=#003366 
            border=0>
          <TBODY>
            <TR bgcolor="#a6d0f2">
              <TD align=middle colSpan=7 height=30><div align="center" class="style1">
              <select name="planYear" onChange="_changeYear()">
					   		<option value="9999" >全部</option>
	               	    	<%= CommUtil.mkYearOptions(year) %>
               	       </select>
               年度待执行/执行中计划列表</div></TD>
            </TR>
            <TR onmouseover="this.bgColor='#EBEBEB';" onmouseout="this.bgColor='#EEF4FF';" bgColor=#eef4ff>
              <TD width="5%" align=middle><div align="center"><strong>序号</strong></div></TD>
              <TD width="15%" align=middle><span class="unnamed1"><strong>项目计划编号</strong></span></TD>
              <TD width="25%" height="25" align=middle><div align="center" class="style2">审计计划名称</div></TD>
              <TD width="22%" height="25" align=middle><div align="center" class="style2">被审计单位</div></TD>
              <TD width="12%" align=center><div align="center" class="style2">计划类别</div></TD>
              <TD width="12%" align=center><div align="center" class="style2">项目类别</div></TD>
              <TD width="" align=center><div align="center" class="style2">状态</div></TD>
            </TR>
            <%
            	
            	if(Planlist!=null && Planlist.size()!=0)
            	{
            		int recordnum=0;
            		for(Iterator i = Planlist.iterator();i.hasNext();){
            			recordnum++;
        					PlanInfo planinfo = (PlanInfo)i.next();
        					String planNo=planinfo.getPlanno();
        					String planName=planinfo.getPlanname();
        					String tempplanname="";
        					if(planName !=null && planName.length()>12)
        					{
        						tempplanname=planName.substring(0,12);
        						tempplanname+="..";
        					}
        					else if(planName !=null)
        						tempplanname=planName;
        					String auditedorgid=planinfo.getAuditedorgcode();
        					String auditedorgname=planinfo.getAuditedorgname();        					
        					String tempauditedname="";
        					if(auditedorgname !=null && auditedorgname.length()>6)
        					{
        						tempauditedname=auditedorgname.substring(0,6);
        						tempauditedname+="..";
        					}
        					else if(auditedorgname !=null)
        						tempauditedname=auditedorgname;
        					String plantype=planinfo.getPlantypename();
        					String tempplantype="";
        					if(plantype !=null && plantype.length()>5)
        					{
        						tempplantype=plantype.substring(0,5);
        						tempplantype+="..";
        					}
        					else if(plantype !=null)
        						tempplantype=plantype;
        					String protype=planinfo.getProjecttypename();
        					String tempprotype="";
        					if(protype !=null && protype.length()>5)
        					{
        						tempprotype=protype.substring(0,5);
        						tempprotype+="..";
        					}
        					else if(protype !=null)
        						tempprotype=protype;
        					
        					
        					Integer count=planinfo.getAuditedorgcount();
        					int num=0;
        					String others="";
        					if(count!=null)
        						num=count.intValue();
        					String state=planinfo.getState();
        					String cnstate="";
        					if(state.equals(Config.PLAN_APPROVE2_PASS))
        						cnstate="待执行";
        					if(state.equals(Config.PLAN_PERFORM))
        						cnstate="执行中";
            %>
            <TR onmouseover="this.bgColor='#EBEBEB';" onmouseout="this.bgColor='#EEF4FF';" bgColor=#eef4ff>
              <TD align=middle><div align="center"><%=recordnum%></div></TD>
              <TD align=middle><%=planNo%></TD>
              <TD  height="25" align=middle><div align="center">
              			 <a href="#" title="<%=planName%>" onClick="viewPlanInfo('<%=planNo%>')"><%=tempplanname%></a> </div>
              </TD>
              <TD align=<%if(num>1){%>right<%}else{%>center<%}%>>
              		 <a href="#" title="<%=auditedorgname%>" onClick="showunitinfo('<%=auditedorgid%>')" >
              		 <%=tempauditedname%></a><%if(num>1){%>&nbsp;&nbsp;
              		 <a href='#' onClick="ShowAllAudited('<%=planNo%>')"><font title="更多被审单位">[更多..]</font><%}%>
		   	  </td>
              <TD  align=center><div align="center"><font title="<%=plantype%>"><%=tempplantype%></font></div></TD>
              <TD  align=center><div align="center"><font title="<%=protype%>"><%=tempprotype%></font></div></TD>
              <TD " align=center><div align="center"><%=cnstate%></div></TD>
            </TR>
            <%}}%>
          </TBODY>
      </TABLE>
      </TD>
    </TR>
    <TR>
      <td colSpan=8 align=center>
    		<%@ include file="../.././include/defaultPageScrollBar.jsp" %>
      </td>
    </tr>
  </TBODY>
</TABLE>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?