📄 humanfile_regist.jsp
字号:
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<base href="http://localhost:8080/accp_hr/"/>
<title>humanfile_regist.jsp</title>
<script type="text/javascript" src="accp_hr/interface/FirstK.js"></script>
<script type="text/javascript" src="accp_hr/interface/SecondK.js"></script>
<script type="text/javascript" src="accp_hr/interface/ThirdK.js"></script>
<script type="text/javascript" src="accp_hr/interface/Majors.js"></script>
<script type="text/javascript" src="accp_hr/interface/Standards.js"></script>
<script type="text/javascript" src="accp_hr/interface/MojarkModel.js"></script>
<script type="text/javascript" src="accp_hr/interface/MojarModel.js"></script>
<script type="text/javascript" src="accp_hr/engine.js"></script>
<script type="text/javascript" src="accp_hr/util.js"></script>
<link href="css/validator.css" rel="stylesheet" type="text/css" ></link>
<script type="text/javascript" src="js/mootools.js" ></script>
<script type="text/javascript" src="js/full-validator.js" ></script>
<script language="javascript" src="js/date.js" ></script>
<script type="text/javascript" src="js/DateTime2.js"></script>
<script type="text/javascript">
Validator.setup({
form : 'demo1',
configs : 'tag',
warns : 'alert',
triggers : 'submit, blur'
});
<!--页面加载调用函数-->
window.onload=function(){
firstFind();
minzufind();
pmajor();
guojifind();
zzmmfind();
zjxyfind();
xuelifind();
zhuanyefind();
techangfind();
jynxfind();
aihaofind();
xcbzfind();
zwflfind();
startclock();
}
//下拉框 ---未选择项
function newoption(){
nop=new Option();
//nop.value=-1;
nop.text="---未选择---";
return nop;
}
//一级机构
function firstFind()
{
FirstK.findAll(null,showFirst);
}
function showFirst(firstitem)
{
$('firstk').options.add(newoption());
DWRUtil.addOptions('firstk',firstitem,'ffkId','firstKindName');
secondFind('');
}
//二级机构
function secondFind(kid)
{
if(kid==''){
$('secondk').options.length=0;
$('thirdk').options.length=0;
$('secondk').options.add(newoption());
$('thirdk').options.add(newoption());
}else{
SecondK.findAll(kid,showSecond);
}
}
function showSecond(seconditem){
$('secondk').options.length=0;
$('secondk').options.add(newoption());
DWRUtil.addOptions('secondk',seconditem,'fskId','secondKindName');
thirdFind($('secondk').options[0].value);
}
//三级机构
function thirdFind(kid)
{
if(kid==''){
$('thirdk').options.length=0;
$('thirdk').options.add(newoption());
}else{
ThirdK.findAll(kid,showThird);
}
}
function showThird(thirditem){
$('thirdk').options.length=0;
$('thirdk').options.add(newoption());
DWRUtil.addOptions('thirdk',thirditem,'ftkId','thirdKindName');
}
//职称
function pmajor()
{
Majors.findByKind('职称',showPmajor);
}
function showPmajor(mes)
{
DWRUtil.addOptions('desig',mes,'attributeName','attributeName');
}
//国籍
function guojifind()
{
Majors.findByKind('国籍',showGuoji);
}
function showGuoji(gjitem){
DWRUtil.addOptions('guoji',gjitem,'attributeName','attributeName');
}
//民族
function minzufind(){
Majors.findByKind('民族',showMinzu);
}
function showMinzu(mzitem){
DWRUtil.addOptions('minzhu',mzitem,'attributeName','attributeName');
}
//政治面貌
function zzmmfind(){
Majors.findByKind('政治面貌',showZzmm);
}
function showZzmm(zzmmitem){
DWRUtil.addOptions('zzmm',zzmmitem,'attributeName','attributeName');
}
//宗教信仰
function zjxyfind(){
Majors.findByKind('宗教信仰',showZjxy);
}
function showZjxy(zjxyitem){
DWRUtil.addOptions('zjxy',zjxyitem,'attributeName','attributeName');
}
//学历
function xuelifind(){
Majors.findByKind('学历',showXueli);
}
function showXueli(xlitem){
DWRUtil.addOptions('xueli',xlitem,'attributeName','attributeName');
}
//专业
function zhuanyefind(){
Majors.findByKind('专业',showZhuanye);
}
function showZhuanye(zyitem){
DWRUtil.addOptions('zhuanye',zyitem,'attributeName','attributeName');
}
//特长
function techangfind(){
Majors.findByKind('特长',showTechang);
}
function showTechang(tcitem){
DWRUtil.addOptions('techang',tcitem,'attributeName','attributeName');
}
//教育年限
function jynxfind(){
Majors.findByKind('教育年限',showJynx);
}
function showJynx(jyitem){
DWRUtil.addOptions('jynx',jyitem,'attributeName','attributeName');
}
//爱好
function aihaofind(){
Majors.findByKind('爱好',showAihao);
}
function showAihao(ahitem){
DWRUtil.addOptions('aihao',ahitem,'attributeName','attributeName');
}
//薪酬标准
function xcbzfind(){
Standards.findAll(showXcbz);
}
function showXcbz(xcitem){
DWRUtil.addOptions('xcbz',xcitem,'standardId','standardName');
}
//职位分类
function zwflfind(){
MojarkModel.findAll(showZwfl);
}
function showZwfl(zwitem){
DWRUtil.addOptions('zwfl',zwitem,'majorKindId','majorKindName');
zhiweifind(zwitem[0].majorKindId);
}
//职位
function zhiweifind(mid){
MojarModel.findAll(mid,showZhiwei);
}
function showZhiwei(zwitem){
$('zhiwei').options.length=0;
DWRUtil.addOptions('zhiwei',zwitem,'makId','majorName');
}
</script>
<style type="text/css">
th{
background-color: #CCCCFF;
}
.texts{
width: 130px;
}
.texts2{
width: 200px;
}
select{
width: 130px;
}
td{
background-color: #DADEDD;
}
</style>
</head>
<BODY bgcolor="#DADEDD" style="background-image: url('images/accphr/main.jpg');background-attachment :fixed ;">
<html:form action="humanFile" styleId="demo1" enctype="multipart/form-data">
<input type="hidden" name="ophf" value="doAdd">
<input type="hidden" name="humanFile.firstKindName" id="fkn" value="" >
<input type="hidden" name="humanFile.secondKindName" id="skn" value="" >
<input type="hidden" name="humanFile.thirdKindName" id="tkn" value="" >
<input type="hidden" name="humanFile.humanMajorKindName" id="hmkn" value="" >
<input type="hidden" name="humanFile.hunmaMajorName" id="hmn" value="" >
<input type="hidden" name="humanFile.salaryStandardName" id="ssn" value="" >
<table border="1" cellspacing="0" align="center" width="95%" bordercolor="black" style="font-size: 12px">
<TR>
<Th>I级机构</Th>
<TD>
<html:select property="humanFile.firstKindId" styleId="firstk" onchange="secondFind(this.value);" >
</html:select>
<ui:v for="firstk" rule="range" empty="请选择机构" min="1" warn="请选择机构" />
</TD>
<Th>II级机构</Th>
<TD>
<html:select property="humanFile.secondKindId" styleId="secondk" onchange="thirdFind(this.value)" >
</html:select>
</TD>
<Th>III级机构</Th>
<TD colspan="2">
<html:select property="humanFile.thirdKindId" styleId="thirdk" styleClass="texts2" >
</html:select>
</TD>
<TD rowspan="5"><div style="width: 100%;height: 100%;" ><img src="" width="130" height="140" id="showp" /></div></TD>
</TR>
<TR>
<Th>职位分类</Th>
<TD>
<html:select property="humanFile.humanMajorKindId" styleId="zwfl" onchange="zhiweifind(this.value);" >
</html:select>
</TD>
<Th>职位名称</Th>
<TD>
<html:select property="humanFile.humanMajorId" styleId="zhiwei" >
</html:select>
</TD>
<Th>职称</Th>
<TD colspan="2">
<html:select property="humanFile.humanProDesignation" styleId="desig" styleClass="texts2" >
</html:select>
</TD>
</TR>
<TR>
<Th>姓名</Th>
<TD>
<html:text property="humanFile.humanName" styleId="humanname" styleClass="texts" ></html:text>
<ui:v for="humanname" rule="LimitB" empty="姓名必须填" min="4" warn="姓名不能低于两个汉字或四个字母" />
</TD>
<Th>性别</Th>
<TD>
<html:select property="humanFile.humanSex" >
<html:option value="男">男</html:option>
<html:option value="女">女</html:option>
</html:select>
</TD>
<Th>EMAIL</Th>
<TD colspan="2">
<html:text property="humanFile.humanEmail" styleId="humanemail" styleClass="texts2" ></html:text>
<ui:v for="humanemail" rule="email" warn="请输入正确的E-mail" require=false />
</TD>
</TR>
<TR>
<Th>电话</Th>
<TD><html:text property="humanFile.humanTelephone" styleClass="texts" ></html:text></TD>
<Th>QQ</Th>
<TD><html:text property="humanFile.humanQq" styleClass="texts" ></html:text></TD>
<Th>手机</Th>
<TD colspan="2"><html:text property="humanFile.humanMobilephone" styleClass="texts2" ></html:text></TD>
</TR>
<TR>
<Th>住址</Th>
<TD colspan="3"><html:text property="humanFile.humanAddress" style="width:290px;" /></TD>
<Th>个人图像</Th>
<TD colspan="2">
<input type="file" id="mypic" name="headPic" class="texts2" onfocus="showpic();" >
<ui:v for="mypic" rule="filter" empty="必须上传头像" as="file" accept="jpg, gif, png" warn="请选择正确的图片格式(jpg,gif,png)" />
</TD>
</TR>
<TR>
<Th>国籍</Th>
<TD>
<html:select property="humanFile.humanNationality" styleId="guoji" >
</html:select>
</TD>
<Th>出生地</Th>
<TD><html:text property="humanFile.humanBirthplace" styleClass="texts" /></TD>
<Th>生日</Th>
<TD><html:text property="humanFile.humanBirthday" styleClass="texts" onclick="setday(this);" value="1986-12-01" /></TD>
<Th>邮编</Th>
<TD><html:text property="humanFile.humanPostcode" styleClass="texts" /></TD>
</TR>
<TR>
<Th>宗教信仰</Th>
<TD>
<html:select property="humanFile.humanReligion" styleId="zjxy" >
</html:select>
</TD>
<Th>政治面貌</Th>
<TD>
<html:select property="humanFile.humanParty" styleId="zzmm" >
</html:select>
</TD>
<Th>身份证号码</Th>
<TD>
<html:text property="humanFile.humanIdCard" styleClass="texts" styleId="idCards" />
<ui:v for="idCards" rule="LimitB" max="18" min="15" empty="身份证必须填" warn="请输入正确的身份证" />
</TD>
<Th>民族</Th>
<TD>
<html:select property="humanFile.humanRace" styleId="minzhu" >
</html:select>
</TD>
</TR>
<TR>
<Th>年龄</Th>
<TD>
<html:text property="humanFile.humanAge" styleId="humanage" styleClass="texts" />
<ui:v for="humanage" rule="range" empty="年龄必须填" max="100" min="18" warn="请输入正确的年龄(18-100)" />
</TD>
<Th>学历</Th>
<TD>
<html:select property="humanFile.humanEducatedDegree" styleId="xueli" >
</html:select>
</TD>
<Th>教育年限</Th>
<TD>
<html:select property="humanFile.humanEducatedYears" styleId="jynx">
</html:select>
</TD>
<Th>社会保障号码</Th>
<TD><html:text property="humanFile.humanSocietySecurityId" styleClass="texts" ></html:text></TD>
</TR>
<TR>
<Th>薪酬标准</Th>
<TD>
<html:select property="humanFile.salaryStandardId" styleId="xcbz">
</html:select>
</TD>
<Th>开户行</Th>
<TD><html:text property="humanFile.humanBank" styleClass="texts" /></TD>
<Th>帐号</Th>
<TD><html:text property="humanFile.humanAccount" styleClass="texts" /></TD>
<Th>学历专业</Th>
<TD>
<html:select property="humanFile.humanEducatedMajor" styleId="zhuanye">
</html:select>
</TD>
</TR>
<TR>
<Th>建档时间</Th>
<TD>
<input type="text" name="times" id="currentTime" readonly="readonly" class="texts">
</TD>
<Th>特长</Th>
<TD>
<html:select property="humanFile.humanSpeciality" styleId="techang">
</html:select>
</TD>
<Th>爱好</Th>
<TD>
<html:select property="humanFile.humanHobby" styleId="aihao">
</html:select>
</TD>
<Th>登记人</Th>
<TD><html:text property="humanFile.register" styleClass="texts" value="${loginuser.uname}" readonly="true" /></TD>
</TR>
<TR>
<Th>个人履历</Th>
<TD colspan="7">
<html:textarea property="humanFile.humanHistroyRecords" style="width:700px"></html:textarea>
</TD>
</TR>
<TR>
<Th>家庭关系信息</Th>
<TD colspan="7">
<html:textarea property="humanFile.humanFamilyMembership" style="width:700px"></html:textarea>
</TD>
</TR>
<TR>
<Th>备注</Th>
<TD colspan="7"><html:textarea property="humanFile.remark" style="width:700px;"></html:textarea>
</TD>
</TR>
</TABLE>
<br>
<center><html:submit value="提交" onclick="setSubName();" /> <html:reset value="重置" /> <input type="button" value="查询" onclick="location.href='humanFile.do?ophf=toList'" ></center>
</html:form>
</BODY>
</HTML>
<script type="text/javascript">
<!--
function showpic(){
if($("mypic")!=null){
var pic=document.getElementById("mypic").value;
document.getElementById("showp").src=pic;
}
}
<!--给隐藏域的一级、二级机构赋值-->
function setSubName(){
//一级标题
var temp=$("firstk").options;
for(var i=0;i<temp.length;i++){
if(temp[i].selected)
$("fkn").value=temp[i].innerText;
}
//二级标题
var temp1=$("secondk").options;
for(var i=0;i<temp1.length;i++){
if(temp1[i].selected)
$("skn").value=temp1[i].innerText;
}
//三级标题
var temp2=$("thirdk").options;
for(var i=0;i<temp2.length;i++){
if(temp2[i].selected)
$("tkn").value=temp2[i].innerText;
}
//职位分类
var temp3=$("zwfl").options;
for(var i=0;i<temp3.length;i++){
if(temp3[i].selected)
$("hmkn").value=temp3[i].innerText;
}
//职位名称
var temp4=$("zhiwei").options;
for(var i=0;i<temp4.length;i++){
if(temp4[i].selected)
$("hmn").value=temp4[i].innerText;
}
//薪酬标准
var temp5=$("xcbz").options;
for(var i=0;i<temp5.length;i++){
if(temp5[i].selected)
$("ssn").value=temp5[i].innerText;
}
}
//-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -