Project_Modify.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:17k
源码类别:
电子政务应用
开发平台:
Java
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_workflow.tld" prefix="vnex_workflow" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.util.*" %>
- <%@ page import="com.vnex.intranet.util.*" %>
- <%@ page import="com.vnex.intranet.system.loader.*"%>
- <%@ page import="com.vnex.intranet.upload.*"%>
- <%@ page import="com.vnex.intranet.workflow.pub.value.*"%>
- <%@ page import="com.vnex.intranet.workflow.util.*"%>
- <%@ page import="com.vnex.intranet.workflow.projectmanagement.value.PmValueBean"%>
- <%@ page import="com.vnex.intranet.workflow.loader.WorkflowLoader" %>
- <jsp:useBean id="mySmartUpload" scope="page" class="com.vnex.intranet.upload.SmartUpload" />
- <jsp:useBean id="pvb" scope="session" class="com.vnex.intranet.workflow.projectmanagement.value.PmValueBean"/>
- <jsp:useBean id="routeValueBean" scope="page" class="com.vnex.intranet.workflow.pub.value.RouteValueBean"/>
- <jsp:useBean id="pmProxy" scope="application" class="com.vnex.intranet.workflow.projectmanagement.proxy.PmProxyBean" />
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <%
- // this attribute used by FileAttributeTag to change encode of chinese file name to view.
- pageContext.setAttribute("encodeFlag" , "false");
- String current = new java.sql.Date(System.currentTimeMillis()).toString();
- if( request.getParameter("type") == null && request.getParameter("comeback") == null )
- {
- pvb = pmProxy.getProjectDetail(Integer.parseInt(request.getParameter("workflowId")));
- session.setAttribute("pvb",pvb);
- }
- pvb = ( PmValueBean )session.getAttribute( "pvb" );
- int workflowId = pvb.getWorkflowId();
- routeValueBean = pvb.getRoute();
- ArrayList subtasks = routeValueBean.getSubtaskList();
- %>
- <%@ include file= "project_create_upload.jsp" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
- <script language="JavaScript" src="/vnex/util/validate.js"></script>
- <script language="JavaScript" src="/vnex/intranet/workflow/util/checkRoute.js"></script>
- <script language=JavaScript>
- function checkIt(form)
- {
- if ( !stripWhitespace(form.title.value) || isEmpty(form.title.value) )
- {
- alert("请输入项目标题");
- return false;
- }
- if(form.title.value.length>100)
- {
- alert("项目标题过长,最多100字");
- return false;
- }
- if(form.description.value.length>500)
- {
- alert("项目描述过长,最多500字");
- return false;
- }
- if( !isEmpty(form.planBeginDateS.value) )
- {
- if(!isVNEXDate(form.planBeginDateS.value))
- {
- alert("计划开始日期非法");
- return false;
- }
- if( "<%=current%>" > form.planBeginDateS.value)
- {
- alert("计划开始日期必须在本日之后");
- return false;
- }
- }
- if( !isEmpty(form.planEndDateS.value) )
- {
- if(!isVNEXDate(form.planEndDateS.value))
- {
- alert("计划结束日期非法");
- return false;
- }
- if("<%=current%>" > form.planEndDateS.value)
- {
- alert("计划结束日期必须在本日之后");
- return false;
- }
- }
- if( !isEmpty(form.planEndDateS.value) && !isEmpty(form.planBeginDateS.value) )
- {
- if(form.planBeginDateS.value > form.planEndDateS.value)
- {
- alert("计划结束日期必须在计划开始日期之后");
- return false;
- }
- }
- if( !checkSequence( form.stepNos ) )
- {
- return false;
- }
- return true;
- }
- function modifyProjectSuccess(form, type)
- {
- if(checkIt(form))
- {
- checkAll( document.forms[0].attachments );
- form.action="/mainctrl/projectmanagement/modifyprojectsuccess?type=" + type;
- form.submit();
- }
- }
- function saveTemplate(form)
- {
- if(checkIt(form))
- {
- form.action="/mainctrl/projectmanagement/createtemplate";
- form.submit();
- }
- }
- function deleteProject(form)
- {
- if( confirm( "确定要删除该项目?" ) )
- {
- form.action="/mainctrl/projectmanagement/deleteproject";
- form.submit();
- }
- }
- function startProject(form)
- {
- form.action="/mainctrl/projectmanagement/startproject";
- form.submit();
- }
- function uploadDoc(form)
- {
- form.action="/mainctrl/projectmanagement/modifyproject?type=1";
- form.encoding="multipart/form-data";
- form.submit();
- }
- function deleteDoc(form)
- {
- form.action="/mainctrl/projectmanagement/modifyproject?type=2";
- form.submit();
- }
- function checkAll( selObj )
- {
- for ( var i = 0; i < selObj.options.length; i++ )
- selObj.options[i].selected = true;
- }
- function SelectAll(form)
- {
- for (var i=0;i<form.elements.length;i++)
- {
- var e = form.elements[i];
- if (e.name != 'C1')
- e.checked = form.C1.checked;
- }
- }
- function openTemplateWin()
- {
- window.open("/mainctrl/projectmanagement/createtemplate","win","titlebar=no,toolbar=no,Width=700,height=300");
- }
- function submitForm(act)
- {
- myform = document.forms[0];
- var subtaskId = myform.subtaskList.value;
- if ( act == 'addBefore' )
- {
- if ( !checkSelected() ) return false;
- if ( ! noMultiSelect() ) return false;
- myform.action= '/mainctrl/projectmanagement/addsubtask?workflowId=<%=workflowId%>&flag=addBeforeSubtask&subtaskId='+subtaskId;
- myform.submit();
- }
- if ( act == 'addAfter' )
- {
- if ( !checkSelected() ) return false;
- if ( ! noMultiSelect() ) return false;
- myform.action= '/mainctrl/projectmanagement/addsubtask?workflowId=<%=workflowId%>&flag=addAfterSubtask&subtaskId='+subtaskId;
- myform.submit();
- }
- if ( act == 'Edit' )
- {
- if ( !checkSelected() ) return false;
- if ( ! noMultiSelect() ) return false;
- myform.action= '/mainctrl/projectmanagement/updatesubtask?workflowId=<%=workflowId%>&flag=updateSubtask&subtaskId='+subtaskId;
- myform.submit();
- }
- if ( act == 'Delete' )
- {
- if ( !checkSelected() ) return false;
- if ( !onlyOne() ) return false;
- myform.action= '/mainctrl/projectmanagement/sortsubtask?workflowId=<%=workflowId%>&flag=deleteSubtask&subtaskId='+subtaskId;
- myform.submit();
- }
- if( act == 'sort' )
- {
- selectAll(myform.subtaskList);
- if ( myform.subtaskList.value == '' )
- {
- alert('无子任务!');
- return false;
- }
- if ( !onlyOne() ) return false;
- myform.action="/mainctrl/projectmanagement/sortsubtask?workflowId=<%=workflowId%>&flag=sortSubtask";
- myform.submit();
- }
- }
- function addSub( form )
- {
- form.action="/mainctrl/projectmanagement/subtaskcreate?flag=docModify";
- form.submit();
- }
- function deleteSub( myform )
- {
- if ( !myform.subId )
- {
- alert('没有要删除的子任务!');
- return false;
- }
- if ( !isChecked( myform.subId ) )
- {
- alert('请选择要删除的任务!');
- return false;
- }
- if( confirm( "确定要删除选择的子任务?" ) )
- {
- myform.action="/mainctrl/projectmanagement/subtaskdelete?flag=docModify";
- myform.submit();
- }
- }
- function modifySubtask(form,id)
- {
- form.action="/mainctrl/projectmanagement/subtaskmodify?subtaskId="+id+"&isDocCreate=docModify&flag=docModify";
- form.submit();
- }
- </script>
- <DIV align=center>
- <form name="myform" method="post" >
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center">
- <br><!--个人信息开始 -->
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr bgcolor="#fafafa">
- <td bgcolor="#fafafa">
- <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td colspan="2" height="15" bgcolor="#666666"> <font class="strongw"><a href="/mainctrl/system/main"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>>><a href="/mainctrl/projectmanagement/projectlist"><font color="#FFFFFF">工程项目管理</font></a>>><font color="#FFFFFF">修改项目内容</font>
- </font></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="100"> <font class="strong" > 项目名称:</font> </td>
- <td width="456">
- <input type="hidden" name="workflowId" value= "<%= pvb.getWorkflowId() %>">
- <input type="text" name="title" value="<%= FieldUtil.filterQuotTag(FieldUtil.filterScriptTag(pvb.getTitle())) %>" class="file">
- *(注:带*的为必填内容)</td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"><font class="strong"> 计划开始时间:</font></td>
- <td width="456">
- <input type="text" name="planBeginDateS" readonly size="24" class="file" value="<%= pvb.getPlanBeginDateS() %>">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(planBeginDateS);return false">
- </td>
- </tr>
- <tr>
- <td width="100" bgcolor="#e0e0e0"> <font class="strong"> 计划结束时间:</font>
- </td>
- <td width="456" bgcolor="#e0e0e0">
- <input type="text" name="planEndDateS" readonly size="24" class="file" value="<%= pvb.getPlanEndDateS() %>">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(planEndDateS);return false">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="100"><font class="strong"> 项目描述:</font></td>
- <td width="456">
- <textarea name="description" cols="59" rows="5"><%= FieldUtil.filterQuotTag(FieldUtil.filterScriptTag(pvb.getDescription())) %></textarea>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td rowspan="2"><font class="strong"> 上传附件:</font></td>
- <td rowspan="2">
- <select name="attachments" size="6" multiple style="width:350">
- <vnex_workflow:fileList collection="<%=pvb.getFiles()%>">
- <vnex:items>
- <option value = "<vnex_workflow:fileAttribute attribute="workflowfile_title"/>">
- <vnex_workflow:fileAttribute attribute="workflowfile_name"/></option>
- </vnex:items>
- </vnex_workflow:fileList>
- </select>
- <input type="button" name="Button22" value="删除" onClick="deleteDoc( this.form )" class="file">
- <input type="file" name="file" class="file" size="24">
- <input type="button" name="Submit22" value="上传" class="file" onClick="uploadDoc(this.form)">
- </td>
- </tr>
- <tr bgcolor="#fafafa"> </tr>
- <!-- 6-28 modify begin -->
- <tr bgcolor="#fafafa">
- <td colspan =3 > <font class="strong"> 项目执行路径</font></td>
- </tr>
- </table>
- <table border="0" cellspacing="1" cellpadding="2" class=title width="600">
- <tr class="table_row_title" >
- <td height="30" colspan="6" bgcolor="#fafafa">
- <input type="button" name="Submit3" style="width:70px" value="新建子任务" class="file" onClick="addSub( this.form )" >
- <input type="button" name="Submit23" value="删除" class="file" onClick="deleteSub( this.form )" >
- </td>
- </tr>
- <tr class="table_row_title" bgcolor="#e0e0e0">
- <td align="center" width="42"><font class="strong"></font></td>
- <td width="85" align="center" nowrap><font class="strong">顺序</font></td>
- <td width="167" align="center" nowrap><font class="strong">子任务名称</font></td>
- <td width="87" align="center" nowrap><font class="strong">执行者</font></td>
- <td width="59" align="center" nowrap><font class="strong">类型</font></td>
- <td width="147" align="center" nowrap><font class="strong">截止时间</font></td>
- </tr>
- <%
- for( int i = 0; i < subtasks.size(); i++ )
- {
- SubTaskValueBean sub = ( SubTaskValueBean )subtasks.get(i);
- if( i%2 == 0)
- {
- %>
- <tr bgcolor="#fafafa" align="center">
- <%}else{
- %>
- <tr bgcolor="#e0e0e0" align="center">
- <%}
- %>
- <td align="center" width="42">
- <input type="checkbox" name="subId" value="<%=sub.getSubtaskId() %>">
- </td>
- <td width="103" align="center">
- <select name="stepNos">
- <% for( int j = 0; j < subtasks.size(); j++)
- {
- %>
- <option value="<%=j+1%>"
- <%if( sub.getSubStepNo() == j+1 ) {%>
- selected
- <%}%>
- ><%=j+1%></option>
- <%
- }
- %>
- </select></td>
- <td width="112" align="center">
- <a onclick="modifySubtask(myform,'<%= sub.getSubtaskId() %>');return false;" href="#"><%= sub.getSubTitle() %></a>
- </td>
- <td width="109" align="center">
- <div align="center"><%=sub.getSubExecutorName() %></div>
- </td>
- <td width="104" align="center">
- <div align="center"><%= WorkflowLoader.getSubtaskType( sub.getSubTypeId() ) %></div>
- </td>
- <td width="93" align="center">
- <div align="center"><%= sub.getSubPlanEndTimeS() %></div>
- </td>
- </tr>
- <%
- }
- %>
- <tr>
- <td align="center" bgcolor="#e0e0e0" width="42">
- <input type="checkbox" name="C1" value="ON" onClick="SelectAll( this.form )" >
- </td>
- <td colspan="5" bgcolor="#e0e0e0"> 全选</td>
- </tr>
- </table>
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr align="center">
- <td height="30">
- <input type="button" name="Submit" value="保存" class="file" onClick="modifyProjectSuccess(this.form, 'false')">
- <input type="button" style="width:70px" name="Submit" value="保存并启动" class="file" onClick="modifyProjectSuccess( this.form, 'true')">
- <input type="button" style="width:85px" name="Submit" value="存为个人模板" class="file" onClick="saveTemplate(this.form)">
- <input type="reset" name="Submit2" value="放弃" class="file" onclick="location='/mainctrl/projectmanagement/projectlist'">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>