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. <%
  41. Request m_request = new Request(request);
  42. int iUserID = m_session.GetInt("UserID");
  43. int iSysDirID = m_request.GetInt("SysDirID");
  44. int iDocumentTempletID = m_request.GetInt("ID");
  45. if(iDocumentTempletID <1)
  46. {
  47. %>
  48. <script language="JavaScript" type="text/JavaScript">
  49. alert("未知原因修改失败,请与管理员联系!");
  50. history.back();
  51. </script>
  52. <%
  53. }
  54. else
  55. {
  56. Vector vt = DocumentTempletManager.getRecordByID(iDocumentTempletID);
  57. if(vt.size()==1)
  58. {
  59. %>
  60. <form name="EditDocumentTemplet" action="EditDocumentTempletAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return checkEditDocumentTemplet();">
  61. <table border="0" cellpadding="0" cellspacing="0" width="90%">
  62.     <tr>
  63.       <td align="right" valign="middle"><font color="#0A0A0A">模板名称:</font></td>
  64.       <td colspan="3" align="left" valign="middle" nowrap>
  65.         <input name="TempletName" type="text" maxlength="71" size="71" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  66.         <input name="ID" type="hidden"  value="<%=((Vector)vt.get(0)).get(0).toString()%>">
  67.       </td>
  68.     </tr>
  69.     <tr>
  70.       <td align="right" valign="middle"><font color="#0A0A0A">模板编号:</font></td>
  71.       <td colspan="3" align="left" valign="middle" nowrap>
  72.       <input name="TempletNumber" type="text" maxlength="71" size="71" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
  73.     </tr>
  74.     <tr>
  75.       <td align="right" valign="middle"><font color="#0A0A0A">英文名称:</font></td>
  76.       <td colspan="3" align="left" valign="middle" nowrap>
  77.       <input name="EnglishAb" type="text" maxlength="71" size="71" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
  78.     </tr>
  79.     <tr>
  80.       <td align="right" valign="middle"><font color="#0A0A0A">可写用户:</font></td>
  81.       <td colspan="3" align="left" valign="middle" nowrap>
  82.         <textarea name="WritableUserNames" cols="60" rows="3" readonly="true" ondblclick="GetUserIDAndNames(document.EditDocumentTemplet.WritableUserIDs, this);"><%=UserManager.getPersonnelNamesByUserIDs(((Vector)vt.get(0)).get(6).toString())%></textarea>
  83.         <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><td align="left" valign="middle" nowrap>
  84.       </td>
  85.       </tr>
  86.     <tr>
  87.       <td align="right" valign="middle"><font color="#0A0A0A">可写部门:</font></td>
  88.       <td colspan="3" align="left" valign="middle" nowrap>
  89.       <textarea name="WritableDepartNames" cols="60" rows="3" readonly="true" ondblclick="GetDepartIDAndNames(document.EditDocumentTemplet.WritableDepartIDs, this);"><%=DepartmentManager.getDepartNamesByIDs(((Vector)vt.get(0)).get(7).toString())%></textarea>
  90.     <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>
  91.   </tr>
  92.     <tr>
  93.       <td align="right" valign="middle"><font color="#0A0A0A">只读用户:</font></td>
  94.       <td colspan="3" align="left" valign="middle" nowrap>
  95.       <textarea name="ReadOnlyUserNames" cols="60" rows="3" readonly="true" ondblclick="GetUserIDAndNames(document.EditDocumentTemplet.ReadOnlyUserIDs, this);"><%=UserManager.getPersonnelNamesByUserIDs(((Vector)vt.get(0)).get(8).toString())%></textarea>
  96.       <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><td align="left" valign="middle" nowrap>
  97.   </tr>
  98.     <tr>
  99.       <td align="right" valign="middle"><font color="#0A0A0A">只读部门:</font></td>
  100.       <td colspan="3" align="left" valign="middle" nowrap>
  101.       <textarea name="ReadOnlyDepartNames" cols="60" rows="3" readonly="true" ondblclick="GetDepartIDAndNames(document.EditDocumentTemplet.ReadOnlyDepartIDs, this);"><%=DepartmentManager.getDepartNamesByIDs(((Vector)vt.get(0)).get(9).toString())%></textarea>
  102.       <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>
  103.   </tr>
  104.     <tr>
  105.       <td align="right" valign="middle"><font color="#0A0A0A">表单激活事件:</font></td>
  106.       <td colspan="3" align="left" valign="middle" nowrap>
  107.       <input name="FormEvent" type="text" maxlength="71" size="71" value="<%=((Vector)vt.get(0)).get(10).toString()%>">
  108.     </tr>
  109.     <tr>
  110.       <td align="right" valign="middle"><font color="#0A0A0A">打印HTML代码:</font></td>
  111.       <td colspan="3" align="left" valign="middle" nowrap>
  112.       <textarea name="PrintHTMLCode" cols="60" rows="4" ><%=((Vector)vt.get(0)).get(12).toString()%></textarea>
  113.     </tr>
  114.     <tr>
  115.       <td align="right" valign="middle"><font color="#0A0A0A">排版格式HTML:</font></td>
  116.       <td colspan="3" align="left" valign="middle" nowrap>
  117.       <textarea name="TypesetHTMLCode" cols="60" rows="4"><%=((Vector)vt.get(0)).get(13).toString()%></textarea>
  118.     </tr>
  119.     <tr>
  120.       <td align="right" valign="middle"><font color="#0A0A0A">嵌套JScript代码:</font></td>
  121.       <td colspan="3" align="left" valign="middle" nowrap>
  122.       <textarea name="JavaScriptCode" cols="60" rows="4"><%=((Vector)vt.get(0)).get(14).toString()%></textarea>
  123.     </tr>
  124.     <tr>
  125.       <td align="right" valign="middle"><font color="#0A0A0A">是否自动生成:</font></td>
  126.       <td colspan="3" align="left" valign="middle" nowrap>
  127. <%
  128. if (((Vector)vt.get(0)).get(2).toString().equalsIgnoreCase("true"))
  129. {
  130. %>
  131.         <input type="radio" name="IsAutoBuild" value="1" checked>是
  132.         <input type="radio" name="IsAutoBuild" value="0">否
  133. <%
  134. }
  135. else
  136. {
  137. %>
  138.         <input type="radio" name="IsAutoBuild" value="1">是
  139.         <input type="radio" name="IsAutoBuild" value="0" checked>否
  140. <%
  141. }
  142. %>
  143.     </tr>
  144.     <tr>
  145.       <td align="right" valign="middle">&nbsp;</td>
  146.       <td colspan="3" align="left" valign="middle" nowrap> </td>
  147.     </tr>
  148.     <tr>
  149.       <td align="right" valign="middle">&nbsp;</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. </form>
  161. </table>
  162. </body>
  163. </html>
  164. <%
  165. }
  166. else
  167. {
  168. %>
  169. <script language="JavaScript" type="text/JavaScript">
  170. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  171. history.back();
  172. </script>
  173. <%
  174. }
  175. }
  176. %>