AddPublicRes.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); %>
- <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 checkAddPublicRes()
- {
- if(document.AddPublicRes.Purpose.value=="")
- {
- alert("请输入用途!");
- document.AddPublicRes.Purpose.focus();
- return false;
- }
- if(!isDate(document.AddPublicRes.StartDateD.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.AddPublicRes.StartDateD.focus();
- return false;
- }
- if(!isDate(document.AddPublicRes.EndDateD.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.AddPublicRes.EndDateD.focus();
- return false;
- }
- if (document.AddPublicRes.StartDateD.value>document.AddPublicRes.EndDateD.value)
- {
- alert("开始日期不能大于结束日期!");
- document.AddPublicRes.EndDateD.focus();
- return false;
- }
- if (document.AddPublicRes.StartDateTm.value=="")
- {
- document.AddPublicRes.StartDateTm.value=0;
- }
- else if(isNaN(parseInt(document.AddPublicRes.StartDateTm.value,10)) || parseInt(document.AddPublicRes.StartDateTm.value,10)>59 || parseInt(document.AddPublicRes.StartDateTm.value,10)<0)
- {
- alert("请输入正确的分钟!");
- document.AddPublicRes.StartDateTm.select();
- document.AddPublicRes.StartDateTm.focus();
- return false;
- }
- if (document.AddPublicRes.EndDateTm.value=="")
- {
- document.AddPublicRes.EndDateTm.value=0;
- }
- else if(isNaN(parseInt(document.AddPublicRes.EndDateTm.value,10)) || parseInt(document.AddPublicRes.EndDateTm.value,10)>59 || parseInt(document.AddPublicRes.EndDateTm.value,10)<0)
- {
- alert("请输入正确的分钟!");
- document.AddPublicRes.EndDateTm.select();
- document.AddPublicRes.EndDateTm.focus();
- return false;
- }
- if (document.AddPublicRes.StartDateD.value==document.AddPublicRes.EndDateD.value)
- {
- if (parseInt(document.AddPublicRes.StartDateT.value,10)>parseInt(document.AddPublicRes.EndDateT.value,10))
- {
- alert("开始时间不能大于结束时间!");
- document.AddPublicRes.EndDateT.focus();
- return false;
- }
- else if (parseInt(document.AddPublicRes.StartDateT.value,10)==parseInt(document.AddPublicRes.EndDateT.value,10))
- {
- if (parseInt(document.AddPublicRes.StartDateTm.value,10)>parseInt(document.AddPublicRes.EndDateTm.value,10))
- {
- alert("开始时间不能大于结束时间!");
- document.AddPublicRes.EndDateTm.focus();
- document.AddPublicRes.EndDateTm.select();
- return false;
- }
- }
- }
- //计划开始时间,结束时间合成
- document.AddPublicRes.StartTime.value = document.AddPublicRes.StartDateD.value + " "+
- document.AddPublicRes.StartDateT.value + ":"+document.AddPublicRes.StartDateTm.value+":00";
- document.AddPublicRes.EndTime.value = document.AddPublicRes.EndDateD.value + " "+
- document.AddPublicRes.EndDateT.value + ":"+document.AddPublicRes.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>
- <%
- 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 intUserID = m_session.GetInt("UserID");
- %>
- <form name="AddPublicRes" action="/Asset/AddPublicResAction.jsp?SysDirID=<%=iSysDirID%>&IsPlan=<%=iIsPlan%>" method="post" onSubmit="javascript:return checkAddPublicRes();">
- <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="AssetID" type="hidden" value="<%=iAssetID%>">
- <input name="UserID" type="hidden" value="<%=intUserID%>">
- <input name="IsPlan" type="hidden" value="<%=iIsPlan%>">
- <input name="Purpose" type="text" maxlength="60" size="37">
- </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" 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">
- <option value="0">0</option>
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- <option value="5">5</option>
- <option value="6">6</option>
- <option value="7">7</option>
- <option value="8">8</option>
- <option value="9" selected>9</option>
- <option value="10">10</option>
- <option value="11">11</option>
- <option value="12">12</option>
- <option value="13">13</option>
- <option value="14">14</option>
- <option value="15">15</option>
- <option value="16">16</option>
- <option value="17">17</option>
- <option value="18">18</option>
- <option value="19">19</option>
- <option value="20">20</option>
- <option value="21">21</option>
- <option value="22">22</option>
- <option value="23">23</option>
- </select>
- <font color="#0A0A0A">时</font>
- <input name="StartDateTm" type="text" size="3" maxlength="2">
- <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" 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">
- <option value="0">0</option>
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- <option value="5">5</option>
- <option value="6">6</option>
- <option value="7">7</option>
- <option value="8">8</option>
- <option value="9">9</option>
- <option value="10">10</option>
- <option value="11">11</option>
- <option value="12">12</option>
- <option value="13">13</option>
- <option value="14">14</option>
- <option value="15">15</option>
- <option value="16">16</option>
- <option value="17" selected>17</option>
- <option value="18">18</option>
- <option value="19">19</option>
- <option value="20">20</option>
- <option value="21">21</option>
- <option value="22">22</option>
- <option value="23">23</option>
- </select>
- <font color="#0A0A0A">时</font>
- <input name="EndDateTm" type="text" size="3" maxlength="2">
- 分</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>