EditPublicRes.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:9k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <%
- Request m_request = new Request(request);
- int iSysDirID = m_request.GetInt("SysDirID");
- int iIsPlan = m_request.GetInt("IsPlan");
- int iAssetID = m_request.GetInt("AssetID");
- int intPublicResID = m_request.GetInt("ID");
- if(intPublicResID<1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("请选择正确的共享,修改失败!");
- history.back();
- </script>
- <%
- }
- else
- {
- Vector vt = PublicResShareManager.getByIDAllRecord(intPublicResID);
- if(vt.size()==1)
- {
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
- <title>共享信息管理-- GForce OA 2.0</title>
- <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
- <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
- <script language="JavaScript" type="text/javascript">
- function checkEditPublicRes()
- {
- if(document.EditPublicRes.Purpose.value=="")
- {
- alert("请输入用途!");
- document.EditPublicRes.Purpose.focus();
- return false;
- }
- if(!isDate(document.EditPublicRes.StartDateD.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.EditPublicRes.StartDateD.focus();
- return false;
- }
- if(!isDate(document.EditPublicRes.EndDateD.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.EditPublicRes.EndDateD.focus();
- return false;
- }
- if (document.EditPublicRes.StartDateD.value>document.EditPublicRes.EndDateD.value)
- {
- alert("开始日期不能大于结束日期!");
- document.EditPublicRes.EndDateD.focus();
- return false;
- }
- if (document.EditPublicRes.StartDateTm.value=="")
- {
- document.EditPublicRes.StartDateTm.value=0;
- }
- else if(isNaN(parseInt(document.EditPublicRes.StartDateTm.value,10)) || parseInt(document.EditPublicRes.StartDateTm.value,10)>59 || parseInt(document.EditPublicRes.StartDateTm.value,10)<0)
- {
- alert("请输入正确的分钟!");
- document.EditPublicRes.StartDateTm.select();
- document.EditPublicRes.StartDateTm.focus();
- return false;
- }
- if (document.EditPublicRes.EndDateTm.value=="")
- {
- document.EditPublicRes.EndDateTm.value=0;
- }
- else if(isNaN(parseInt(document.EditPublicRes.EndDateTm.value,10)) || parseInt(document.EditPublicRes.EndDateTm.value,10)>59 || parseInt(document.EditPublicRes.EndDateTm.value,10)<0)
- {
- alert("请输入正确的分钟!");
- document.EditPublicRes.EndDateTm.select();
- document.EditPublicRes.EndDateTm.focus();
- return false;
- }
- if (document.EditPublicRes.StartDateD.value==document.EditPublicRes.EndDateD.value)
- {
- if (parseInt(document.EditPublicRes.StartDateT.value,10)>parseInt(document.EditPublicRes.EndDateT.value,10))
- {
- alert("开始时间不能大于结束时间!");
- document.EditPublicRes.EndDateT.focus();
- return false;
- }
- else if (parseInt(document.EditPublicRes.StartDateT.value,10)==parseInt(document.EditPublicRes.EndDateT.value,10))
- {
- if (parseInt(document.EditPublicRes.StartDateTm.value,10)>parseInt(document.EditPublicRes.EndDateTm.value,10))
- {
- alert("开始时间不能大于结束时间!");
- document.EditPublicRes.EndDateTm.focus();
- document.EditPublicRes.EndDateTm.select();
- return false;
- }
- }
- }
- //计划开始时间,结束时间合成
- document.EditPublicRes.StartTime.value = document.EditPublicRes.StartDateD.value + " "+
- document.EditPublicRes.StartDateT.value + ":"+document.EditPublicRes.StartDateTm.value+":00";
- document.EditPublicRes.EndTime.value = document.EditPublicRes.EndDateD.value + " "+
- document.EditPublicRes.EndDateT.value + ":"+document.EditPublicRes.EndDateTm.value+":00";
- }
- </script>
- </head>
- <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
- <table width="100%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="center" valign="top"><p> </p>
- <form name="EditPublicRes" action="/Asset/EditPublicResAction.jsp?SysDirID=<%=iSysDirID%>&IsPlan=<%=iIsPlan%>" method="post" onSubmit="javascript:return checkEditPublicRes();">
- <table border="0" cellpadding="0" cellspacing="0" width="90%">
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">用途:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="ID" type="Hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>" >
- <input name="UserID" type="hidden" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
- <input name="AssetID" type="hidden" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
- <input name="IsPlan" type="hidden" value="<%=((Vector)vt.get(0)).get(6).toString()%>">
- <input name="Purpose" type="text" maxlength="60" size="37" Value="<%=((Vector)vt.get(0)).get(4).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">开始时间:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="StartTime" type="hidden">
- <input name="StartDateD" type="text" Value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(2).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value,-5,+5);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value,-5,+5);">
- <select name="StartDateT">
- <%
- for(int i=1;i<24;i++)
- {
- if (StringNew.GetDateString(((Vector)vt.get(0)).get(2).toString(),"H").equalsIgnoreCase(i+""))
- {
- out.println("<option value=" + i + " selected>" + i + "</option>");
- }
- else
- {
- out.println("<option value=" + i + ">" + i + "</option>");
- }
- }
- %>
- </select>
- <font color="#0A0A0A">时</font>
- <input name="StartDateTm" type="text" size="3" maxlength="2" Value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(2).toString(),"m")%>">
- <font color="#0A0A0A">分</font> </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">结束时间:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="EndTime" type="hidden">
- <input name="EndDateD" type="text" Value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value,-5,+5);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value,-5,+5);">
- <select name="EndDateT">
- <%
- for(int i=1;i<24;i++)
- {
- if (StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"H").equalsIgnoreCase(i+""))
- {
- out.println("<option value=" + i + " selected>" + i + "</option>");
- }
- else
- {
- out.println("<option value=" + i + ">" + i + "</option>");
- }
- }
- %>
- </select>
- <font color="#0A0A0A">时</font>
- <input name="EndDateTm" type="text" size="3" maxlength="2" Value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"m")%>">
- 分</td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- <td align="left" valign="middle" nowrap></td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- <td align="left" valign="middle" nowrap>
- <input type="submit" value="修改"> <input type="reset" value="重填"> <input type="button" value="返回" onclick="window.location='PublicResManage.jsp?SysDirID=<%=iSysDirID%>&ID=<%=iAssetID%>&IsPlan=<%=iIsPlan%>';">
- </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
- history.back();
- </script>
- <%
- }
- }
- %>