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

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin1.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int iDocTypeID =m_request.GetInt("DocTypeID");
  7. Vector vt = DocFieldsManager.getByDocTypeRecord(iDocTypeID);
  8. %>
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  12. <title>文档字段管理-- GForce OA 2.0</title>
  13. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  14. <script language="JavaScript" src="/js/changestyle.js"></script>
  15. <script language="JavaScript" type="text/javascript">
  16. function CheckAddDocFields()
  17. {
  18.     if(document.AddDocFields.FieldsName.value=='')
  19.     {
  20.         alert("请输入字段名称!");
  21.         document.AddDocFields.FieldsName.focus();
  22.         return false;
  23.     }
  24.     if(isNaN(parseInt(document.AddDocFields.OrderBy.value)))
  25.     {
  26.         alert("请输入正确排序编号!");
  27.         document.AddDocFields.OrderBy.focus();
  28.         return false;
  29.     }
  30. }
  31. </script>
  32. </head>
  33. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  34. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  35.     <tr>
  36.         <td align="center" valign="top"><p>&nbsp;</p>
  37.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#000000" style="">
  38.                 <tr align="right" valign="middle">
  39.                     <th colspan="7" nowrap align="center"><font color="#0A0A0A">“<%=DocumentTypeManager.getDocTypeNameByID(iDocTypeID)%>”文档类型的字段列表</font></th>
  40.                     <th colspan="1" nowrap align="right"><input type="button" value="关闭" onclick="window.close()"></th>
  41.                 </tr>
  42.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  43.                     <th width="6%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  44.                     <th width="6%" nowrap><font color="#000000">序号</font></th>
  45.                     <th width="40%" nowrap><font color="#000000">字段名称</font></th>
  46.                     <th width="8%" nowrap><font color="#000000">排序编号</font></th>
  47.                     <th width="8%" nowrap><font color="#000000">字段类型</font></th>
  48.                     <th width="8%" nowrap><font color="#000000">添加</font></th>
  49.                     <th width="8%" nowrap><font color="#000000">修改</font></th>
  50.                     <th width="8%" nowrap><font color="#000000">删除</font></th>
  51.                 </tr>
  52. <%
  53. for(int i=0;i<vt.size();i++)
  54. {
  55.     String strID = ((Vector)vt.get(i)).get(0).toString();
  56.     if(i % 2 == 0)
  57.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  58.     else
  59.     out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  60.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  61.     out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  62.     out.println("<td align="left" valign="middle" nowrap>"+((Vector)vt.get(i)).get(1).toString()+"</td>");
  63.     out.println("<td align="center" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(2).toString() + "</td>");
  64. if (((Vector)vt.get(i)).get(3).toString().equalsIgnoreCase("STR")) out.println("<td align="center" valign="middle" nowrap>字符串类型</td>");else
  65. if (((Vector)vt.get(i)).get(3).toString().equalsIgnoreCase("NUM")) out.println("<td align="center" valign="middle" nowrap>数值类型</td>");else
  66. if (((Vector)vt.get(i)).get(3).toString().equalsIgnoreCase("DATE")) out.println("<td align="center" valign="middle" nowrap>日期类型</td>");else
  67. if (((Vector)vt.get(i)).get(3).toString().equalsIgnoreCase("TEXT")) out.println("<td align="center" valign="middle" nowrap>备注类型</td>");else
  68. if (((Vector)vt.get(i)).get(3).toString().equalsIgnoreCase("ACC")) out.println("<td align="center" valign="middle" nowrap>附件类型</td>");else
  69.     out.println("<td align="center" valign="middle" nowrap>未知类型</td>");
  70.     out.println("<td align="center" valign="middle" nowrap>&nbsp;</td>");
  71.     out.println("<td align="center" valign="middle" nowrap><a href="EditDocFields.jsp?DocTypeID="+iDocTypeID+"&ID=" + strID + "">修改</a></td>");
  72.     out.println("<td align="center" valign="middle" nowrap><a target="hidden" href="DelDocFields.jsp?DocTypeID="+iDocTypeID+"&ID=" + strID + "" onclick="return confirm('您确实要删除该字段吗?\n删除该字段之前必须删除使用该字段的所有文档,\n否则会出错,您是否继续?');">删除</a></td>");
  73.     out.println("</tr>");
  74. }
  75. %>
  76.                 <form name="AddDocFields" action="AddDocFieldsAction.jsp?DocTypeID=<%=iDocTypeID%>" method="post" onSubmit="javascript:return CheckAddDocFields();" target="hidden">
  77.                     <tr bgcolor="<%=m_session.GetString("TitleColor")%>">
  78.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</th>
  79.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</th>
  80.                         <th align="left" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  81.                         <input name="FieldsName" type="text" maxlength="60" size="30">
  82.                         </th>
  83.                         <th align="left" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  84.                         <input name="OrderBy" type="text" size="5">
  85.                         </th>
  86.                         <th align="left" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  87.                         <select name="FieldType">
  88.                          <option value="STR">字符串类型</option>
  89.                          <option value="NUM">数值类型</option>
  90.                          <option value="DATE">日期类型</option>
  91.                          <option value="TEXT">备注类型</option>
  92.                          <option value="ACC">附件类型</option>
  93.                         </select>
  94.                         <input name="DocumentTypeID" type="hidden" Value="<%=iDocTypeID%>">
  95.                         </th>
  96.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  97.                             <input type="submit" value="添加"></th>
  98.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</th>
  99.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</th>
  100.                     </tr>
  101.                 </form>
  102.             </table>
  103.         </td>
  104. <!--
  105. -->
  106.     </tr>
  107. </table>
  108. </body>
  109. </html>