address_list_detail.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:14k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="com.vnex.intranet.util.TimeStamp" %>
  3. <%@ page import="com.vnex.intranet.util.FieldUtil" %>
  4. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  5. <jsp:useBean id="groupSelect" scope="request" class="com.vnex.intranet.addresslist.handler.GroupSelectHandler" />
  6. <jsp:useBean id="addressProxy" scope="application" class="com.vnex.intranet.addresslist.proxy.AddressProxyBean" />
  7. <jsp:useBean id="avb" scope="request" class="com.vnex.intranet.addresslist.value.AddresslistValueBean" />
  8. <%
  9.     int contactId = Integer.parseInt(request.getParameter("contactId"));
  10.     avb = addressProxy.getContactDetail(contactId);
  11.     String birthday = "";
  12.     if(avb.getBirthday() != null)
  13.         birthday = TimeStamp.formatCalendar(TimeStamp.YMD, avb.getBirthday());
  14.     String male = "";
  15.     String female = "";
  16.     if(avb.getGender() == 0)
  17.         male = " checked";
  18.     if(avb.getGender() == 1)
  19.         female = " checked";    
  20. %>
  21. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  22. <HTML>
  23. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  24. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  25. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  26. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  27. <script language="JavaScript" src="/vnex/util/popup.js"></script>
  28. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  29. <script language="JavaScript">
  30. function searchByName(form)
  31. {
  32.    if(checkChar(form.search_text.value))
  33.    {
  34.       form.action = "/mainctrl/addressbook/home";
  35.       form.submit();
  36.    }
  37.    else
  38.    {
  39.       alert("请不要在查询条件中加入"<>/\'%&这样的字符");
  40.    }
  41. }
  42.    
  43. function checkChar(str)
  44. {
  45.     var i,j,strTemp;
  46.     strTemp=""<>/\'%&";
  47.     for (i=0;i<str.length;i++)
  48.     {
  49.       j=strTemp.indexOf(str.charAt(i));
  50.       if (j!=-1)
  51.       {
  52.         return false;
  53.       }
  54.     }
  55.     return true;
  56. }
  57. function updateIt(form)
  58. {
  59.    if(checkIt(form))
  60.    {
  61.        form.action="/mainctrl/addressbook/modifyContact?contactId=<%=contactId%>&start=<%=request.getParameter("start")%>";
  62.        form.submit();
  63.    }
  64. }
  65. function deleteIt(form)
  66. {
  67.    if(confirm("是否删除本记录?"))
  68.    {
  69.      form.action="/mainctrl/addressbook/deleteOneContact?contactId=<%=contactId%>";
  70.      form.submit();
  71.    }  
  72. }
  73. function checkIt(form)
  74. {
  75.    if(isEmpty(form.contactName.value))
  76.    {
  77.        alert("请输入联系人姓名");
  78.        form.contactName.focus();
  79.        return false;
  80.    }
  81.    if(isInvalidateLen(form.notes.value, 2000))
  82.    {
  83.        alert("你的注释过长了,它只能容纳500个汉字或2000个英文字符");
  84.        form.notes.focus();
  85.        return false;
  86.    }
  87.    return true;
  88. }
  89. </script>
  90. <DIV align=center>
  91. <form name="form1" method="post" action="">
  92.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  93.     <TBODY>
  94.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  95.     <TR> 
  96.         <TD colSpan=3 align="center"><br>
  97.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  98.             <tr> 
  99.               <td align="center" colspan="2" bgcolor="#FFFFFF"> 
  100.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  101.                   <tr bgcolor="#666666"> 
  102.                       <td colspan="2"><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;<a href="/mainctrl/personal/main"><font color="#ffffff">个人办公</font></a>&gt;&gt;<a href="/mainctrl/addressbook/home"><font color="#ffffff">个人通讯录</font></a>&gt;&gt;联系人详细信息</font>
  103.                       </td>
  104.                   </tr>
  105.                 </table>
  106.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  107.                    <tr height="22">
  108.                        <td colspan="4"><font class="strong">&nbsp;基本信息</font></td>
  109.                    </tr>
  110.                    <tr bgcolor="#e0e0e0">
  111.                     <td align="left" width="14%"><strong>&nbsp;姓名:</strong></td>
  112.                     <td align="left" colspan="3">
  113.                      <input type="text" name="contactName" maxlength="10" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getContactName())%>">&nbsp;*&nbsp;(注:带*为必填内容)
  114.                     </td>
  115.                </tr>
  116.                <tr bgcolor="#fafafa">     
  117.                     <td align="left" width="14%"><strong>&nbsp;昵称:</strong></td>
  118.                     <td align="left" width="36%">
  119.                      <input type="text" name="nickName" maxlength="10" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getNickName())%>">
  120.                     </td>
  121.                     <td align="left" width="14%"><strong>&nbsp;生日:</strong></td>
  122.                     <td align="left" width="36%">
  123.                      <input type="text" name="bDate" readonly size="25" class="text" value="<%=birthday%>">
  124.                              <img src="/vnex/util/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(bDate);return false;">
  125.                     </td>
  126.                   </tr>
  127.                   <tr bgcolor="#e0e0e0">  
  128.                     <td align="left" width="14%"><strong>&nbsp;性别:</strong></td>
  129.                     <td align="left" colspan="3">
  130.                        <input type="radio" name="gender" value="0" <%=male%>>&nbsp;男&nbsp;
  131.                        <input type="radio" name="gender" value="1" <%=female%>>&nbsp;女
  132.                     </td>
  133.                   </tr>  
  134.                   <tr bgcolor="#fafafa">
  135.                     <td align="left" width="14%"><strong>&nbsp;联系组别:</strong></td>
  136.                     <td align="left" colspan="3">
  137.                        <select name="contactGrp" size="4" multiple style="width:144px">
  138.                           <option value="0"></option>
  139.                           <%=groupSelect.generateGroupCode(""+BusinessName.getEmpId(), avb.getContactGroup())%>
  140.                      </select>
  141.                &lt;&lt;按住<font color="#ff0000">Ctrl</font>键并用鼠标点击相应组别可以进行复选&gt;&gt;
  142.             </td>
  143.            </tr>
  144.                    <tr height="22">
  145.                        <td colspan="4"><font class="strong">&nbsp;联系方式</font></td>
  146.                    </tr>
  147.                    <tr bgcolor="#e0e0e0">
  148.                  <td align="left" width="14%"><strong>&nbsp;EMail:</strong></td>
  149.                  <td align="left" width="36%">
  150.                    <input type="text" name="emailAddress" maxlength="25" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getEmailAddress())%>">
  151.                  </td>
  152.                          <td align="left" width="14%"><strong>&nbsp;备用EMail:</strong></td>
  153.                          <td align="left" width="36%">
  154.                              <input type="text" name="anotherEmail" maxlength="25" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getAnotherEmail())%>">
  155.                          </td>
  156.                    </tr>
  157.                    <tr bgcolor="#fafafa">   
  158.                      <td align="left" width="14%"><strong>&nbsp;个人主页:</strong></td>
  159.                      <td align="left" width="36%">
  160.                        <input type="text" name="personalUrl" maxlength="25" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getPersonalUrl())%>">
  161.                      </td>
  162.                          <td align="left" width="14%"><strong>&nbsp;OICQ:</strong></td>
  163.                          <td align="left" width="36%">
  164.                             <input type="text" name="oicqNum" maxlength="10" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getOicqNum())%>">
  165.                         </td>
  166.                    </tr>
  167.                    <tr bgcolor="#e0e0e0">   
  168.                         <td align="left" width="14%"><strong>&nbsp;呼机:</strong></td>
  169.                         <td align="left" width="36%">
  170.                             <input type="text" name="pagerNum" maxlength="25" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getPagerNum())%>">
  171.                         </td>    
  172.                 <td align="left" width="14%"><strong>&nbsp;手机:</strong></td>
  173.                 <td align="left" width="36%">
  174.                   <input type="text" name="mobileNum" maxlength="25" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getMobileNum())%>">
  175.            </td>
  176.        </tr>  
  177.                    <tr height="22">
  178.                        <td colspan="4"><font class="strong">&nbsp;家庭信息</font></td>
  179.                    </tr>
  180.                    <tr bgcolor="#fafafa">
  181.                <td align="left" width="14%"><strong>&nbsp;家庭地址:</strong></td>
  182.                <td align="left" width="36%">
  183.                  <input type="text" name="homeAddress" maxlength="125" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getHomeAddress())%>">
  184.                </td>  
  185.                        <td align="left" width="14%"><strong>&nbsp;邮政编码:</strong></td>
  186.                        <td align="left" width="36%">
  187.                           <input type="text" name="homePC" maxlength="6" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getHomePC())%>">
  188.                        </td>
  189.                    </tr>
  190.                    <tr bgcolor="#e0e0e0">   
  191.                    <td align="left" width="14%"><strong>&nbsp;家庭电话:</strong></td>
  192.                    <td align="left" width="36%">
  193.                      <input type="text" name="homeTeleNum" maxlength="25" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getHomeTeleNum())%>">
  194.                    </td>
  195.                        <td align="left" width="14%">&nbsp;</td>
  196.                        <td align="left" width="36%">&nbsp;</td>
  197.        </tr>  
  198.                    <tr height="22">
  199.                         <td colspan="2"><font class="strong">&nbsp;工作信息</font></td>
  200.                    </tr>
  201.                    <tr bgcolor="#fafafa">
  202.    <td align="left" width="14%"><strong>&nbsp;工作单位:</strong></td>
  203.    <td align="left" width="36%">
  204.         <input type="text" name="unit" maxlength="25" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getUnit())%>">
  205.                    </td>
  206.                        <td align="left" width="14%"><strong>&nbsp;职务:</strong></td>
  207.                        <td align="left" width="36%">
  208.                             <input type="text" name="position" maxlength="10" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getPosition())%>">
  209.                        </td>
  210.                    </tr>
  211.                    <tr bgcolor="#e0e0e0">   
  212.        <td align="left" width="14%"><strong>&nbsp;单位地址:</strong></td>
  213.                        <td align="left" width="36%">
  214.                             <input type="text" name="unitAddress" maxlength="125" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getUnitAddress())%>">
  215.                        </td>
  216.                        <td align="left" width="14%"><strong>&nbsp;单位电话:</strong></td>
  217.                        <td align="left" width="36%">
  218.                            <input type="text" name="unitTeleNum" maxlength="25" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getUnitTeleNum())%>">
  219.                        </td>
  220.                    </tr>
  221.                    <tr bgcolor="#fafafa">   
  222.                       <td align="left" width="14%"><strong>&nbsp;单位邮编:</strong></td>
  223.                       <td align="left" width="36%">
  224.                            <input type="text" name="unitPC" maxlength="6" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getUnitPC())%>">
  225.                       </td>   
  226.                   <td align="left" width="14%"><strong>&nbsp;单位传真:</strong></td>
  227.   <td align="left" width="36%">
  228.        <input type="text" name="unitFaxNum" maxlength="25" size="25" class="text" value="<%=FieldUtil.filterQuotTag(avb.getUnitFaxNum())%>">
  229.           </td>
  230.       </tr>  
  231.                   <tr height="22">
  232.                       <td colspan="2"><font class="strong">&nbsp;其它信息</font></td>
  233.                   </tr>
  234.                   <tr bgcolor="#e0e0e0">
  235.                       <td align="left" width="14%"><strong>&nbsp;备注:</strong></td>
  236.                       <td align="left" colspan="3">
  237.             <textarea name="notes" cols="20" rows="3"><%=avb.getNotes()%></textarea>
  238.               </td>
  239.                    </tr>
  240.            <tr bgcolor="#fafafa">
  241.              <td colspan="4" align="center" height="30"> 
  242.                     <input type="button" name="Button2" value="保存" onClick="updateIt(this.form)" class="text">
  243.                     &nbsp;&nbsp;
  244.                     <input type="button" name="Button2" value="删除" onclick="deleteIt(this.form)" class="text">
  245.                     &nbsp;&nbsp;
  246.                     <input type="reset" name="Button2" value="重置" class="text">
  247.                     &nbsp;&nbsp;
  248.                     <input type="button" name="Button2" value="放弃" class="text" onclick="history.back()">
  249.                      </td>
  250.            </tr>
  251.                </table>
  252.               </td>
  253.             </tr>
  254.           </table>
  255.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  256.        </TD>
  257.      </TR>
  258.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  259.     </TBODY> 
  260.   </TABLE>
  261.     <BR>
  262.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  263. </form>
  264. </DIV>
  265. </BODY>
  266. </HTML>