ShowDocument.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:19k
源码类别:
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");
- int iVType = m_request.GetInt("VType");
- 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">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td height="50" valign="top" background="../images/dy-back.gif">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr valign="middle">
- <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
- <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">工作报表</font></strong></td>
- <td align="right" nowrap="nowrap" valign="bottom">
- <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59"> -->
- <!--<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59"> -->
- <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59"> -->
- <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59"> -->
- <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59"> -->
- <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79"> -->
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <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++)
- {
- if ((("," + ((Vector)DTField_vt.get(i)).get(10).toString() + ",").indexOf("," + intUserID + ",")>=0)||(("," + ((Vector)DTField_vt.get(i)).get(9).toString() + ",").indexOf("," + intUserID + ",")>=0))
- {
- 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 = "";
- //strFieldValue = ((Vector)DTField_vt.get(i)).get(16).toString();
- }
- if ((("," + ((Vector)DTField_vt.get(i)).get(9).toString() + ",").indexOf("," + intUserID + ",")>=0))
- {
- bReadOnly=false;
- }
- 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 (bReadOnly==false)
- {
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Name"))
- {
- //strFormObject=UserManager.getPersonnelNameByUserID(intUserID);
- strFormObject=strFieldValue;
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Optime"))
- {
- //java.util.Date t_Date = new java.util.Date();
- //strFormObject=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm");
- strFormObject=StringNew.GetDateString(strFieldValue,"yyyy-MM-dd HH:mm");
- }
- }
- else
- {
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Name"))
- {
- strFormObject=strFieldValue;
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("Optime"))
- {
- java.util.Date t_Date = new java.util.Date();
- strFormObject=StringNew.GetDateString(strFieldValue,"yyyy-MM-dd HH:mm");
- }
- }
- 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:"") + "";
- }
- }
- 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)
- {
- if(strOptionText.length()>20)
- strFormObject+="";
- else
- 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)
- {
- strFormObject="<select name='" + ((Vector)DTField_vt.get(i)).get(3).toString() + "' " + ((Vector)DTField_vt.get(i)).get(5).toString() + " size='1' " + "disabled" + ">";
- 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)
- {
- if(strOptionText.length()>20)
- strFormObject+="";
- else
- 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)
- {
- strFormObject="<select name='" + ((Vector)DTField_vt.get(i)).get(3).toString() + "' " + ((Vector)DTField_vt.get(i)).get(5).toString() + " size='3' multiple " + (bReadOnly?"disabled":"") + ">";
- 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)
- {
- if(strOptionText.length()>20)
- strFormObject+="";
- else
- strFormObject+=" ";
- }
- }
- }
- else
- {
- strFormObject="该多选列表设置有问题,请与管理员联系!";
- }
- }
- if (((Vector)DTField_vt.get(i)).get(2).toString().equalsIgnoreCase("ACC"))
- {
- 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";
- if(bReadOnly)
- {
- strFormObject +=" disabled='true'";
- }
- else
- {
- strFormObject +=" onclick='return uploadacc(document.all." + ((Vector)DTField_vt.get(i)).get(3).toString() + ")'";
- }
- if(strFieldValue.trim().length()>0)
- {
- strFormObject =""+ strFieldValue + ""下载附件";
- }
- else
- {
- strFormObject ="";
- }
- }
- if (strFormObject.trim().length()>0)
- {
- 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">");
- if (iVType==1)
- out.println("<input type="button" value="返回公文列表" onclick="history.back();" style="background-color: #FFFFFF; border: 1 solid #000000">");
- else
- out.println("<input type="button" value="返回公文列表" onclick="window.location='DocumentProcessManage.jsp?SysDirID=" + iSysDirID + "';" style="background-color: #FFFFFF; border: 1 solid #000000">");
- out.println("</td></tr>");
- out.println("</table>");
- out.println("</table>");
- out.println("</form>");
- %>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该公文没有字段或所有字段已经被删除,处理失败!");
- history.back();
- </script>
- <%
- }
- }
- %>