approveplanlist.jsp
来自「java jsp教程」· JSP 代码 · 共 218 行
JSP
218 行
<%@ 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.plan.vo.PerformTaskVO" %>
<%@ page import="com.icss.cnpc.util.Config" %>
<%
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
%>
<!--描述:显示当前登录人要审核计划的列表
调用:
ApprovePlanServlet1
传入参数PlanNo
接收:
PlanInfoList
显示控制:
1。根据计划状态,显示为起草审核(批)还是调 整审核(批)
校验:
对应Demo页面:plan_approve.html
-->
<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>
<HTML><HEAD><TITLE>审批计划</TITLE>
<style type="text/css">
<!--
.style1 {font-size: 16px}
.style2 {
font-size: 12px;
font-weight: bold;
}
-->
<%
List Planlist=(List)request.getAttribute("Planlist");
%>
</style>
<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 approvePlan(planno,state,taskno)
{
url="<%=request.getContextPath()%>/servlet/ApprovePlanServlet1?planno="+planno+"&state="+state+"&taskno="+taskno;
window.location.href=url;
}
</script>
<BODY text=#000000 leftMargin=0 background=../images/grid.gif topMargin=10>
<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=8 height=30><div align="center" class="style1">待 审 项 目 计 划</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><div align="center"><strong>计划编号</strong></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="9%" 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"><strong>操作</strong></TD>
</TR>
<%
if(Planlist!=null && Planlist.size()!=0)
{
int recordnum=0;
for(Iterator i = Planlist.iterator();i.hasNext();){
recordnum++;
PerformTaskVO planinfo = (PerformTaskVO)i.next();
String planNo=planinfo.getPlanno();
String planName=planinfo.getPlanname();
String tempplanname="";
if(planName !=null && planName.length()>14)
{
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();
System.out.println("被审单位数目--"+num);
String state=planinfo.getState();
String cnstate="";
String option="";
if(state!=null && state.equals(Config.PLAN_COMMIT))
{
cnstate="提交";
option="起草审核";
}
if(state!=null && state.equals(Config.PLAN_APPROVE1_PASS))
{
cnstate="审核通过";
option="起草审批";
}
if(state!=null && state.equals(Config.PLAN_ADJUST_COMMIT))
{
cnstate="调整提交";
option="调整审核";
}
if(state!=null && state.equals(Config.PLAN_ADJUST_APPROVE1_PASS))
{
cnstate="调整审核通过";
option="调整审批";
}
%>
<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){%>
<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"><a href="#" onClick="approvePlan('<%=planNo%>','<%=state%>','<%=planinfo.getTaskno()%>')"><%=option%></a></div></TD>
</TR>
<%}}%>
</TBODY>
</TABLE></TD>
</TR>
<p></p>
<TR>
<td colSpan=8 align=center>
<br>
<%@ include file="../.././include/defaultPageScrollBar.jsp" %>
</td>
</tr>
</TBODY>
</TABLE>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?