EditPersonnel.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); %>
- <%
- Request m_request = new Request(request);
- int intPersonnelID = m_request.GetInt("ID");
- if(intPersonnelID<1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("请选择正确的员工,修改失败!");
- history.back();
- </script>
- <%
- }
- else
- {
- Vector vt = PersonnelManager.getRecordByID(intPersonnelID);
- if(vt.size()==1)
- {
- %>
- <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 checkEditPersonnel()
- {
- if(document.editpersonnel.Number.value=="")
- {
- alert("请输入员工编号!");
- document.editpersonnel.Number.focus();
- return false;
- }
- if(document.editpersonnel.Name.value=="")
- {
- alert("请输入姓名!");
- document.editpersonnel.Name.focus();
- return false;
- }
- if(document.editpersonnel.DepartmentID.value=="")
- {
- alert("请选择所属部门!");
- document.editpersonnel.DepartmentID.focus();
- return false;
- }
- if(document.editpersonnel.EducationID.value=="0")
- {
- alert("请选择教育程度!");
- document.editpersonnel.EducationID.focus();
- return false;
- }
- if(document.editpersonnel.MarriageID.value=="0")
- {
- alert("请选择婚姻状况!");
- document.editpersonnel.MarriageID.focus();
- return false;
- }
- if(document.editpersonnel.PlaceID.value<1)
- {
- alert("请选择职务!");
- document.editpersonnel.PlaceID.focus();
- return false;
- }
- if(document.editpersonnel.TechnicalPostID.value=="0")
- {
- alert("请选择职称!");
- document.editpersonnel.TechnicalPostID.focus();
- return false;
- }
- if(document.editpersonnel.BirthDate.value!="")
- {
- if(!isDate(document.editpersonnel.BirthDate.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.editpersonnel.BirthDate.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.editpersonnel)
- {
- 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];
- if(arrayPlace[i][0]=="<%=((Vector)vt.get(0)).get(16).toString()%>")
- {
- oOption.selected=true;
- }
- }
- }
- }
- }
- </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"><p> </p>
- <form name="editpersonnel" action="EditPersonnelAction.jsp" method="post" onSubmit="javascript:return checkEditPersonnel();">
- <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="<%=((Vector)vt.get(0)).get(0).toString()%>">
- <input name="Number" type="text" maxlength="50" size="20" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
- </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="<%=((Vector)vt.get(0)).get(13).toString()%>" 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="<%=((Vector)vt.get(0)).get(1).toString()%>">
- </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="男" <%if(((Vector)vt.get(0)).get(2).toString().equalsIgnoreCase("男"))out.print("checked");%>>
- 男
- <input name="Sex" type="radio" value="女" <%if(((Vector)vt.get(0)).get(2).toString().equalsIgnoreCase("女"))out.print("checked");%> >
- 女</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="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"yyyy-MM-dd")%>" 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="<%=((Vector)vt.get(0)).get(7).toString()%>">
- </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.editpersonnel.Photo,document.all.PhotoIMG);"><img src="<%=((Vector)vt.get(0)).get(18).toString().length()<1?"/images/no_pic.gif":((Vector)vt.get(0)).get(18).toString()%>" 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++)
- {
- if (((Vector)vMarriage.get(i)).get(0).toString().equalsIgnoreCase(((Vector)vt.get(0)).get(15).toString()))
- out.println("<option value="" + ((Vector)vMarriage.get(i)).get(0).toString() + ""selected>" + ((Vector)vMarriage.get(i)).get(1).toString() + "</option>");
- else
- 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++)
- {
- if(((Vector)vEducation.get(i)).get(0).toString().equalsIgnoreCase(((Vector)vt.get(0)).get(14).toString()))
- out.println("<option value="" + ((Vector)vEducation.get(i)).get(0).toString() + ""selected>" + ((Vector)vEducation.get(i)).get(1).toString() + "</option>");
- else
- 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++)
- {
- if (((Vector)vTechnicalPost.get(i)).get(0).toString().equalsIgnoreCase(((Vector)vt.get(0)).get(17).toString()))
- out.println("<option value="" + ((Vector)vTechnicalPost.get(i)).get(0).toString() + ""selected>" + ((Vector)vTechnicalPost.get(i)).get(1).toString() + "</option>");
- else
- 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="<%=((Vector)vt.get(0)).get(9).toString()%>">
- </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="<%=((Vector)vt.get(0)).get(18).toString()%>" onchange="javascript:document.all.PhotoIMG.src=this.value==''?'/images/no_pic.gif':this.value;"><a href="" onclick="return uploadimage(document.editpersonnel.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="<%=((Vector)vt.get(0)).get(5).toString()%>">
- </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="<%=((Vector)vt.get(0)).get(6).toString()%>">
- </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="<%=((Vector)vt.get(0)).get(8).toString()%>">
- </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"><%=((Vector)vt.get(0)).get(10).toString()%></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"><%=((Vector)vt.get(0)).get(11).toString()%></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>
- <!-- 去掉右边图片 马登军2003年6月3日
- -->
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
- history.back();
- </script>
- <%
- }
- }
- %>