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

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"/-->
  4. <% Session m_session = new Session(session); %>
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  8. <title>名片夹管理-- GForce OA 2.0</title>
  9. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  10. <script language="JavaScript" src="/js/changestyle.js">
  11. </script>
  12. <script language="JavaScript" type="text/javascript">
  13. function checkAddAddressList()
  14. {
  15.     if(document.addaddresslist.Name.value=="")
  16.     {
  17.         alert("请输入姓名!");
  18.         document.addaddresslist.Name.focus();
  19.         return false;
  20.     }
  21.     if(document.addaddresslist.BirthDate.value!="")
  22.     {
  23.       if(!isDate(document.addaddresslist.BirthDate.value))
  24.       {
  25.           alert("日期格式错误,请按照“2002-02-18”重新输入!");
  26.           document.addaddresslist.BirthDate.focus();
  27.           return false;
  28.       }
  29.     }
  30.     if(document.addaddresslist.KindsID.value=="0")
  31.     {
  32.         alert("请选择名片夹分类!");
  33.         document.addaddresslist.KindsID.focus();
  34.         return false;
  35.     }
  36. }
  37. </script>
  38. </head>
  39. <body>
  40.  <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  41.     <tr>
  42.     <td align="center" valign="top">
  43.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  44.         <tr>
  45.           <td height="50" valign="top" background="../images/dy-back.gif">
  46.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  47.               <tr valign="middle">
  48.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  49.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">新增名片</font></strong></td>
  50.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  51.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  52.                   <!--单增<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  53.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  54.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  55.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  56.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  57.                 </td>
  58.               </tr>
  59.             </table>
  60.           </td>
  61.         </tr>
  62.       </table><br>
  63. <%
  64. Request t_request = new Request(request);
  65. int intUserID = m_session.GetInt("UserID");
  66. int intKindsID = t_request.GetInt("KindsID");
  67. String strKindsIDs = "";
  68. Vector vtKinds = AddressKindManager.getAllRecord(intUserID);
  69. if(vtKinds.size()>0)
  70. {
  71.   %>
  72. <form name="addaddresslist" action="AddAddressListAction.jsp" method="post" onSubmit="javascript:return checkAddAddressList();">
  73.             <table  border="1" cellpadding="1" cellspacing="1" width="90%">
  74.                 <tr>
  75.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">姓&nbsp;&nbsp;&nbsp;&nbsp;名:&nbsp;</font></td>
  76.                     <td align="left" valign="middle" width="35%" nowrap>
  77.                         &nbsp;<input name="Name" type="text" maxlength="50">
  78.                     </td>
  79.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">性&nbsp;&nbsp;&nbsp;&nbsp;别:&nbsp;</font></td>
  80.                     <td align="left" valign="middle" width="35%" nowrap>
  81.                         &nbsp;<font color="#0A0A0A"><input name="Sex" type="radio" value="男" checked>男&nbsp;&nbsp;&nbsp;&nbsp;<input name="Sex" type="radio" value="女" >女</font>
  82.                     </td>
  83.                 </tr>
  84.                 <tr>
  85.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">名片夹分类:&nbsp;</font></td>
  86.                     <td align="left" valign="middle" nowrap>
  87.                          &nbsp;<select name="KindsID">
  88. <option value="0" <%if(intKindsID==0)out.print("selected");%>>请选择名片夹分类</option>
  89. <%
  90. Vector vt_Kinds = AddressKindManager.getAllRecord(intUserID);
  91. for(int i=0;i<vt_Kinds.size();i++)
  92. {
  93.     if(((Vector)vt_Kinds.get(i)).get(0).toString().equalsIgnoreCase("" + intKindsID))
  94.         out.println("<option value="" + ((Vector)vt_Kinds.get(i)).get(0).toString() + "" selected>" + ((Vector)vt_Kinds.get(i)).get(1).toString() + "</option>");
  95.     else
  96.         out.println("<option value="" + ((Vector)vt_Kinds.get(i)).get(0).toString() + "">" + ((Vector)vt_Kinds.get(i)).get(1).toString() + "</option>");
  97. }
  98. %>
  99.                         </select>
  100.                     </td>
  101.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">出生日期:&nbsp;</font></td>
  102.                     <td align="left" valign="middle" nowrap>
  103.                          &nbsp;<input name="BirthDate" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value,-100,-2);" maxlength="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value,-100,-2);">
  104.                    </td>
  105.                 </tr>
  106.                 <tr>
  107.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">移动电话:&nbsp;</font></td>
  108.                     <td align="left" valign="middle" nowrap>
  109.                         &nbsp;<input name="MobileNum" type="text" maxlength="50">
  110.                    </td>
  111.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">家庭电话:&nbsp;</font></td>
  112.                     <td align="left" valign="middle" nowrap>
  113.                         &nbsp;<input name="HomeTel" type="text" maxlength="50">
  114.                    </td>
  115.                 </tr>
  116.                 <tr>
  117.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">单位电话:&nbsp;</font></td>
  118.                     <td align="left" valign="middle" nowrap>
  119.                         &nbsp;<input name="OfficeTel" type="text" maxlength="50">
  120.                    </td>
  121.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">传真号码:&nbsp;</font></td>
  122.                     <td align="left" valign="middle" nowrap>
  123.                         &nbsp;<input name="Fax" type="text" maxlength="50">
  124.                    </td>
  125.                 </tr>
  126.                 <tr>
  127.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">工作单位:&nbsp;</font></td>
  128.                     <td align="left" valign="middle" nowrap>
  129.                         &nbsp;<input name="Company" type="text" maxlength="30">
  130.                    </td>
  131.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">职&nbsp;&nbsp;&nbsp;&nbsp;务:&nbsp;</font></td>
  132.                     <td align="left" valign="middle" nowrap>
  133.                         &nbsp;<input name="Place" type="text" maxlength="50">
  134.                    </td>
  135.                 </tr>
  136.                 <tr>
  137.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">单位地址:&nbsp;</font></td>
  138.                     <td align="left" valign="middle" colspan="3" nowrap>
  139.                         &nbsp;<input name="CompanyAddr" type="text" maxlength="100" size="50">
  140.                    </td>
  141.                 </tr>
  142.                 <tr>
  143.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">家庭地址:&nbsp;</font></td>
  144.                     <td align="left" valign="middle" colspan="3" nowrap>
  145.                         &nbsp;<input name="HomeAddr" type="text" maxlength="100" size="50">
  146.                    </td>
  147.                 </tr>
  148.                 <tr>
  149.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">QQ号码:&nbsp;</font></td>
  150.                     <td align="left" valign="middle" nowrap>
  151.                         &nbsp;<input name="QQNumber" type="text" maxlength="50">
  152.                    </td>
  153.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">MSN号码:&nbsp;</font></td>
  154.                     <td align="left" valign="middle" nowrap>
  155.                         &nbsp;<input name="MsnNumber" type="text" maxlength="50">
  156.                    </td>
  157.                 </tr>
  158.                 <tr>
  159.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">电子信箱:</font></td>
  160.                     <td align="left" valign="middle" nowrap>
  161.                         &nbsp;<input name="E_mail" type="text" maxlength="30">
  162.                    </td>
  163.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">是否共享:&nbsp;</font></td>
  164.                     <td align="left" valign="middle" nowrap>
  165.                         &nbsp;<font color="#0A0A0A"><input name="IsOpen" type="radio" value="1">公开共享&nbsp;&nbsp;&nbsp;&nbsp;<input name="IsOpen" type="radio" value="0" checked>私人保密</font>
  166.                     </td>
  167.                 </tr>
  168.                 <tr>
  169.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">备  注:</font></td>
  170.                     <td align="left" valign="middle" colspan="3" nowrap>
  171.                         &nbsp;<textarea name="Remark" cols="70" rows="3"></textarea>
  172.                    </td>
  173.                 </tr>
  174.             </table>
  175.             <table width="90%" border="0">
  176.                 <tr>
  177.                     <td>&nbsp;</td>
  178.                </tr>
  179.                 <tr>
  180.                   <td>&nbsp;</td>
  181.                    <td align="right" valign="middle" nowrap>
  182.                    <input type="submit" value="添 加" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重 填" style="background-color: #FFFFFF; border: 1 solid #000000">
  183.                   </td>
  184.                 </tr>
  185.                 <tr>
  186.                     <td align="right" valign="middle">&nbsp;</td>
  187.                </tr>
  188.             </table>
  189. </form>
  190. <%
  191. }
  192. else
  193. {
  194.     out.println("<script language="javascript">alert("您还没有建立名片夹分类,请先建立名片夹分类!");window.location="AddressKindManage.jsp";</script>");
  195. }
  196. %>
  197.         </td>
  198.     </tr>
  199. </table>
  200. </body>
  201. </html>