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

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. int iVType = m_request.GetInt("VType");
  13. if(intDocumentID <1)
  14. {
  15. %>
  16. <script language="JavaScript" type="text/JavaScript">
  17. alert("请选择正确的公文,处理失败!");
  18. history.back();
  19. </script>
  20. <%
  21. }
  22. else
  23. {
  24.   String strDocumentID = intDocumentID + "";
  25.   //根据公文ID取公文信息
  26.   Vector Document_vt = DocumentManagerPlus.getRecordByIDAll(strDocumentID);
  27.   String strDTMFID = ((Vector)Document_vt.get(0)).get(2).toString();
  28.   String strDocument_Name = ((Vector)Document_vt.get(0)).get(1).toString();
  29.   String strCurrentTache = ((Vector)Document_vt.get(0)).get(7).toString();
  30.   //根据公文流转模板ID取公文流转模板信息
  31.   Vector DTMF_vt = DocTempletMoveFlowManager.getRecordBySearch(strDTMFID,strDocTempletTableName);
  32.   int intDocTempletID = Integer.parseInt(((Vector)DTMF_vt.get(0)).get(2).toString());
  33.   String strMoveFlowID = ((Vector)DTMF_vt.get(0)).get(4).toString();
  34.   String strDocTempletID = intDocTempletID + "";
  35.   //根据流转模板ID取流转环节信息
  36.   Vector FTIC_vt = FlowTacheInfoManager.getRecordBySearch(strCurrentTache,"","","","","","","","","","","","","","","","","");
  37.   Vector FTIN_vt = FlowTacheInfoManager.getRecordBySearch("","",strCurrentTache,"","","","","","","","","","","","","","","");
  38.   //根据公文模板ID取公文模板信息
  39.   Vector DocTemplet_vt = DocumentTempletManager.getRecordByID(intDocTempletID);
  40.   String strDocTempletName = ((Vector)DocTemplet_vt.get(0)).get(1).toString();
  41.   String strDocTempletEngName = ((Vector)DocTemplet_vt.get(0)).get(5).toString();
  42.   //根据公文模板ID取公文模板字段信息
  43.   Vector DTField_vt = DocTempletFieldsManager.getRecordBySearch("","","","","","","","","","","","True","","",strDocTempletID,"","","","OrderNumber","");
  44.   if (DTField_vt.size()>0)
  45.   {
  46. %>
  47. <html>
  48. <head>
  49. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  50. <title>公文处理管理-- GForce OA 2.0</title>
  51. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  52. <script language="JavaScript" src="/js/changestyle.js"></script>
  53. <script language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></script>
  54. <script language="JavaScript" type="text/javascript">
  55. </script>
  56. </head>
  57. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  58.   <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  59.     <tr>
  60.     <td align="center" valign="top">
  61.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  62.         <tr>
  63.           <td height="50" valign="top" background="../images/dy-back.gif">
  64.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  65.               <tr valign="middle">
  66.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  67.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">工作报表</font></strong></td>
  68.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  69.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  70.                  <!--<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  71.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  72.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  73.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  74.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  75.                 </td>
  76.               </tr>
  77.             </table>
  78.           </td>
  79.         </tr>
  80.       </table>
  81. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  82.   <tr>
  83.      <td  align="center" valign="top"><p>&nbsp;</p>
  84.      <%
  85.           out.println("<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%">");
  86.             out.println("<tr>");
  87.             out.println("<td align="center" valign="top"><font color="#0A0A0A"><b>" + strDocument_Name + "</b></font></td></tr>");
  88.             out.println("<tr><td>&nbsp</td></tr>");
  89.             out.println("<tr><td>&nbsp</td></tr></table>");
  90.             out.println("<table align="center" border="1" cellspacing="2" width="90%" cellpadding="3" bordercolordark="#ffffff" bordercolorlight="#0a0a0a">");
  91.             out.println("<tr align="center" valign="middle" bgcolor="" + m_session.GetString("TitleColor") + ""><th>项  目&nbsp</th><th>报 表 内 容&nbsp</th><th>字 段 描 述&nbsp</th></tr>");
  92.             for (int i=0,j=0;i<DTField_vt.size();i++)
  93.             {
  94.               if ((("," + ((Vector)DTField_vt.get(i)).get(10).toString() + ",").indexOf("," + intUserID + ",")>=0)||(("," + ((Vector)DTField_vt.get(i)).get(9).toString() + ",").indexOf("," + intUserID + ",")>=0))
  95.               {
  96.                 String strFormObject = "";
  97.                 String strFieldValue = "";
  98.                 boolean bReadOnly = true;
  99.                 Vector DocFieldsValue_vt = DocFieldsValueManager.getRecordBySearch("",strDocumentID,"",((Vector)DTField_vt.get(i)).get(0).toString(),"","","a.[ApproveFlowID]","True");
  100.                 if (DocFieldsValue_vt.size()>0)
  101.                 {
  102.                   strFieldValue = ((Vector)DocFieldsValue_vt.get(0)).get(3).toString();
  103.                 }
  104.                 else
  105.                 {
  106.                   strFieldValue = "";
  107.                   //strFieldValue = ((Vector)DTField_vt.get(i)).get(16).toString();
  108.                 }
  109.                 if ((("," + ((Vector)DTField_vt.get(i)).get(9).toString() + ",").indexOf("," + intUserID + ",")>=0))
  110.                 {
  111.                   bReadOnly=false;
  112.                 }
  113.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("String"))
  114.                 {
  115.                     strFormObject = "" + strFieldValue + "";
  116.                 }
  117.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Text"))
  118.                 {
  119.                     strFormObject = "" + strFieldValue + "";
  120.                 }
  121.                 if (bReadOnly==false)
  122.                 {
  123.                   if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Name"))
  124.                   {
  125.                     //strFormObject=UserManager.getPersonnelNameByUserID(intUserID);
  126.                     strFormObject=strFieldValue;
  127.                   }
  128.                   if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Optime"))
  129.                   {
  130.                     //java.util.Date t_Date = new java.util.Date();
  131.                     //strFormObject=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm");
  132.                     strFormObject=StringNew.GetDateString(strFieldValue,"yyyy-MM-dd HH:mm");
  133.                   }
  134.                 }
  135.                 else
  136.                 {
  137.                   if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Name"))
  138.                   {
  139.                     strFormObject=strFieldValue;
  140.                   }
  141.                   if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Optime"))
  142.                   {
  143.                     java.util.Date t_Date = new java.util.Date();
  144.                     strFormObject=StringNew.GetDateString(strFieldValue,"yyyy-MM-dd HH:mm");
  145.                   }
  146.                 }
  147.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Read"))
  148.                 {
  149.                    strFormObject="" + strFieldValue + "";
  150.                 }
  151.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Numeric"))
  152.                 {
  153.                     strFormObject="" + strFieldValue + "";
  154.                 }
  155.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Date"))
  156.                 {
  157.                     strFormObject="" + strFieldValue + "";
  158.                 }
  159.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Radio"))
  160.                 {
  161.                  strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
  162.                  String[] strOption = strFormObject.split("《,》");
  163.                  if(strOption.length>1)
  164.                   {
  165.                     strFormObject="";
  166.                     for(int k=0;k<strOption.length;k++)
  167.                     {
  168.                       String strOptionText="";
  169.                       String strOptionValue="";
  170.                       if(strOption[k].indexOf("《¥》")>0)
  171.                        {
  172.                          strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
  173.                          strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
  174.                        }
  175.                       else
  176.                        {
  177.                          strOptionText=strOption[k];
  178.                          strOptionValue=strOption[k];
  179.                        }
  180.                       strFormObject+="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
  181.                      }
  182.                    }
  183.                   else
  184.                    {
  185.                     strFormObject="该单选按钮设置有问题,请与管理员联系!";
  186.                    }
  187.                 }
  188.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("checkbox"))
  189.                 {
  190.                   strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
  191.                   String[] strOption = strFormObject.split("《,》");
  192.                   if(strOption.length>1)
  193.                    {
  194.                      strFormObject="";
  195.                      for(int k=0;k<strOption.length;k++)
  196.                       {
  197.                         String strOptionText="";
  198.                         String strOptionValue="";
  199.                         if(strOption[k].indexOf("《¥》")>0)
  200.                          {
  201.                            strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
  202.                            strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
  203.                          }
  204.                         else
  205.                          {
  206.                            strOptionText=strOption[k];
  207.                            strOptionValue=strOption[k];
  208.                          }
  209.                         strFormObject+="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
  210.                         if(k < strOption.length-1)
  211.                          {
  212.                            if(strOptionText.length()>20)
  213.                              strFormObject+="";
  214.                            else
  215.                              strFormObject+="&nbsp;&nbsp;&nbsp;";
  216.                          }
  217.                        }
  218.                      }
  219.                   else
  220.                    {
  221.                      strFormObject="该复选框设置有问题,请与管理员联系!";
  222.                    }
  223.                   }
  224.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Select"))
  225.                 {
  226.                   strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
  227.                   String[] strOption = strFormObject.split("《,》");
  228.                   if(strOption.length>1)
  229.                    {
  230.                      strFormObject="<select name='" + ((Vector)DTField_vt.get(i)).get(3).toString() + "' " + ((Vector)DTField_vt.get(i)).get(5).toString() + " size='1' " + "disabled" + ">";
  231.                      for(int k=0;k<strOption.length;k++)
  232.                       {
  233.                         String strOptionText="";
  234.                         String strOptionValue="";
  235.                         if(strOption[k].indexOf("《¥》")>0)
  236.                          {
  237.                            strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
  238.                            strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
  239.                          }
  240.                         else
  241.                          {
  242.                            strOptionText=strOption[k];
  243.                            strOptionValue=strOption[k];
  244.                          }
  245.                         strFormObject="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
  246.                         if(k < strOption.length-1)
  247.                          {
  248.                            if(strOptionText.length()>20)
  249.                              strFormObject+="";
  250.                            else
  251.                              strFormObject+="&nbsp;&nbsp;&nbsp;";
  252.                          }
  253.                        }
  254.                      }
  255.                   else
  256.                    {
  257.                      strFormObject="该下拉列表设置有问题,请与管理员联系!";
  258.                    }
  259.                   }
  260.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("List"))
  261.                 {
  262.                   strFormObject = ((Vector)DTField_vt.get(i)).get(6).toString();
  263.                   String[] strOption = strFormObject.split("《,》");
  264.                   if(strOption.length>1)
  265.                    {
  266.                      strFormObject="<select name='" + ((Vector)DTField_vt.get(i)).get(3).toString() + "' " + ((Vector)DTField_vt.get(i)).get(5).toString() + " size='3' multiple " + (bReadOnly?"disabled":"") + ">";
  267.                      for(int k=0;k<strOption.length;k++)
  268.                       {
  269.                         String strOptionText="";
  270.                         String strOptionValue="";
  271.                         if(strOption[k].indexOf("《¥》")>0)
  272.                          {
  273.                            strOptionText=strOption[k].substring(0,strOption[k].indexOf("《¥》"));
  274.                            strOptionValue=strOption[k].substring(strOption[k].indexOf("《¥》")+3);
  275.                          }
  276.                         else
  277.                          {
  278.                            strOptionText=strOption[k];
  279.                            strOptionValue=strOption[k];
  280.                          }
  281.                         strFormObject="" + (strOptionValue.equalsIgnoreCase(strFieldValue)?strOptionText:"") + "";
  282.                         if(k < strOption.length-1)
  283.                          {
  284.                           if(strOptionText.length()>20)
  285.                             strFormObject+="";
  286.                           else
  287.                             strFormObject+="&nbsp;&nbsp;&nbsp;";
  288.                          }
  289.                        }
  290.                       }
  291.                   else
  292.                    {
  293.                      strFormObject="该多选列表设置有问题,请与管理员联系!";
  294.                    }
  295.                   }
  296.                 if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("ACC"))
  297.                 {
  298.                   strFormObject="<input type='text' id='" + ((Vector)DTField_vt.get(i)).get(3).toString() + "' name='" + ((Vector)DTField_vt.get(i)).get(3).toString() + "' " + ((Vector)DTField_vt.get(i)).get(5).toString() + " value='" + strFieldValue + "' maxlength='" + ((Vector)DTField_vt.get(i)).get(15).toString() + "' size='30'><input type=button";
  299.                   if(bReadOnly)
  300.                   {
  301.                     strFormObject +=" disabled='true'";
  302.                   }
  303.                   else
  304.                   {
  305.                     strFormObject +=" onclick='return uploadacc(document.all." + ((Vector)DTField_vt.get(i)).get(3).toString() + ")'";
  306.                   }
  307.                   if(strFieldValue.trim().length()>0)
  308.                   {
  309.                     strFormObject =""+  strFieldValue + ""下载附件";
  310.                   }
  311.                   else
  312.                   {
  313.                     strFormObject ="";
  314.                   }
  315.                 }
  316.                 if (strFormObject.trim().length()>0)
  317.                 {
  318.                  j=j+1;
  319.                  if(j % 2 == 0)
  320.                   {
  321.                     out.println("<tr id="Row"+ j + "" class="DataRowsSingle">");
  322.                   }
  323.                  else
  324.                   {
  325.                     out.println("<tr id="Row"+ j + "" class="DataRowsDouble">");
  326.                   }
  327.                   out.println("<td width="15%" align="right" valign="middle" nowrap><font color="#0A0A0A">"+((Vector)DTField_vt.get(i)).get(1).toString()+":</font></td>");
  328.                   out.println("<td width="60%" align="left" valign="middle">");
  329.                   out.println(strFormObject);
  330.                   out.println("</td><td width="25%" align="left" valign="middle"><font color="#0A0A0A">"+((Vector)DTField_vt.get(i)).get(7).toString()+"&nbsp</font></td>");
  331.                   out.println("</tr>");
  332.                 }
  333.               }
  334.             }
  335.           out.println("<table align="center" border="0" cellpadding="0" cellspacing="0" width="90%">");
  336.           out.println("<tr><td>&nbsp;");
  337.           out.println("</td></tr>");
  338.           out.println("<tr>");
  339.           out.println("<td align="right" valign="middle" nowrap colspan="3">");
  340.           if (iVType==1)
  341.           out.println("<input type="button" value="返回公文列表" onclick="history.back();" style="background-color: #FFFFFF; border: 1 solid #000000">");
  342.           else
  343.           out.println("<input type="button" value="返回公文列表" onclick="window.location='DocumentProcessManage.jsp?SysDirID=" + iSysDirID + "';" style="background-color: #FFFFFF; border: 1 solid #000000">");
  344.           out.println("</td></tr>");
  345.           out.println("</table>");
  346.           out.println("</table>");
  347.         out.println("</form>");
  348.      %>
  349.      </td>
  350.   </tr>
  351. </table>
  352. </body>
  353. </html>
  354. <%
  355. }
  356. else
  357. {
  358. %>
  359. <script language="JavaScript" type="text/JavaScript">
  360. alert("该公文没有字段或所有字段已经被删除,处理失败!");
  361. history.back();
  362. </script>
  363. <%
  364. }
  365. }
  366. %>