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

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