EditPactTemplet.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.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <%
- Request m_request = new Request(request);
- int iPactTempletID = m_request.GetInt("ID");
- int iPactType = m_request.GetInt("PactType");
- if(iPactTempletID <1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("请选择正确的合同,修改失败!");
- history.back();
- </script>
- <%
- }
- else
- {
- Vector vt = PactTempletManager.getRecordByID(iPactTempletID);
- 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">
- <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
- <script language="JavaScript" src="/js/changestyle.js"></script>
- <script language="JavaScript" type="text/javascript">
- function checkEditPactTemplet()
- {
- if(document.EditPactTemplet.TempletName.value == "")
- {
- alert("请输入合同名称!");
- document.EditPactTemplet.TempletName.focus();
- return false;
- }
- for(var i=0;i<document.EditPactTemplet.AccessoriesList.length;i++)
- {
- if(document.EditPactTemplet.AccessoriesList.options[i].value.length>1)
- {
- document.EditPactTemplet.AccessoriesNames.value += "," + document.EditPactTemplet.AccessoriesList.options[i].text;
- document.EditPactTemplet.AccessoriesURLs.value += "," + document.EditPactTemplet.AccessoriesList.options[i].value;
- }
- }
- }
- </script>
- <style type="text/css">
- <!--
- .imgtd {
- border: 1px solid #0A0A0A;
- }
- -->
- </style>
- </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="EditPactTemplet" action="EditPactTempletAction.jsp?PactType=<%=iPactType%>" method="post" onSubmit="javascript:return checkEditPactTemplet();">
- <table border="0" cellpadding="0" cellspacing="0" width="90%">
- <tr>
- <td width="100" align="right" valign="middle"><font color="#0A0A0A">名 称:</font></td>
- <td colspan="3" align="left" valign="middle" nowrap>
- <input name="TempletName" type="text" maxlength="60" size="20" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
- <input name="ID" type="hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>">
- </td>
- </tr>
- <tr>
- <td width="100" align="right" valign="middle">附 件:</td>
- <td valign="middle" align="left"><table width="100%" border="0" cellspacing="0">
- <tr>
- <td style="width:100%;" align="left">
- <select name="AccessoriesList" size="4" multiple style="width:100%;">
- <%
- Vector vArticle = ArticleAttManager.getAttInfo(iPactTempletID,"PactTempletInfo");
- if (vArticle.size() > 0)
- {
- for (int j = 0;j < vArticle.size();j++)
- {
- out.println("<option value="" + ((Vector)vArticle.get(j)).get(2).toString() + "">" + ((Vector)vArticle.get(j)).get(1).toString() + "</option>");
- }
- }
- %>
- </select>
- </td>
- <td width="50%" align="left" valign="top">
- <%
- if (vArticle.size() > 0)
- {
- for (int j = 0;j < vArticle.size();j++)
- {
- out.println("<a href="" + ((Vector)vArticle.get(j)).get(2).toString() + "" target="_blank">" + ((Vector)vArticle.get(j)).get(1).toString() + "</a><br>");
- }
- }
- %>
- </td>
- <td width="100" align="center" valign="middle">
- <input type="button" onClick="AddAccessories(document.EditPactTemplet.AccessoriesList);" value="新增附件"><br>
- <input type="button" onClick="DelAccessories(document.EditPactTemplet.AccessoriesList);" value="删除附件">
- <input name="AccessoriesNames" type="hidden">
- <input name="AccessoriesURLs" type="hidden">
- <input name="BuildTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"yyyy-MM-dd HH:mm:ss")%>">
- <input name="BuildUserID" type="hidden" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
- <input name="PactType" type="hidden" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td width="100" align="right" valign="middle"><font color="#0A0A0A">内 容:</font></td>
- <td colspan="3" align="left" valign="middle" nowrap>
- <textarea name="TempletContent" cols="90" rows="20"><%=((Vector)vt.get(0)).get(2).toString()%></textarea>
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- <td colspan="3" align="left" valign="middle" nowrap> </td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- <td colspan="3" align="left" valign="middle" nowrap> <input type="submit" value="确定">
- <input type="reset" value="重填">
- <input type="button" value="返回" onclick="window.location='PactTempletManage.jsp?PactType=<%=iPactType%>';">
- </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
- history.back();
- </script>
- <%
- }
- }
- %>