DocTempletFieldsManage.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:20k
源码类别:
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="/js/changestyle.js"></script>
- <script language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></script>
- </head>
- <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
- <%
- Request m_request = new Request(request);
- String strCurrentPageURL = request.getRequestURI();
- int iSysDirID = m_request.GetInt("SysDirID");
- int iDocTempletID = m_request.GetInt("ID");
- int iPageSize = 18;
- int iPage = m_request.GetInt("Page");
- int iUserID = m_session.GetInt("UserID");
- String strID = m_request.GetString("FieldID");
- String strFieldName = m_request.GetString("FieldName");
- String strFieldType = m_request.GetString("FieldType");
- String strEnglishAb = m_request.GetString("EnglishAb");
- String strOrderNumber = m_request.GetString("OrderNumber");
- String strEvent = m_request.GetString("Event");
- String strOptions = m_request.GetString("Options");
- String strFieldContent = m_request.GetString("FieldContent");
- String strIsMustFill = m_request.GetString("IsMustFill");
- String strWritableUserIDs = m_request.GetString("WritableUserIDs");
- String strReadableUserIDs = m_request.GetString("ReadableUserIDs");
- String strIsUseful = m_request.GetString("IsUseful");
- String strSearchType = m_request.GetString("SearchType");
- String strSearchFieldsInForm = m_request.GetString("SearchFieldsInForm");
- String strTempletID = m_request.GetString("TempletID");
- String strTempletName = m_request.GetString("TempletName");
- String strMaxLength = m_request.GetString("MaxLength");
- String strDefaultValue = m_request.GetString("DefaultValue");
- String strOrderBy = m_request.GetString("OrderBy");
- String strIsDesc = m_request.GetString("IsDesc");
- Vector vtt = DocumentTempletManager.getRecordByID(iDocTempletID);
- %>
- <script language="JavaScript">
- <%=((Vector)vtt.get(0)).get(15).toString()%>
- function changeorder(orderBy)
- {
- with(document.DocTempletFieldsManage)
- {
- if(OrderBy.value==orderBy)
- {
- if(IsDesc.value=="")
- IsDesc.value="True";
- else
- IsDesc.value="";
- }
- else
- {
- IsDesc.value="";
- OrderBy.value=orderBy;
- Page.value="1";
- }
- }
- document.DocTempletFieldsManage.submit();
- }
- function changepage(pageNum)
- {
- with(document.DocTempletFieldsManage)
- {
- Page.value=pageNum;
- }
- document.DocTempletFieldsManage.submit();
- }
- </script>
- <table width="100%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="center" valign="top"><p> </p>
- <form name="DocTempletFieldsManage" action="<%=strCurrentPageURL + "?SysDirID=" + iSysDirID + "&ID=" + iDocTempletID%>" method="post">
- <input name="FieldID" type="hidden" value="<%=strID%>">
- <input name="FieldName" type="hidden" value="<%=strFieldName%>">
- <input name="FieldType" type="hidden" value="<%=strFieldType%>">
- <input name="EnglishAb" type="hidden" value="<%=strEnglishAb%>">
- <input name="OrderNumber" type="hidden" value="<%=strOrderNumber%>">
- <input name="Event" type="hidden" value="<%=strEvent%>">
- <input name="Options" type="hidden" value="<%=strOptions%>">
- <input name="FieldContent" type="hidden" value="<%=strFieldContent%>">
- <input name="IsMustFill" type="hidden" value="<%=strIsMustFill%>">
- <input name="WritableUserIDs" type="hidden" value="<%=strWritableUserIDs%>">
- <input name="ReadableUserIDs" type="hidden" value="<%=strReadableUserIDs%>">
- <input name="IsUseful" type="hidden" value="<%=strIsUseful%>">
- <input name="SearchType" type="hidden" value="<%=strSearchType%>">
- <input name="SearchFieldsInForm" type="hidden" value="<%=strSearchFieldsInForm%>">
- <input name="TempletID" type="hidden" value="<%=strTempletID%>">
- <input name="TempletName" type="hidden" value="<%=strTempletName%>">
- <input name="MaxLength" type="hidden" value="<%=strMaxLength%>">
- <input name="DefaultValue" type="hidden" value="<%=strDefaultValue%>">
- <input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
- <input name="IsDesc" type="hidden" value="<%=strIsDesc%>">
- <input name="Page" type="hidden" value="<%=iPage%>">
- <table width="90%" border="0" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a">
- <tr align="center" valign="middle" >
- <th width="100%" nowrap align="center" valign="middle"><font color="#000000">《<%=((Vector)vtt.get(0)).get(1).toString()%>》字段管理</font></th>
- </tr>
- <tr align="right" valign="bottom">
- <th width="100%" nowrap align="right" valign="middle"><font color="#000000" ><%=((Vector)vtt.get(0)).get(4).toString()%></font> </th>
- </tr>
- </table>
- <%
- if(strOrderBy.equalsIgnoreCase(""))
- {
- if(strOrderBy.equalsIgnoreCase("a.OrderNumber"))
- {
- if(strIsDesc.equalsIgnoreCase("True"))
- out.print("↓");
- else
- out.print("↑");
- }
- }
- %>
- <table width="90%" border="1" cellpadding="0" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
- <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
- <th width="2%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
- <th width="4%" nowrap><font color="#000000">序号</font></th>
- <th width="8%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.FieldName');return false;">字段名称</a><%
- if(strOrderBy.equalsIgnoreCase("a.FieldName"))
- {
- if(strIsDesc.equalsIgnoreCase("True"))
- out.print("↓");
- else
- out.print("↑");
- }
- %></font></th>
- <th width="14%" nowrap><font color"#000000"><a href="" onClick="changeorder('a.EnglishAb'); return false;">英文缩写</a><%
- if(strOrderBy.equalsIgnoreCase("a.EnglishAb"))
- {
- if(strIsDesc.equalsIgnoreCase("True"))
- out.print("↓");
- else
- out.print("↑");
- }
- %></font></th>
- <th width="30%" nowrap><font color="#000000">表现形式</font></th>
- <!--<th width="25%"><font color="#000000">说明</font></th>-->
- <th width="6%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.IsUseful'); return false;">可用</a><%
- if(strOrderBy.equalsIgnoreCase("a.IsUseful"))
- {
- if(strIsDesc.equalsIgnoreCase("True"))
- out.print("↓");
- else
- out.print("↑");
- }
- %></font></th>
- <th width="10%" nowrap><font color="#000000">修改</font></th>
- <th width="10%" nowrap><font color="#000000">删除</font></th>
- </tr>
- <form name="<%=((Vector)vtt.get(0)).get(5).toString()%>" id="<%=((Vector)vtt.get(0)).get(5).toString()%>" <%=((Vector)vtt.get(0)).get(14).toString()%> >
- <%
- strTempletID = iDocTempletID+"";
- Vector vt = DocTempletFieldsManager.getRecordBySearch(strID,strFieldName,strFieldType,strEnglishAb,strOrderNumber,strEvent,strOptions,strFieldContent,strIsMustFill,strWritableUserIDs,strReadableUserIDs,strIsUseful,strSearchType,strSearchFieldsInForm,strTempletID,strTempletName,strMaxLength,strDefaultValue,strOrderBy,strIsDesc);
- if(iPage<1)iPage=1;
- int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
- if(iPage>iPageCount) iPage=1;
- for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
- {
- strID = ((Vector)vt.get(i)).get(0).toString();
- if(i % 2 == 0)
- out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
- else
- out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
- out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
- out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
- out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(7).toString() + "">" + ((Vector)vt.get(i)).get(1).toString() + "</td>");
- out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(3).toString() + " </td>");
- String strFormObject="";
- if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("String"))
- {
- strFormObject="<input type='text' name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " value='" + ((Vector)vt.get(i)).get(16).toString() + "' maxlength='" + ((Vector)vt.get(i)).get(15).toString() + "'>";
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("Text"))
- {
- strFormObject="<textarea cols='40' rows='4' name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " maxlength='" + ((Vector)vt.get(i)).get(15).toString() + "'>" + ((Vector)vt.get(i)).get(16).toString() + "</textarea>";
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("Name"))
- {
- strFormObject="<input type='text' readonly='true' name='" + ((Vector)vt.get(i)).get(3).toString() + "' value='" + UserManager.getPersonnelNameByUserID(iUserID) + "' + size='10'>";
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("Read"))
- {
- strFormObject="<input type='text' name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " value='" + ((Vector)vt.get(i)).get(16).toString() + "' maxlength='" + ((Vector)vt.get(i)).get(15).toString() + "' readonly='true'>";
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("Numeric"))
- {
- strFormObject="<input type='text' name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " value='" + ((Vector)vt.get(i)).get(16).toString() + "' maxlength='" + ((Vector)vt.get(i)).get(15).toString() + "' size='15'>";
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("Date"))
- {
- strFormObject="<input type='text' name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " value='" + ((Vector)vt.get(i)).get(16).toString() + "' maxlength='12' size='15' onFocus='JavaScript:this.value=fPopUpCalendarDlg(this.value);' onDblClick='JavaScript:this.value=fPopUpCalendarDlg(this.value);'>";
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("Optime"))
- {
- java.util.Date t_Date = new java.util.Date();
- strFormObject="<input type='text' readonly='true' name='" + ((Vector)vt.get(i)).get(3).toString() + "' value='" + StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm") + "' maxlength='12' size='16'>";
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("Radio"))
- {
- strFormObject = ((Vector)vt.get(i)).get(6).toString();
- String[] strOption = strFormObject.split("《,》");
- if(strOption.length>1)
- {
- strFormObject="";
- for(int k=0;k<strOption.length;k++)
- {
- String strOptionText="";
- String strOptionValue="";
- if(strOption[k].indexOf("《¥》")>0)
- {
- strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
- strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
- }
- else
- {
- strOptionText=strOption[k];
- strOptionValue=strOption[k];
- }
- strFormObject+="<input type='radio' name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " value='" + strOptionValue + "'" + (strOptionValue.equalsIgnoreCase(((Vector)vt.get(i)).get(16).toString())?" checked":"") + ">" + strOptionText;
- if(k < strOption.length-1)
- {
- if(strOptionText.length()>20)
- strFormObject+="<br>";
- else
- strFormObject+=" ";
- }
- }
- }
- else
- {
- strFormObject="该单选按钮设置有问题,请与管理员联系!";
- }
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("Checkbox"))
- {
- strFormObject = ((Vector)vt.get(i)).get(6).toString();
- String[] strOption = strFormObject.split("《,》");
- if(strOption.length>1)
- {
- strFormObject="";
- for(int k=0;k<strOption.length;k++)
- {
- String strOptionText="";
- String strOptionValue="";
- if(strOption[k].indexOf("《¥》")>0)
- {
- strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
- strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
- }
- else
- {
- strOptionText=strOption[k];
- strOptionValue=strOption[k];
- }
- strFormObject+="<input type='checkbox' name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " value='" + strOptionValue + "'" + (strOptionValue.equalsIgnoreCase(((Vector)vt.get(i)).get(16).toString())?" checked":"") + ">" + strOptionText;
- if(k < strOption.length-1)
- {
- if(strOptionText.length()>20)
- strFormObject+="<br>";
- else
- strFormObject+=" ";
- }
- }
- }
- else
- {
- strFormObject="该复选框设置有问题,请与管理员联系!";
- }
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("Select"))
- {
- strFormObject = ((Vector)vt.get(i)).get(6).toString();
- String[] strOption = strFormObject.split("《,》");
- if(strOption.length>1)
- {
- strFormObject="<select name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " size='1'>";
- for(int k=0;k<strOption.length;k++)
- {
- String strOptionText="";
- String strOptionValue="";
- if(strOption[k].indexOf("《¥》")>0)
- {
- strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
- strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
- }
- else
- {
- strOptionText=strOption[k];
- strOptionValue=strOption[k];
- }
- strFormObject+="<option value='" + strOptionValue + "'" + (strOptionValue.equalsIgnoreCase(((Vector)vt.get(i)).get(16).toString())?" selected":"") + ">" + strOptionText + "</option>";
- }
- }
- else
- {
- strFormObject="该下拉列表设置有问题,请与管理员联系!";
- }
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("List"))
- {
- strFormObject = ((Vector)vt.get(i)).get(6).toString();
- String[] strOption = strFormObject.split("《,》");
- if(strOption.length>1)
- {
- strFormObject="<select name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " size='3' multiple>";
- for(int k=0;k<strOption.length;k++)
- {
- String strOptionText="";
- String strOptionValue="";
- if(strOption[k].indexOf("《¥》")>0)
- {
- strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
- strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
- }
- else
- {
- strOptionText=strOption[k];
- strOptionValue=strOption[k];
- }
- strFormObject+="<option value='" + strOptionValue + "'" + (strOptionValue.equalsIgnoreCase(((Vector)vt.get(i)).get(16).toString())?" selected":"") + ">" + strOptionText + "</option>";
- }
- }
- else
- {
- strFormObject="该多选列表设置有问题,请与管理员联系!";
- }
- }
- else if(((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("ACC"))
- {
- strFormObject="<input type='text' id='" + ((Vector)vt.get(i)).get(3).toString() + "' name='" + ((Vector)vt.get(i)).get(3).toString() + "' " + ((Vector)vt.get(i)).get(5).toString() + " value='" + ((Vector)vt.get(i)).get(16).toString() + "' maxlength='" + ((Vector)vt.get(i)).get(15).toString() + "' size='30'><input type=button value='添加' onclick='return uploadacc(document.all." + ((Vector)vt.get(i)).get(3).toString() + ")';>";
- }
- out.println("<td align="left" valign="middle" nowrap>" + strFormObject + " </td>");
- //out.println("<td align="left" valign="middle">" + ((Vector)vt.get(i)).get(7).toString() + " </td>");
- String strIsHot = "";
- if (((Vector)vt.get(i)).get(11).toString().equalsIgnoreCase("true")) {strIsHot="是";} else {strIsHot="否";}
- out.println("<td align="center" valign="middle" nowrap>"+strIsHot+"</td>");
- out.println("<td align="center" valign="middle" nowrap><a href="EditDocTempletFields.jsp?SysDirID=" + iSysDirID + "&TempletID=" + iDocTempletID + "&ID=" + strID + "">修改</a></td>");
- out.println("<td align="center" valign="middle" nowrap><a href="DelDocTempletFields.jsp?SysDirID=" + iSysDirID + "&TempletID=" + iDocTempletID + "&ID=" + strID + "" onclick="return confirm('您确实要删除该字段吗?');">删除</a></td>");
- out.println("</tr>");
- }
- %>
- </form>
- <tr>
- <th align="center" valign="top" colspan="6">
- <%
- if(iPage<2)
- out.print("首页 上页");
- else
- out.print("<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + 1 + "&ID=" + iDocTempletID + "">首页</a> <a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage-1) + "&ID=" + iDocTempletID + "">上页</a>");
- out.print(" 当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页 ");
- if(iPage>=iPageCount)
- out.print("下页 末页");
- else
- out.print("<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage+1) + "&ID=" + iDocTempletID + "">下页</a> <a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + iPageCount + "&ID=" + iDocTempletID + "">末页</a>");
- %>
- </th>
- <th colspan="2">
- <a href="AddDocTempletFields.jsp?SysDirID=<%=iSysDirID%>&TempletID=<%=iDocTempletID%>">新增字段</a>
- </th>
- </tr>
- </table>
- <table width="90%" border="0">
- <tr>
- <td>
- </td>
- </tr>
- <tr>
- <td width="90%">
- </td>
- <td nowrap="nowrap" align="right" valign="middle" style=""><a href="DocumentTempletManage.jsp?SysDirID=<%=iSysDirID%>"><font color="<%=m_session.GetString("TitleColor")%>"><strong>返回公文模版管理 </strong></font></a>
- </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>