EditDocumentTemplet.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:9k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/>
  4. <% Session m_session = new Session(session); %>
  5. <html>
  6. <head>
  7.   <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  8.   <title>公文管理 -- GForce OA 2.0</title>
  9.   <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  10.   <script language="JavaScript" src="/js/changestyle.js"></script>
  11.   <script language="JavaScript" type="text/javascript">
  12.   function checkEditDocumentTemplet()
  13.   {
  14.     if(document.EditDocumentTemplet.TempletName.value == "")
  15.     {
  16.         alert("请输入公文模板名称!");
  17.         document.EditDocumentTemplet.TempletName.focus();
  18.         return false;
  19.     }
  20.     if(document.EditDocumentTemplet.TempletNumber.value == "")
  21.     {
  22.         alert("请输入公文模板编号!");
  23.         document.EditDocumentTemplet.TempletNumber.focus();
  24.         return false;
  25.     }
  26.     if(document.EditDocumentTemplet.EnglishAb.value == "")
  27.     {
  28.         alert("请输入公文模板英文名称!");
  29.         document.EditDocumentTemplet.EnglishAb.focus();
  30.         return false;
  31.     }
  32.   }
  33.   </script>
  34.   <style type="text/css"></style>
  35. </head>
  36. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  37. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  38.     <tr>
  39.         <td align="center" valign="top"><p>&nbsp;</p>
  40.           <table width="90%" border="0" align="center" cellspacing="0">
  41.             <tr>
  42.               <td width="30%">
  43.               </td>
  44.               <td align="left">
  45.                 <font color="#000000"><strong>公文模板管理--公文模板信息修改</strong></font>
  46.               </td>
  47.             </tr>
  48.             <tr>
  49.               <td>
  50.                 &nbsp;
  51.               </td>
  52.             </tr>
  53.           </table>
  54. <%
  55. Request m_request = new Request(request);
  56. int iUserID = m_session.GetInt("UserID");
  57. int iSysDirID = m_request.GetInt("SysDirID");
  58. int iDocumentTempletID = m_request.GetInt("ID");
  59. if(iDocumentTempletID <1)
  60. {
  61. %>
  62. <script language="JavaScript" type="text/JavaScript">
  63. alert("未知原因修改失败,请与管理员联系!");
  64. history.back();
  65. </script>
  66. <%
  67. }
  68. else
  69. {
  70. Vector vt = DocumentTempletManager.getRecordByID(iDocumentTempletID);
  71. if(vt.size()==1)
  72. {
  73. %>
  74. <form name="EditDocumentTemplet" action="EditDocumentTempletAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkEditDocumentTemplet();">
  75. <table border="1" cellpadding="0" cellspacing="1" width="90%">
  76.     <tr>
  77.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">模板名称:</font></td>
  78.       <td colspan="3" align="left" valign="middle" nowrap>
  79.       &nbsp;<input name="TempletName" type="text" maxlength="71" size="77" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  80.         <input name="ID" type="hidden"  value="<%=((Vector)vt.get(0)).get(0).toString()%>">
  81.       </td>
  82.     </tr>
  83.     <tr>
  84.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">模板编号:</font></td>
  85.       <td colspan="1" align="left" valign="middle" nowrap>
  86.       &nbsp;<input name="TempletNumber" type="text" maxlength="71" size="35" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
  87.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">英文名称:</font></td>
  88.       <td colspan="1" align="left" valign="middle" nowrap>
  89.       &nbsp;<input name="EnglishAb" type="text" maxlength="71" size="35" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
  90.     </tr>
  91.     <tr>
  92.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">生成方式:</font></td>
  93.       <td colspan="4" align="left" valign="middle" nowrap>
  94.         &nbsp;<input type="radio" name="IsAutoBuild" value="1" <%=((Vector)vt.get(0)).get(12).toString().equalsIgnoreCase("true")?" checked":""%>>&nbsp;自动生成
  95.         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="IsAutoBuild" value="0"<%=((Vector)vt.get(0)).get(12).toString().equalsIgnoreCase("false")?" checked":""%>>手动发放
  96.     </tr>
  97.     <tr>
  98.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">可写用户:</font></td>
  99.       <td colspan="1" align="left" valign="middle" nowrap>
  100.         &nbsp;<textarea name="WritableUserNames" cols="30" rows="3" readonly="true" ondblclick="GetUserIDAndNames(document.EditDocumentTemplet.WritableUserIDs, this);"><%=UserManager.getPersonnelNamesByUserIDs(((Vector)vt.get(0)).get(6).toString())%></textarea>
  101.         <input name="WritableUserIDs" type="hidden" value="<%=((Vector)vt.get(0)).get(6).toString()%>"><a href="" onclick="GetUserIDAndNames(document.EditDocumentTemplet.WritableUserIDs, document.EditDocumentTemplet.WritableUserNames);return false;" title="选择员工名称"><img src="/images/couple.gif" border="0"></a>
  102.       </td>
  103.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">可写部门:</font></td>
  104.       <td colspan="1" align="left" valign="middle" nowrap>
  105.       &nbsp;<textarea name="WritableDepartNames" cols="30" rows="3" readonly="true" ondblclick="GetDepartIDAndNames(document.EditDocumentTemplet.WritableDepartIDs, this);"><%=DepartmentManager.getDepartNamesByIDs(((Vector)vt.get(0)).get(7).toString())%></textarea>
  106.     <input name="WritableDepartIDs" type="hidden" value="<%=((Vector)vt.get(0)).get(7).toString()%>"><a href="" onclick="GetDepartIDAndNames(document.EditDocumentTemplet.WritableDepartIDs, document.EditDocumentTemplet.WritableDepartNames);return false;" title="选择部门"><img src="/images/couple.gif" border="0"></a>
  107.   </tr>
  108.     <tr>
  109.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">只读用户:</font></td>
  110.       <td colspan="1" align="left" valign="middle" nowrap>
  111.       &nbsp;<textarea name="ReadOnlyUserNames" cols="30" rows="3" readonly="true" ondblclick="GetUserIDAndNames(document.EditDocumentTemplet.ReadOnlyUserIDs, this);"><%=UserManager.getPersonnelNamesByUserIDs(((Vector)vt.get(0)).get(8).toString())%></textarea>
  112.       <input name="ReadOnlyUserIDs" type="hidden" value="<%=((Vector)vt.get(0)).get(8).toString()%>"><a href="" onclick="GetUserIDAndNames(document.EditDocumentTemplet.ReadOnlyUserIDs, document.EditDocumentTemplet.ReadOnlyUserNames);return false;" title="选择员工名称"><img src="/images/couple.gif" border="0"></a>
  113.         </td>
  114.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">只读部门:</font></td>
  115.       <td colspan="1" align="left" valign="middle" nowrap>
  116.       &nbsp;<textarea name="ReadOnlyDepartNames" cols="30" rows="3" readonly="true" ondblclick="GetDepartIDAndNames(document.EditDocumentTemplet.ReadOnlyDepartIDs, this);"><%=DepartmentManager.getDepartNamesByIDs(((Vector)vt.get(0)).get(9).toString())%></textarea>
  117.       <input name="ReadOnlyDepartIDs" type="hidden" value="<%=((Vector)vt.get(0)).get(9).toString()%>"><a href="" onclick="GetDepartIDAndNames(document.EditDocumentTemplet.ReadOnlyDepartIDs, document.EditDocumentTemplet.ReadOnlyDepartNames);return false;" title="选择部门"><img src="/images/couple.gif" border="0"></a>
  118.   </tr>
  119.     <tr>
  120.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">表单激活<br>&nbsp;&nbsp;事件:</font></td>
  121.       <td colspan="4" align="left" valign="middle" nowrap>
  122.       &nbsp;<textarea name="FormEvent" cols="80" rows="4"><%=((Vector)vt.get(0)).get(14).toString()%></textarea>
  123.     </tr>
  124.     <tr>
  125.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">打印HTML<br>&nbsp;&nbsp;代码:</font></td>
  126.       <td colspan="4" align="left" valign="middle" nowrap>
  127.       &nbsp;<textarea name="PrintHTMLCode" cols="80" rows="4"><%=((Vector)vt.get(0)).get(10).toString()%></textarea>
  128.     </tr>
  129.     <tr>
  130.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">排版格式HTML:</font></td>
  131.       <td colspan="4" align="left" valign="middle" nowrap>
  132.       &nbsp;<textarea name="TypesetHTMLCode" cols="80" rows="4"><%=((Vector)vt.get(0)).get(13).toString()%></textarea>
  133.     </tr>
  134.     <tr>
  135.       <td align="center" valign="middle" width="14%"><font color="#0A0A0A">嵌套JavaScript<br>&nbsp;&nbsp;代码:</font></td>
  136.       <td colspan="4" align="left" valign="middle" nowrap>
  137.       &nbsp;<textarea name="JavaScriptCode" cols="80" rows="4"><%=((Vector)vt.get(0)).get(15).toString()%></textarea>
  138.     </tr>
  139.           <table width="90%" border="0" align="center" cellspacing="0">
  140.             <tr>
  141.               <td width="30%">
  142.                 &nbsp;
  143.               </td>
  144.               <td width="70%">
  145.                 &nbsp;
  146.               </td>
  147.             </tr>
  148.             <tr>
  149.                       <td align="right" valign="middle"> </td>
  150.                       <td colspan="3" align="left" valign="middle" nowrap>
  151.         <input type="hidden" name="BuildUserID" value="<%=iUserID%>">
  152.         <%java.util.Date t_Date = new java.util.Date();%>
  153.         <input name="BuildTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm:ss")%>">
  154.         <input type="submit" value="确定">
  155.         &nbsp;&nbsp;&nbsp; <input type="reset" value="重填"> &nbsp;&nbsp;&nbsp;
  156.         <input type="button" value="返回" onclick="window.location='DocumentTempletManage.jsp?SysDirID=<%=iSysDirID%>';">
  157.       </td>
  158.     </tr>
  159.     </table>
  160. </table>
  161. </form>
  162. </table>
  163. </body>
  164. </html>
  165. <%
  166. }
  167. else
  168. {
  169. %>
  170. <script language="JavaScript" type="text/JavaScript">
  171. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  172. history.back();
  173. </script>
  174. <%
  175. }
  176. }
  177. %>