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

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" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  11. <script language="JavaScript" type="text/javascript">
  12. function checkAddPact()
  13. {
  14.     if(document.AddPact.PactTitle.value == "")
  15.     {
  16.         alert("请输入合同名称!");
  17.         document.AddPact.PactTitle.focus();
  18.         return false;
  19.     }
  20.     for(var i=0;i<document.AddPact.AccessoriesList.length;i++)
  21.     {
  22.       if(document.AddPact.AccessoriesList.options[i].value.length>1)
  23.       {
  24.         document.AddPact.AccessoriesNames.value += "," + document.AddPact.AccessoriesList.options[i].text;
  25.         document.AddPact.AccessoriesURLs.value += "," + document.AddPact.AccessoriesList.options[i].value;
  26.       }
  27.     }
  28. }
  29. </script>
  30. <style type="text/css">
  31. <!--
  32. .imgtd {
  33.     border: 1px solid #0A0A0A;
  34. }
  35. -->
  36. </style>
  37. </head>
  38. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  39. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  40.     <tr>
  41.         <td align="center" valign="top"><p>&nbsp;</p>
  42.         <form name="AddPact" action="AddPactAction.jsp" method="post" onSubmit="javascript:return checkAddPact();">
  43.         <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  44. <%
  45.    Request m_request = new Request(request);
  46.    int intUserID = m_session.GetInt("UserID");
  47.    int iTempletID = m_request.GetInt("TempletID");
  48.    Vector vArticle = PactTempletManager.getRecordByPactType(2); //获取合同模板记录
  49.    out.println("<tr>");
  50.    out.println("<td width="20%" align="right" valign="middle"><font color="#0A0A0A">合  同:</font></td>");
  51.    out.println("<td width="80%" colspan="3" align="left" valign="middle" nowrap><select name="TempletID" onchange="document.AddPact.action='AddPact.jsp?';document.AddPact.submit();">");
  52.    out.println("<option value="0" selected>选择标准合同</option>");
  53.   for (int j = 0;j < vArticle.size();j++)
  54.   {
  55.          if (iTempletID == (Integer.parseInt(((Vector)vArticle.get(j)).get(0).toString())))
  56.     out.println("<option value="" + ((Vector)vArticle.get(j)).get(0).toString() + "" selected>" + ((Vector)vArticle.get(j)).get(1).toString() + "</option>");
  57.          else
  58.     out.println("<option value="" + ((Vector)vArticle.get(j)).get(0).toString() + "">" + ((Vector)vArticle.get(j)).get(1).toString() + "</option>");
  59.   }
  60.    out.println("</select>");
  61.    out.println("</tr>");
  62.    Vector vTemplet = PactTempletManager.getRecordByID(iTempletID); //获取合同附件记录
  63. %>
  64.           <tr>
  65.             <td width="20%" align="right" valign="middle"><font color="#0A0A0A">合同编号:</font></td>
  66.             <td width="80%" colspan="3" align="left" valign="middle" nowrap>
  67.             <input name="PactNumber" type="text" maxlength="60" size="60"  value="">
  68.           </tr>
  69.           <tr>
  70.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">信托资金:</font></td>
  71.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  72.             <input name="IntrustFund" type="text" maxlength="15" size="15"  value="">
  73.           </tr>
  74.           <tr>
  75.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">合同期限起始时间:</font></td>
  76.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  77.             <input name="PactTermStart" type="text" maxlength="10" size="10"  onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  78.           </tr>
  79.           <tr>
  80.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">合同期限结束时间:</font></td>
  81.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  82.             <input name="PactTermEnd" type="text" maxlength="10" size="10"   onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  83.           </tr>
  84.           <tr>
  85.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">甲方名称:</font></td>
  86.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  87.             <input name="FirstSideName" type="text" maxlength="60" size="60"  value="">
  88.           </tr>
  89.           <tr>
  90.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">甲方身份证营业执照:</font></td>
  91.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  92.             <input name="FirstSideIDCardNumber" type="text" maxlength="60" size="60"  value="">
  93.           </tr>
  94.           <tr>
  95.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">甲方法定代表人:</font></td>
  96.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  97.             <input name="FirstSideCorporation" type="text" maxlength="60" size="60"  value="">
  98.           </tr>
  99.           <tr>
  100.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">甲方地址:</font></td>
  101.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  102.             <input name="FirstSideAddress" type="text" maxlength="160" size="60"  value="">
  103.           </tr>
  104.           <tr>
  105.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">甲方电话:</font></td>
  106.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  107.             <input name="FirstSideTel" type="text" maxlength="60" size="15"  value="">
  108.           </tr>
  109.           <tr>
  110.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">甲方代理人:</font></td>
  111.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  112.             <input name="FirstSideDeputy" type="text" maxlength="60" size="60"  value="">
  113.           </tr>
  114.           <tr>
  115.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">甲方签字日期:</font></td>
  116.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  117.             <input name="FirstSideSignTime" type="text" maxlength="10" size="10"  onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  118.           </tr>
  119.           <tr>
  120.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">乙方名称:</font></td>
  121.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  122.             <input name="SecondSideName" type="text" maxlength="160" size="60"  value="">
  123.           </tr>
  124.           <tr>
  125.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">乙方身份证营业执照:</font></td>
  126.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  127.             <input name="SecondSideIDCardNumber" type="text" maxlength="60" size="60"  value="">
  128.           </tr>
  129.           <tr>
  130.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">乙方法定代表人:</font></td>
  131.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  132.             <input name="SecondSideCorporation" type="text" maxlength="60" size="60"  value="">
  133.           </tr>
  134.           <tr>
  135.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">乙方地址:</font></td>
  136.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  137.             <input name="SecondSideAddress" type="text" maxlength="160" size="60"  value="">
  138.           </tr>
  139.           <tr>
  140.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">乙方电话:</font></td>
  141.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  142.             <input name="SecondSideTel" type="text" maxlength="60" size="15"  value="">
  143.           </tr>
  144.           <tr>
  145.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">乙方代理人:</font></td>
  146.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  147.             <input name="SecondSideDeputy" type="text" maxlength="160" size="60"  value="">
  148.           </tr>
  149.           <tr>
  150.             <td width="18%" align="right" valign="middle"><font color="#0A0A0A">乙方签字日期:</font></td>
  151.             <td width="82%" colspan="3" align="left" valign="middle" nowrap>
  152.             <input name="SecondSideSignTime" type="text" maxlength="10" size="10"  onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  153.           </tr>
  154.           <tr>
  155.             <td width="8%" align="right" valign="middle"><font color="#0A0A0A">名 称:</font></td>
  156.             <td width="92%" colspan="3" align="left" valign="middle" nowrap>
  157.             <input name="PactTitle" type="text" maxlength="60" size="60"  value="<%=vTemplet.size()>0?((Vector)vTemplet.get(0)).get(1).toString():""%>">
  158.           </tr>
  159.           <tr>
  160.             <td align="right" valign="middle">附 件:</td>
  161.                 <td valign="middle" align="left"><table width="100%" border="0" cellspacing="0">
  162.                   <tr>
  163.                     <td style="width:100%;" align="left">
  164.                     <select name="AccessoriesList" size="4" multiple style="width:100%;">
  165. <%
  166. if (vTemplet.size() > 0)
  167. {
  168. vArticle = ArticleAttManager.getAttInfo(iTempletID,"PactTempletInfo");
  169. if (vArticle.size() > 0)
  170. {
  171.   for (int j = 0;j < vArticle.size();j++)
  172.   {
  173.     out.println("<option value="" + ((Vector)vArticle.get(j)).get(2).toString() + "">" + ((Vector)vArticle.get(j)).get(1).toString() + "</option>");
  174.   }
  175. }
  176. }
  177. %>
  178.                     </select>
  179.                     </td>
  180. <%
  181. if (vTemplet.size() > 0)
  182. {
  183.  out.println("<td width="50%" align="left" valign="top">");
  184. if (vArticle.size() > 0)
  185. {
  186.   for (int j = 0;j < vArticle.size(); j++)
  187.   {
  188.     out.println("<a href="" + ((Vector)vArticle.get(j)).get(2).toString() + "" target="_blank">" + ((Vector)vArticle.get(j)).get(1).toString() + "</a><br>");
  189.   }
  190. }
  191.   out.println("</td>");
  192. }
  193. %>
  194.                      <td width="100" align="center" valign="middle">
  195.                       <input type="button" onClick="AddAccessories(document.AddPact.AccessoriesList);" value="新增附件"><br>
  196.                       <input type="button" onClick="DelAccessories(document.AddPact.AccessoriesList);" value="删除附件">
  197.                       <input name="AccessoriesNames" type="hidden">
  198.                       <input name="AccessoriesURLs" type="hidden">
  199.                       <%java.util.Date t_Date = new java.util.Date();%>
  200.                       <input name="AddTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm:ss")%>">
  201.                       <input name="AddUserID" type="hidden" value="<%=intUserID%>">
  202.                     </td>
  203.                   </tr>
  204.                 </table>
  205.     </td>
  206.           </tr>
  207.           <tr>
  208.             <td align="right" valign="middle"><font color="#0A0A0A">内 容:</font></td>
  209.             <td colspan="3" align="left" valign="middle" nowrap>
  210.             <textarea name="PactContent" cols="75" rows="20"><%=vTemplet.size()>0?((Vector)vTemplet.get(0)).get(2).toString():""%></textarea>
  211.             </td>
  212.           </tr>
  213.           <tr>
  214.             <td align="right" valign="middle">&nbsp;</td>
  215.             <td colspan="3" align="left" valign="middle" nowrap> </td>
  216.           </tr>
  217.           <tr>
  218.             <td align="right" valign="middle">&nbsp;</td>
  219.             <td colspan="3" align="left" valign="middle" nowrap> <input type="submit" value="确定">
  220.               &nbsp;&nbsp;&nbsp; <input type="reset" value="重填"> &nbsp;&nbsp;&nbsp;
  221.               <input type="button" value="返回" onClick="window.location='PactManage.jsp';">
  222.             </td>
  223.           </tr>
  224.         </table>
  225.        </form>
  226.       </td>
  227.     </tr>
  228. </table>
  229. </body>
  230. </html>