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