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

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. <%
  5. Session m_session = new Session(session);
  6. int intUserID = m_session.GetInt("UserID");
  7. Request m_request = new Request(request);
  8. String strIp = request.getRemoteAddr();
  9. String strDocTempletTableName = "DocumentTemplet";
  10. int intDocumentID = m_request.GetInt("ID");
  11. int iSysDirID = m_request.GetInt("SysDirID");
  12. if(intDocumentID <1)
  13. {
  14. %>
  15. <script language="JavaScript" type="text/JavaScript">
  16. alert("请选择正确的公文,处理失败!");
  17. history.back();
  18. </script>
  19. <%
  20. }
  21. else
  22. {
  23.   String strDocumentID = intDocumentID + "";
  24.   //根据公文ID取公文信息
  25.   Vector Document_vt = DocumentManagerPlus.getRecordByIDAll(strDocumentID);
  26.   String strDTMFID = ((Vector)Document_vt.get(0)).get(2).toString();
  27.   String strDocument_Name = ((Vector)Document_vt.get(0)).get(1).toString();
  28.   String strCurrentTache = ((Vector)Document_vt.get(0)).get(7).toString();
  29.   //根据公文流转模板ID取公文流转模板信息
  30.   Vector DTMF_vt = DocTempletMoveFlowManager.getRecordBySearch(strDTMFID,strDocTempletTableName);
  31.   int intDocTempletID = Integer.parseInt(((Vector)DTMF_vt.get(0)).get(2).toString());
  32.   String strMoveFlowID = ((Vector)DTMF_vt.get(0)).get(4).toString();
  33.   String strDocTempletID = intDocTempletID + "";
  34.   //根据流转模板ID取流转环节信息
  35.   Vector FTIC_vt = FlowTacheInfoManager.getRecordBySearch(strCurrentTache,"","","","","","","","","","","","","","","","","");
  36.   Vector FTIN_vt = FlowTacheInfoManager.getRecordBySearch("","",strCurrentTache,"","","","","","","","","","","","","","","");
  37.   //根据公文模板ID取公文模板信息
  38.   Vector DocTemplet_vt = DocumentTempletManager.getRecordByID(intDocTempletID);
  39.   String strDocTempletName = ((Vector)DocTemplet_vt.get(0)).get(1).toString();
  40.   String strDocTempletEngName = ((Vector)DocTemplet_vt.get(0)).get(5).toString();
  41.   //根据公文模板ID取公文模板字段信息
  42.   Vector DTField_vt = DocTempletFieldsManager.getRecordBySearch("","","","","","","","","","","","True","","",strDocTempletID,"","","","OrderNumber","");
  43.   if (DTField_vt.size()>0)
  44.   {
  45. %>
  46. <html>
  47. <head>
  48. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  49. <title>公文处理管理-- GForce OA 2.0</title>
  50. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  51. <script language="JavaScript" src="/js/changestyle.js"></script>
  52. <script language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></script>
  53. <script language="JavaScript" type="text/javascript">
  54. </script>
  55. </head>
  56. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  57. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  58.   <tr>
  59.      <td  align="center" valign="top"><p>&nbsp;</p>
  60.      <%
  61.           out.println("<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%">");
  62.             out.println("<tr>");
  63.             out.println("<td align="center" valign="top"><font color="#0A0A0A"><b>" + strDocument_Name + "</b></font></td></tr>");
  64.             out.println("<tr><td>&nbsp</td></tr>");
  65.             out.println("<tr><td>&nbsp</td></tr></table>");
  66.             out.println("<table align="center" border="1" cellspacing="2" width="90%" cellpadding="3" bordercolordark="#ffffff" bordercolorlight="#0a0a0a">");
  67.             out.println("<tr align="center" valign="middle" bgcolor="" + m_session.GetString("TitleColor") + ""><th>项  目&nbsp</th><th>报 表 内 容&nbsp</th><th>字 段 描 述&nbsp</th></tr>");
  68.             for (int i=0,j=0;i<DTField_vt.size();i++)
  69.             {
  70.               String strFormObject = "";
  71.                 String strFieldValue = "";
  72.                 boolean bReadOnly = true;
  73.                 Vector DocFieldsValue_vt = DocFieldsValueManager.getRecordBySearch("",strDocumentID,"",((Vector)DTField_vt.get(i)).get(0).toString(),"","","a.[ApproveFlowID]","True");
  74.                 if (DocFieldsValue_vt.size()>0)
  75.                 {
  76.                   strFieldValue = ((Vector)DocFieldsValue_vt.get(0)).get(3).toString();
  77.                 }
  78.                 else
  79.                 {
  80.                   strFieldValue = "";
  81.                 }
  82.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("String"))
  83.                 {
  84.                     strFormObject = "" + strFieldValue + "";
  85.                 }
  86.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Text"))
  87.                 {
  88.                     strFormObject = "" + strFieldValue + "";
  89.                 }
  90.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Name"))
  91.                 {
  92.                     strFormObject = "" + strFieldValue + "";
  93.                 }
  94.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Optime"))
  95.                 {
  96.                     strFormObject = "" + strFieldValue + "";
  97.                 }
  98.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Read"))
  99.                 {
  100.                    strFormObject="" + strFieldValue + "";
  101.                 }
  102.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Numeric"))
  103.                 {
  104.                     strFormObject="" + strFieldValue + "";
  105.                 }
  106.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Date"))
  107.                 {
  108.                     strFormObject="" + strFieldValue + "";
  109.                 }
  110.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Radio"))
  111.                 {
  112.                  strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
  113.                  String[] strOption = strFormObject.split("《,》");
  114.                  if(strOption.length>1)
  115.                   {
  116.                     strFormObject="";
  117.                     for(int k=0;k<strOption.length;k++)
  118.                     {
  119.                       String strOptionText="";
  120.                       String strOptionValue="";
  121.                       if(strOption[k].indexOf("《¥》")>0)
  122.                        {
  123.                          strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
  124.                          strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
  125.                        }
  126.                       else
  127.                        {
  128.                          strOptionText=strOption[k];
  129.                          strOptionValue=strOption[k];
  130.                        }
  131.                       strFormObject+="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
  132.                         if(k < strOption.length-1)
  133.                          {
  134.                              strFormObject+=",";
  135.                          }
  136.                      }
  137.                    }
  138.                   else
  139.                    {
  140.                     strFormObject="该单选按钮设置有问题,请与管理员联系!";
  141.                    }
  142.                 }
  143.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("checkbox"))
  144.                 {
  145.                   strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
  146.                   String[] strOption = strFormObject.split("《,》");
  147.                   if(strOption.length>1)
  148.                    {
  149.                      strFormObject="";
  150.                      for(int k=0;k<strOption.length;k++)
  151.                       {
  152.                         String strOptionText="";
  153.                         String strOptionValue="";
  154.                         if(strOption[k].indexOf("《¥》")>0)
  155.                          {
  156.                            strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
  157.                            strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
  158.                          }
  159.                         else
  160.                          {
  161.                            strOptionText=strOption[k];
  162.                            strOptionValue=strOption[k];
  163.                          }
  164.                         strFormObject+="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
  165.                         if(k < strOption.length-1)
  166.                          {
  167.                              strFormObject+=",";
  168.                          }
  169.                        }
  170.                      }
  171.                   else
  172.                    {
  173.                      strFormObject="该复选框设置有问题,请与管理员联系!";
  174.                    }
  175.                   }
  176.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Select"))
  177.                 {
  178.                     strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
  179.                     String[] strOption = strFormObject.split("《,》");
  180.                     if(strOption.length>1)
  181.                      {
  182.                      for(int k=0;k<strOption.length;k++)
  183.                       {
  184.                         String strOptionText="";
  185.                         String strOptionValue="";
  186.                         if(strOption[k].indexOf("《¥》")>0)
  187.                          {
  188.                            strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
  189.                            strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
  190.                          }
  191.                         else
  192.                          {
  193.                            strOptionText=strOption[k];
  194.                            strOptionValue=strOption[k];
  195.                          }
  196.                         strFormObject+="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
  197.                         if(k < strOption.length-1)
  198.                          {
  199.                              strFormObject+=",";
  200.                          }
  201.                        }
  202.                     }
  203.                     else
  204.                     {
  205.                      strFormObject="该下拉列表设置有问题,请与管理员联系!";
  206.                      }
  207.                 }
  208.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("List"))
  209.                 {
  210.                   strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
  211.                   String[] strOption = strFormObject.split("《,》");
  212.                   if(strOption.length>1)
  213.                    {
  214.                      for(int k=0;k<strOption.length;k++)
  215.                       {
  216.                         String strOptionText="";
  217.                         String strOptionValue="";
  218.                         if(strOption[k].indexOf("《¥》")>0)
  219.                          {
  220.                            strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
  221.                            strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
  222.                          }
  223.                         else
  224.                          {
  225.                            strOptionText=strOption[k];
  226.                            strOptionValue=strOption[k];
  227.                          }
  228.                         strFormObject="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
  229.                         if(k < strOption.length-1)
  230.                          {
  231.                              strFormObject+=",";
  232.                          }
  233.                        }
  234.                       }
  235.                   else
  236.                    {
  237.                      strFormObject="该多选列表设置有问题,请与管理员联系!";
  238.                    }
  239.                 }
  240.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("ACC"))
  241.                 {
  242.                   if(strFieldValue.trim().length()>0)
  243.                   {
  244.                     strFormObject ="<a href=""+  strFieldValue + "" target="_blank">下载附件</a>";
  245.                   }
  246.                   else
  247.                   {
  248.                     strFormObject ="";
  249.                   }
  250.                 }
  251.                  j=j+1;
  252.                  if(j % 2 == 0)
  253.                   {
  254.                     out.println("<tr id="Row"+ j + "" class="DataRowsSingle">");
  255.                   }
  256.                  else
  257.                   {
  258.                     out.println("<tr id="Row"+ j + "" class="DataRowsDouble">");
  259.                   }
  260.                   out.println("<td width="15%" align="right" valign="middle" nowrap><font color="#0A0A0A">"+((Vector)DTField_vt.get(i)).get(1).toString()+":</font></td>");
  261.                   out.println("<td width="60%" align="left" valign="middle">");
  262.                   out.println(strFormObject);
  263.                   out.println("&nbsp;</td><td width="25%" align="left" valign="middle"><font color="#0A0A0A">"+((Vector)DTField_vt.get(i)).get(7).toString()+"&nbsp</font></td>");
  264.                   out.println("</tr>");
  265.             }
  266.           out.println("<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%">");
  267.           out.println("<tr><td>&nbsp;");
  268.           out.println("</td></tr>");
  269.           out.println("<tr>");
  270.           out.println("<td align="right" valign="middle" nowrap colspan="3">");
  271.           out.println("<input type="button" value="关闭窗口" onclick="window.close();" style="background-color: #FFFFFF; border: 1 solid #000000">");
  272.           out.println("</td></tr>");
  273.           out.println("</table>");
  274.           out.println("</table>");
  275.      %>
  276.      </td>
  277.   </tr>
  278. </table>
  279. </body>
  280. </html>
  281. <%
  282. }
  283. else
  284. {
  285. %>
  286. <script language="JavaScript" type="text/JavaScript">
  287. alert("该公文没有字段或所有字段已经被删除,处理失败!");
  288. history.back();
  289. </script>
  290. <%
  291. }
  292. }
  293. %>