ShowDocumentAllInfo.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:14k
源码类别:
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);
- int intUserID = m_session.GetInt("UserID");
- Request m_request = new Request(request);
- String strIp = request.getRemoteAddr();
- String strDocTempletTableName = "DocumentTemplet";
- int intDocumentID = m_request.GetInt("ID");
- int iSysDirID = m_request.GetInt("SysDirID");
- if(intDocumentID <1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("请选择正确的公文,处理失败!");
- history.back();
- </script>
- <%
- }
- else
- {
- String strDocumentID = intDocumentID + "";
- //根据公文ID取公文信息
- Vector Document_vt = DocumentManagerPlus.getRecordByIDAll(strDocumentID);
- String strDTMFID = ((Vector)Document_vt.get(0)).get(2).toString();
- String strDocument_Name = ((Vector)Document_vt.get(0)).get(1).toString();
- String strCurrentTache = ((Vector)Document_vt.get(0)).get(7).toString();
- //根据公文流转模板ID取公文流转模板信息
- Vector DTMF_vt = DocTempletMoveFlowManager.getRecordBySearch(strDTMFID,strDocTempletTableName);
- int intDocTempletID = Integer.parseInt(((Vector)DTMF_vt.get(0)).get(2).toString());
- String strMoveFlowID = ((Vector)DTMF_vt.get(0)).get(4).toString();
- String strDocTempletID = intDocTempletID + "";
- //根据流转模板ID取流转环节信息
- Vector FTIC_vt = FlowTacheInfoManager.getRecordBySearch(strCurrentTache,"","","","","","","","","","","","","","","","","");
- Vector FTIN_vt = FlowTacheInfoManager.getRecordBySearch("","",strCurrentTache,"","","","","","","","","","","","","","","");
- //根据公文模板ID取公文模板信息
- Vector DocTemplet_vt = DocumentTempletManager.getRecordByID(intDocTempletID);
- String strDocTempletName = ((Vector)DocTemplet_vt.get(0)).get(1).toString();
- String strDocTempletEngName = ((Vector)DocTemplet_vt.get(0)).get(5).toString();
- //根据公文模板ID取公文模板字段信息
- Vector DTField_vt = DocTempletFieldsManager.getRecordBySearch("","","","","","","","","","","","True","","",strDocTempletID,"","","","OrderNumber","");
- if (DTField_vt.size()>0)
- {
- %>
- <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>
- <script language="JavaScript" type="text/javascript">
- </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>
- <%
- out.println("<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%">");
- out.println("<tr>");
- out.println("<td align="center" valign="top"><font color="#0A0A0A"><b>" + strDocument_Name + "</b></font></td></tr>");
- out.println("<tr><td> </td></tr>");
- out.println("<tr><td> </td></tr></table>");
- out.println("<table align="center" border="1" cellspacing="2" width="90%" cellpadding="3" bordercolordark="#ffffff" bordercolorlight="#0a0a0a">");
- out.println("<tr align="center" valign="middle" bgcolor="" + m_session.GetString("TitleColor") + ""><th>项 目 </th><th>报 表 内 容 </th><th>字 段 描 述 </th></tr>");
- for (int i=0,j=0;i<DTField_vt.size();i++)
- {
- String strFormObject = "";
- String strFieldValue = "";
- boolean bReadOnly = true;
- Vector DocFieldsValue_vt = DocFieldsValueManager.getRecordBySearch("",strDocumentID,"",((Vector)DTField_vt.get(i)).get(0).toString(),"","","a.[ApproveFlowID]","True");
- if (DocFieldsValue_vt.size()>0)
- {
- strFieldValue = ((Vector)DocFieldsValue_vt.get(0)).get(3).toString();
- }
- else
- {
- strFieldValue = "";
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("String"))
- {
- strFormObject = "" + strFieldValue + "";
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Text"))
- {
- strFormObject = "" + strFieldValue + "";
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Name"))
- {
- strFormObject = "" + strFieldValue + "";
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Optime"))
- {
- strFormObject = "" + strFieldValue + "";
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Read"))
- {
- strFormObject="" + strFieldValue + "";
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Numeric"))
- {
- strFormObject="" + strFieldValue + "";
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Date"))
- {
- strFormObject="" + strFieldValue + "";
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Radio"))
- {
- strFormObject = ((Vector)DTField_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+="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
- if(k < strOption.length-1)
- {
- strFormObject+=",";
- }
- }
- }
- else
- {
- strFormObject="该单选按钮设置有问题,请与管理员联系!";
- }
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("checkbox"))
- {
- strFormObject = ((Vector)DTField_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+="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
- if(k < strOption.length-1)
- {
- strFormObject+=",";
- }
- }
- }
- else
- {
- strFormObject="该复选框设置有问题,请与管理员联系!";
- }
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Select"))
- {
- strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
- String[] strOption = strFormObject.split("《,》");
- if(strOption.length>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+="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
- if(k < strOption.length-1)
- {
- strFormObject+=",";
- }
- }
- }
- else
- {
- strFormObject="该下拉列表设置有问题,请与管理员联系!";
- }
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("List"))
- {
- strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
- String[] strOption = strFormObject.split("《,》");
- if(strOption.length>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="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
- if(k < strOption.length-1)
- {
- strFormObject+=",";
- }
- }
- }
- else
- {
- strFormObject="该多选列表设置有问题,请与管理员联系!";
- }
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("ACC"))
- {
- if(strFieldValue.trim().length()>0)
- {
- strFormObject ="<a href=""+ strFieldValue + "" target="_blank">下载附件</a>";
- }
- else
- {
- strFormObject ="";
- }
- }
- j=j+1;
- if(j % 2 == 0)
- {
- out.println("<tr id="Row"+ j + "" class="DataRowsSingle">");
- }
- else
- {
- out.println("<tr id="Row"+ j + "" class="DataRowsDouble">");
- }
- out.println("<td width="15%" align="right" valign="middle" nowrap><font color="#0A0A0A">"+((Vector)DTField_vt.get(i)).get(1).toString()+":</font></td>");
- out.println("<td width="60%" align="left" valign="middle">");
- out.println(strFormObject);
- out.println(" </td><td width="25%" align="left" valign="middle"><font color="#0A0A0A">"+((Vector)DTField_vt.get(i)).get(7).toString()+" </font></td>");
- out.println("</tr>");
- }
- out.println("<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%">");
- out.println("<tr><td> ");
- out.println("</td></tr>");
- out.println("<tr>");
- out.println("<td align="right" valign="middle" nowrap colspan="3">");
- out.println("<input type="button" value="关闭窗口" onclick="window.close();" style="background-color: #FFFFFF; border: 1 solid #000000">");
- out.println("</td></tr>");
- out.println("</table>");
- out.println("</table>");
- %>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该公文没有字段或所有字段已经被删除,处理失败!");
- history.back();
- </script>
- <%
- }
- }
- %>