AssetLink.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:6k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*,java.net.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <%
- Request m_request = new Request(request);
- int intAssetID = m_request.GetInt("ID");
- int iTypesID = m_request.GetInt("TypesID");
- int iSysDirID = m_request.GetInt("SysDirID");
- if(intAssetID<1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("请选择正确的资产,修改失败!");
- history.back();
- </script>
- <%
- }
- else
- {
- Vector vt = AssetManager.getByIDRecord(intAssetID);
- if(vt.size() == 1)
- {
- %>
- <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">
- </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>
- <form name="EditAsset" action="/Operation/EditAssetAction.jsp?SysDirID=<%=iSysDirID%>&TypesID=<%=iTypesID%>" method="post" onSubmit="javascript:return CheckEditAsset();">
- <table border="0" cellpadding="0" cellspacing="2" width="90%">
- <tr>
- <td width="30%" align="right" valign="middle"><font color="#0A0A0A">名称:</font></td>
- <td align="left" valign="middle">
- <%=((Vector)vt.get(0)).get(1).toString()%>
- </td>
- </tr>
- <tr>
- <td width="30%" align="right" valign="middle"><font color="#0A0A0A">编号:</font></td>
- <td align="left" valign="middle"> <%=((Vector)vt.get(0)).get(2).toString()%>
- </td>
- </tr>
- <%
- Vector vtFields = AssetFieldsManager.getByAssetTypeRecord(iTypesID);
- if(vtFields.size() > 0)
- {
- for (int i=0; i<vtFields.size(); i++)
- {
- String strFieldValue = AssetFieldsValueManager.getFieldValueByID(intAssetID,Integer.parseInt(((Vector)vtFields.get(i)).get(0).toString()));
- if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("STR"))
- {
- //字符串类型输入框,表单输入框名称为字段ID。
- out.println("<tr>");
- out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
- out.println("<td align="left" valign="middle" nowrap>");
- out.println(strFieldValue);
- out.println("</td></tr>");
- out.println("</td></tr>");
- }else
- if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("NUM"))
- {
- //数值类型输入框,表单输入框名称为字段ID。
- out.println("<tr>");
- out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
- out.println("<td align="left" valign="middle" nowrap>");
- out.println(strFieldValue);
- out.println("</td></tr>");
- out.println("</td></tr>");
- }else
- if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("DATE"))
- {
- //日期类型输入框,表单输入框名称为字段ID。
- out.println("<tr>");
- out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
- out.println("<td align="left" valign="middle" nowrap>");
- out.println(StringNew.GetDateString(strFieldValue,"yyyy年MM月dd日"));
- out.println("</td></tr>");
- out.println("</td></tr>");
- }else
- if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("TEXT"))
- {
- //备注类型输入框,表单输入框名称为字段ID。
- out.println("<tr>");
- out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
- out.println("<td align="left" valign="middle" nowrap>");
- out.println(strFieldValue);
- out.println("</td></tr>");
- out.println("</td></tr>");
- }else
- if (((Vector)vtFields.get(i)).get(3).toString().equalsIgnoreCase("ACC"))
- {
- //附件类型输入框,表单输入框名称为字段ID。
- out.println("<tr>");
- out.println("<td align="right" valign="middle"><font color="#0A0A0A">"+((Vector)vtFields.get(i)).get(1).toString()+":</font></td>");
- out.println("<td align="left" valign="middle" nowrap>");
- out.println("<a href="" + strFieldValue.substring(0,strFieldValue.lastIndexOf("/")+1) + URLDecoder.decode(strFieldValue.substring(strFieldValue.lastIndexOf("/")+1),"UTF8") + "" target="_blank">");
- out.println(strFieldValue.substring(strFieldValue.lastIndexOf("/")+1));
- out.println("</a>(点击附件名称下载附件)</td></tr>");
- out.println("</td></tr>");
- }
- }
- }
- %>
- <tr>
- <td width="30%" align="right" valign="middle"> </td>
- <td align="left" valign="middle"> <br>
- <br>
- </td>
- </tr>
- <tr>
- <td width="30%" align="right" valign="middle"> </td>
- <td align="right" valign="middle">
- <input type="button" value="关闭" onclick="window.close();">
- </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
- history.back();
- </script>
- <%
- }
- }
- %>