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

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*,java.net.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int intAssetID = m_request.GetInt("ID");
  7. int iTypesID = m_request.GetInt("TypesID");
  8. int iSysDirID = m_request.GetInt("SysDirID");
  9. if(intAssetID<1)
  10. {
  11. %>
  12. <script language="JavaScript" type="text/JavaScript">
  13. alert("请选择正确的资产,修改失败!");
  14. history.back();
  15. </script>
  16. <%
  17. }
  18. else
  19. {
  20. Vector vt = AssetManager.getByIDRecord(intAssetID);
  21. if(vt.size() == 1)
  22. {
  23. %>
  24. <html>
  25. <head>
  26. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  27. <title>资产管理-- GForce OA 2.0</title>
  28. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  29. </head>
  30. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  31. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  32.     <tr>
  33.         <td align="center" valign="top"><p>&nbsp;</p>
  34.             <form name="EditAsset" action="/Operation/EditAssetAction.jsp?SysDirID=<%=iSysDirID%>&TypesID=<%=iTypesID%>" method="post" onSubmit="javascript:return CheckEditAsset();">
  35.         <table  border="0" cellpadding="0" cellspacing="2" width="90%">
  36.           <tr>
  37.             <td width="30%" align="right" valign="middle"><font color="#0A0A0A">名称:</font></td>
  38.             <td align="left" valign="middle">
  39.                      <%=((Vector)vt.get(0)).get(1).toString()%>
  40.                     </td>
  41.                 </tr>
  42.                 <tr>
  43.             <td width="30%" align="right" valign="middle"><font color="#0A0A0A">编号:</font></td>
  44.             <td align="left" valign="middle"> <%=((Vector)vt.get(0)).get(2).toString()%>
  45.             </td>
  46.                 </tr>
  47. <%
  48. Vector vtFields = AssetFieldsManager.getByAssetTypeRecord(iTypesID);
  49. if(vtFields.size() > 0)
  50. {
  51.    for (int i=0; i<vtFields.size(); i++)
  52.    {
  53.      String strFieldValue = AssetFieldsValueManager.getFieldValueByID(intAssetID,Integer.parseInt(((Vector)vtFields.get(i)).get(0).toString()));
  54.      if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("STR"))
  55.         {
  56. //字符串类型输入框,表单输入框名称为字段ID。
  57.            out.println("<tr>");
  58.            out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
  59.            out.println("<td align="left" valign="middle" nowrap>");
  60.            out.println(strFieldValue);
  61.            out.println("</td></tr>");
  62.            out.println("</td></tr>");
  63.         }else
  64.      if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("NUM"))
  65.         {
  66. //数值类型输入框,表单输入框名称为字段ID。
  67.            out.println("<tr>");
  68.            out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
  69.            out.println("<td align="left" valign="middle" nowrap>");
  70.            out.println(strFieldValue);
  71.            out.println("</td></tr>");
  72.            out.println("</td></tr>");
  73.         }else
  74.      if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("DATE"))
  75.         {
  76. //日期类型输入框,表单输入框名称为字段ID。
  77.            out.println("<tr>");
  78.            out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
  79.            out.println("<td align="left" valign="middle" nowrap>");
  80.            out.println(StringNew.GetDateString(strFieldValue,"yyyy年MM月dd日"));
  81.            out.println("</td></tr>");
  82.            out.println("</td></tr>");
  83.         }else
  84.      if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("TEXT"))
  85.         {
  86. //备注类型输入框,表单输入框名称为字段ID。
  87.            out.println("<tr>");
  88.            out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
  89.            out.println("<td align="left" valign="middle" nowrap>");
  90.            out.println(strFieldValue);
  91.            out.println("</td></tr>");
  92.            out.println("</td></tr>");
  93.         }else
  94.      if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("ACC"))
  95.         {
  96. //附件类型输入框,表单输入框名称为字段ID。
  97.            out.println("<tr>");
  98.            out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
  99.            out.println("<td align="left" valign="middle" nowrap>");
  100.            out.println("<a href="" + strFieldValue.substring(0,strFieldValue.lastIndexOf("/")+1) + URLDecoder.decode(strFieldValue.substring(strFieldValue.lastIndexOf("/")+1),"UTF8") + "" target="_blank">");
  101.            out.println(strFieldValue.substring(strFieldValue.lastIndexOf("/")+1));
  102.            out.println("</a>(点击附件名称下载附件)</td></tr>");
  103.            out.println("</td></tr>");
  104.         }
  105.    }
  106. }
  107. %>
  108.                 <tr>
  109.             <td width="30%" align="right" valign="middle">&nbsp;</td>
  110.             <td align="left" valign="middle"> <br>
  111.               <br>
  112.                     </td>
  113.                 </tr>
  114.                 <tr>
  115.             <td width="30%" align="right" valign="middle">&nbsp;</td>
  116.             <td align="right" valign="middle">
  117.               <input type="button" value="关闭" onclick="window.close();">
  118.                    </td>
  119.                 </tr>
  120.             </table>
  121.             </form>
  122.         </td>
  123.     </tr>
  124. </table>
  125. </body>
  126. </html>
  127. <%
  128. }
  129. else
  130. {
  131. %>
  132. <script language="JavaScript" type="text/JavaScript">
  133. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  134. history.back();
  135. </script>
  136. <%
  137. }
  138. }
  139. %>