AddPersonnel.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:13k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
- <title>员工管理-- GForce OA 2.0</title>
- <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
- <script language="JavaScript" src="/js/changestyle.js"></script>
- <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
- <script language="JavaScript" type="text/javascript">
- function checkAddPersonnel()
- {
- if(document.addpersonnel.Number.value=="")
- {
- alert("请输入员工编号!");
- document.addpersonnel.Number.focus();
- return false;
- }
- if(document.addpersonnel.DepartmentID.value=="")
- {
- alert("请选择所属部门!");
- document.addpersonnel.DepartmentID.focus();
- return false;
- }
- if(document.addpersonnel.PlaceID.value<1)
- {
- alert("请选择职务!");
- document.addpersonnel.PlaceID.focus();
- return false;
- }
- if(document.addpersonnel.Name.value=="")
- {
- alert("请输入姓名!");
- document.addpersonnel.Name.focus();
- return false;
- }
- if(document.addpersonnel.BirthDate.value!="")
- {
- if(!isDate(document.addpersonnel.BirthDate.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.addpersonnel.BirthDate.focus();
- return false;
- }
- }
- if(document.addpersonnel.MarriageID.value=="0")
- {
- alert("请选择婚姻状况!");
- document.addpersonnel.MarriageID.focus();
- return false;
- }
- if(document.addpersonnel.EducationID.value=="0")
- {
- alert("请选择教育程度!");
- document.addpersonnel.EducationID.focus();
- return false;
- }
- if(document.addpersonnel.TechnicalPostID.value=="0")
- {
- alert("请选择职称!");
- document.addpersonnel.TechnicalPostID.focus();
- return false;
- }
- }
- var arrayPlace = new Array();
- <%
- Vector vPlace = PlaceManager.getAllRecord();
- for(int i=0;i<vPlace.size();i++)
- {
- out.println("arrayPlace["+ i +"]=new Array("" + ((Vector)vPlace.get(i)).get(0).toString() + "","" + ((Vector)vPlace.get(i)).get(1).toString() + "","" + ((Vector)vPlace.get(i)).get(2).toString() + "");");
- }
- %>
- function addPlace()
- {
- with(document.addpersonnel)
- {
- PlaceID.length=1;
- PlaceID.selectedIndex=0;
- for(var i=0;i < arrayPlace.length;i++)
- {
- if(arrayPlace[i][2]==DepartmentID.value)
- {
- var oOption = document.createElement("OPTION");
- PlaceID.options.add(oOption);
- oOption.innerText = arrayPlace[i][1];
- oOption.value = arrayPlace[i][0];
- }
- }
- }
- }
- </script>
- </head>
- <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0" onload="javascript:addPlace();">
- <table width="100%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="center" valign="top">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td height="50" valign="top" background="../images/dy-back.gif">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr valign="middle">
- <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
- <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">新增员工</font></strong></td>
- <td align="right" nowrap="nowrap" valign="bottom">
- <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59"> -->
- <!--单增<img src="/images/Single.gif" onMouseOver="this.src='/images/Single_a.gif';" onMouseOut="this.src='/images/Single.gif';" border="0" height="22" width="59" alt=""></a> -->
- <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59"> -->
- <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59"> -->
- <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59"> -->
- <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79"> -->
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width="100%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="center" valign="top"><p> </p>
- <form name="addpersonnel" action="AddPersonnelAction.jsp" method="post" onSubmit="javascript:return checkAddPersonnel();">
- <table width="95%" border="1" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td width="17%" align="right" valign="middle"><font color="#0A0A0A">员工编号:</font></td>
- <td width="30%" align="left" valign="middle" nowrap>
- <input name="ID" type="hidden" value="">
- <input name="Number" type="text" maxlength="50" size="20" value="">
- </td>
- <td width="12%" rowspan="5" align="right" valign="middle" nowrap><font color="#0A0A0A">所属部门:</font></td>
- <td width="41%" rowspan="5" align="left" valign="middle" nowrap>
- <input type="hidden" name="DepartmentID" id="DepartmentID" value="" onpropertychange="javascript:addPlace();">
- <iframe id="SelectDepartment" frameborder=1 src="/SelectDepartment.jsp" width="100%" height="100%" scrolling="auto"></iframe>
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">担任职务:</font></td>
- <td align="left" valign="middle" nowrap> <select name="PlaceID">
- <option value="0">请先选择所属部门再选择职务</option>
- </select> </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">员工姓名:</font></td>
- <td align="left" valign="middle" nowrap> <input name="Name" type="text" maxlength="50" size="20" value="">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">员工性别:</font></td>
- <td align="left" valign="middle" nowrap> <font color="#0A0A0A">
- <input name="Sex" type="radio" value="男" checked>
- 男
- <input name="Sex" type="radio" value="女">
- 女</font> </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">出生日期:</font></td>
- <td align="left" valign="middle" nowrap> <input name="BirthDate" type="text" value="" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value,-100,-2);" maxlength="20" size="20" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value,-100,-2);">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">身份证号码:</font></td>
- <td align="left" valign="middle" nowrap> <input name="IDCard" type="text" maxlength="18" size="20" value="">
- </td>
- <td rowspan="4" align="right" valign="middle" nowrap><font color="#0A0A0A">照片预览:</font></td>
- <td rowspan="4" align="center" valign="middle" nowrap onclick="return uploadimage(document.addpersonnel.Photo,document.all.PhotoIMG);"><img src="/images/no_pic.gif" id="PhotoIMG" height="100"><br>
- <font color="#0A0A0A">上传照片 </font></td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">婚姻状况:</font></td>
- <td align="left" valign="middle" nowrap> <select name="MarriageID">
- <option value="0" selected>请选择婚姻状况</option>
- <%
- //检索要选择的婚姻状况
- Vector vMarriage = MarriageStateManager.getAllRecord();
- for(int i=0;i<vMarriage.size();i++)
- {
- out.println("<option value="" + ((Vector)vMarriage.get(i)).get(0).toString() + "">" + ((Vector)vMarriage.get(i)).get(1).toString() + "</option>");
- }
- %>
- </select> </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">教育程度:</font></td>
- <td align="left" valign="middle" nowrap> <select name="EducationID">
- <option value="0" selected>请选择教育程度</option>
- <%
- //检索要选择的教育程度
- Vector vEducation = EducationManager.getAllRecord();
- for(int i=0;i<vEducation.size();i++)
- {
- out.println("<option value="" + ((Vector)vEducation.get(i)).get(0).toString() + "">" + ((Vector)vEducation.get(i)).get(1).toString() + "</option>");
- }
- %>
- </select> </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">最高职称:</font></td>
- <td align="left" valign="middle" nowrap> <select name="TechnicalPostID">
- <option value="0" selected>请选择职称</option>
- <%
- //检索要选择的职称
- Vector vTechnicalPost = TechnicalPostManager.getAllRecord();
- for(int i=0;i<vTechnicalPost.size();i++)
- {
- out.println("<option value="" + ((Vector)vTechnicalPost.get(i)).get(0).toString() + "">" + ((Vector)vTechnicalPost.get(i)).get(1).toString() + "</option>");
- }
- %>
- </select> </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">E-Mail:</font></td>
- <td align="left" valign="middle" nowrap> <input name="EMail" type="text" maxlength="60" size="20" value="">
- </td>
- <td align="right" valign="middle" nowrap><font color="#0A0A0A">员工照片:</font></td>
- <td align="left" valign="middle" nowrap><input name="Photo" type="text" maxlength="50" size="20" value="" onchange="javascript:document.all.PhotoIMG.src=this.value==''?'/images/no_pic.gif':this.value;"><a href="" onclick="return uploadimage(document.addpersonnel.Photo,document.all.PhotoIMG);"><font color="#0A0A0A">上传照片</font></a></td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">办公室电话:</font></td>
- <td align="left" valign="middle" nowrap> <input name="OfficeTel" type="text" maxlength="60" size="20" value="">
- </td>
- <td align="right" valign="middle"><font color="#0A0A0A">移动电话:</font></td>
- <td align="left" valign="middle" nowrap> <input name="HomeTel" type="text" maxlength="60" size="20" value="">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">家庭住址:</font></td>
- <td colspan="3" align="left" valign="middle" nowrap> <input name="HomeAddress" type="text" maxlength="100" size="60" value="">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">个人简历:</font></td>
- <td colspan="3" align="left" valign="middle" nowrap> <textarea name="Resume" cols="40" rows="5" id="Resume"></textarea>
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">备注:</font></td>
- <td colspan="3" align="left" valign="middle" nowrap> <textarea name="Remark" cols="40" rows="5" id="Remark" maxlength="20"></textarea>
- <input name="Remark1" type="hidden"> </td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- <td colspan="3" align="left" valign="middle" nowrap> <input type="submit" value="添加">
- <input type="reset" value="重填"> <input type="button" value="返回" onclick="window.location='PersonnelManage.jsp';">
- </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>