EditPactTemplet.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.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int iPactTempletID = m_request.GetInt("ID");
  7. int iPactType = m_request.GetInt("PactType");
  8. if(iPactTempletID <1)
  9. {
  10. %>
  11. <script language="JavaScript" type="text/JavaScript">
  12. alert("请选择正确的合同,修改失败!");
  13. history.back();
  14. </script>
  15. <%
  16. }
  17. else
  18. {
  19. Vector vt = PactTempletManager.getRecordByID(iPactTempletID);
  20. if(vt.size()==1)
  21. {
  22. %>
  23. <html>
  24. <head>
  25. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  26. <title>合同管理-- GForce OA 2.0</title>
  27. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  28. <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  29. <script language="JavaScript" src="/js/changestyle.js"></script>
  30. <script language="JavaScript" type="text/javascript">
  31. function checkEditPactTemplet()
  32. {
  33.     if(document.EditPactTemplet.TempletName.value == "")
  34.     {
  35.         alert("请输入合同名称!");
  36.         document.EditPactTemplet.TempletName.focus();
  37.         return false;
  38.     }
  39.     for(var i=0;i<document.EditPactTemplet.AccessoriesList.length;i++)
  40.     {
  41.       if(document.EditPactTemplet.AccessoriesList.options[i].value.length>1)
  42.       {
  43.         document.EditPactTemplet.AccessoriesNames.value += "," + document.EditPactTemplet.AccessoriesList.options[i].text;
  44.         document.EditPactTemplet.AccessoriesURLs.value += "," + document.EditPactTemplet.AccessoriesList.options[i].value;
  45.       }
  46.     }
  47. }
  48. </script>
  49. <style type="text/css">
  50. <!--
  51. .imgtd {
  52.     border: 1px solid #0A0A0A;
  53. }
  54. -->
  55. </style>
  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"><p>&nbsp;</p>
  61.         <form name="EditPactTemplet" action="EditPactTempletAction.jsp?PactType=<%=iPactType%>" method="post" onSubmit="javascript:return checkEditPactTemplet();">
  62.         <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  63.           <tr>
  64.             <td width="100" align="right" valign="middle"><font color="#0A0A0A">名    称:</font></td>
  65.             <td colspan="3" align="left" valign="middle" nowrap>
  66.             <input name="TempletName" type="text" maxlength="60" size="20" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  67.             <input name="ID" type="hidden"  value="<%=((Vector)vt.get(0)).get(0).toString()%>">
  68.             </td>
  69.           </tr>
  70.           <tr>
  71.             <td width="100" align="right" valign="middle">附    件:</td>
  72.                 <td valign="middle" align="left"><table width="100%" border="0" cellspacing="0">
  73. <tr>
  74. <td style="width:100%;" align="left">
  75.                     <select name="AccessoriesList" size="4" multiple style="width:100%;">
  76. <%
  77. Vector vArticle = ArticleAttManager.getAttInfo(iPactTempletID,"PactTempletInfo");
  78. if (vArticle.size() > 0)
  79. {
  80. for (int j = 0;j < vArticle.size();j++)
  81. {
  82. out.println("<option value="" + ((Vector)vArticle.get(j)).get(2).toString() + "">" + ((Vector)vArticle.get(j)).get(1).toString() + "</option>");
  83. }
  84. }
  85. %>
  86.                     </select>
  87.                     </td>
  88.                     <td width="50%" align="left" valign="top">
  89. <%
  90. if (vArticle.size() > 0)
  91. {
  92. for (int j = 0;j < vArticle.size();j++)
  93. {
  94. out.println("<a href="" + ((Vector)vArticle.get(j)).get(2).toString() + "" target="_blank">" + ((Vector)vArticle.get(j)).get(1).toString() + "</a><br>");
  95. }
  96. }
  97. %>
  98.                      </td>
  99.                     <td width="100" align="center" valign="middle">
  100.                      <input type="button" onClick="AddAccessories(document.EditPactTemplet.AccessoriesList);" value="新增附件"><br>
  101.                      <input type="button" onClick="DelAccessories(document.EditPactTemplet.AccessoriesList);" value="删除附件">
  102.                       <input name="AccessoriesNames" type="hidden">
  103.                       <input name="AccessoriesURLs" type="hidden">
  104.                       <input name="BuildTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"yyyy-MM-dd HH:mm:ss")%>">
  105.                       <input name="BuildUserID" type="hidden" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
  106.                       <input name="PactType" type="hidden" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
  107.                     </td>
  108.                   </tr>
  109.                 </table>
  110. </td>
  111.           </tr>
  112.           <tr>
  113.             <td width="100" align="right" valign="middle"><font color="#0A0A0A">内    容:</font></td>
  114.             <td colspan="3" align="left" valign="middle" nowrap>
  115.             <textarea name="TempletContent" cols="90" rows="20"><%=((Vector)vt.get(0)).get(2).toString()%></textarea>
  116.             </td>
  117.           </tr>
  118.           <tr>
  119.             <td align="right" valign="middle">&nbsp;</td>
  120.             <td colspan="3" align="left" valign="middle" nowrap> </td>
  121.           </tr>
  122.           <tr>
  123.             <td align="right" valign="middle">&nbsp;</td>
  124.             <td colspan="3" align="left" valign="middle" nowrap> <input type="submit" value="确定">
  125.               &nbsp;&nbsp;&nbsp; <input type="reset" value="重填"> &nbsp;&nbsp;&nbsp;
  126.               <input type="button" value="返回" onclick="window.location='PactTempletManage.jsp?PactType=<%=iPactType%>';">
  127.             </td>
  128.           </tr>
  129.         </table>
  130.         </form>
  131.         </td>
  132.     </tr>
  133. </table>
  134. </body>
  135. </html>
  136. <%
  137. }
  138. else
  139. {
  140. %>
  141. <script language="JavaScript" type="text/JavaScript">
  142. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  143. history.back();
  144. </script>
  145. <%
  146. }
  147. }
  148. %>