⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 majorrelease_regist.jsp

📁 人力资源管理系统
💻 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" %>
<%@ taglib uri="/WEB-INF/tld/page.tld" prefix="page" %>


<html>
  <head>
    <base href="http://localhost:8080/accp_hr/">
    <title>职位发布页面</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/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>
	<script type="text/javascript" src="js/DateTime2.js"></script>
	<script language="javascript" src="js/date.js" ></script>
	<script type="text/javascript">
		window.onload=function(){
			firstFind();
			zwflfind();
			startclock();
		}
		
		function newoption(){
			nops=new Option();
			nops.value=-1;
			nops.text="---未选择---";
			return nops;
		}
		
		//一级机构
		function firstFind()
		{
			FirstK.findAll(null,showFirst);
		}
		function showFirst(firstitem)
		{
			$('firstk').options.add(newoption());
			DWRUtil.addOptions('firstk',firstitem,'ffkId','firstKindName');
			secondFind(-1);
		}
		//二级机构
		function secondFind(kid)
		{
			if(kid==-1){
				$('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(seconditem[0].fskId);
		}
		
		//三级机构
		function thirdFind(kid)
		{
			if(kid==-1){
				$('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 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">
		.texts{
			width:130px;
		}
		
		.texts3{
			background-color: transparent;
			border-style: none;
		}
		
	</style>
  </head>
  
  <body bgcolor="#DADEDD" style="background-image: url('images/accphr/main.jpg');background-attachment :fixed ;">
    <center>职位发布</center>
    <br>
    <html:form action="majorRelease" onsubmit="return tijiao();">
    <input type="hidden" name="opmr" value="doAdd">
    <table border="1" cellspacing="0" align="center" width="95%" bordercolor="black" style="font-size: 12px">
     	<tr>
     		<th>Ⅰ级机构</th>
     		<td>
     			<input type="hidden" name="majorRelease.firstKindName" value="" id="fkn">
     			<html:select property="majorRelease.firstKindId" styleId="firstk" onchange="secondFind(this.value);" styleClass="texts" >
   						</html:select>
     		</td>
     		<th>Ⅱ级机构</th>
     		<td>
     			<input type="hidden" name="majorRelease.secondKindName" value="" id="skn">
     			<html:select property="majorRelease.secondKindId" styleId="secondk" onchange="thirdFind(this.value)" styleClass="texts" >
     					</html:select>
     		</td>
     		<th>Ⅲ级机构</th>
     		<td>
     			<input type="hidden" name="majorRelease.thirdKindName" value="" id="tkn">
     			<html:select property="majorRelease.thirdKindId" styleId="thirdk" styleClass="texts" >
		   				</html:select>
     		</td>
     		<th>招聘类型</th>
     		<td>
     			<html:select property="majorRelease.engageType">
     				<html:option value="社会招聘">社会招聘</html:option>
     				<html:option value="校园招聘">校园招聘</html:option>
     			</html:select>
     		</td>
     	</tr>
     	<tr>
     		<th>职位分类</th>
     		<td>
     			<input type="hidden" name="majorRelease.majorKindName" value="" id="hmkn" >
     			<html:select property="majorRelease.majorKindId" styleId="zwfl" onchange="zhiweifind(this.value);" styleClass="texts" >
		   				</html:select>
     		</td>
     		<th>职位名称</th>
     		<td>
     			<input type="hidden" name="majorRelease.majorName" id="hmn">
     			<html:select property="majorRelease.majorId" styleId="zhiwei" styleClass="texts" >
		   				</html:select>
     		</td>
     		<th>招聘人数</th>
     		<td>
     			<html:text property="majorRelease.humanAmount" styleId="zprs" styleClass="texts" ></html:text>
     		</td>
     		<th>截止日期</th>
     		<td>
     			<html:text property="majorRelease.deadline" onclick="setday(this);" value="2009-01-01" styleClass="texts" ></html:text>
     		</td>
     		
     	</tr>
     	<tr>
     		<th>登记人</th>
     		<td>
     			<html:text property="majorRelease.register" value="${loginuser.uname}" readonly="true" styleClass="texts3"></html:text>
     		</td>
     		<th>登记时间</th>
     		<td>
     			<input type="text" name="times" id="currentTime" readonly="readonly" class="texts3">
     		</td>
     		<th>&nbsp;</th>
     		<td>&nbsp;</td>
     		<th>&nbsp;</th>
     		<td>&nbsp;</td>
     	</tr>
     	<tr>
     		<th>职位描述</th>
     		<td colspan="7">
     			<html:textarea property="majorRelease.majorDescribe" style="width:100%;background-color: transparent;" rows="5"></html:textarea>
     		</td>
     	</tr>
     	<tr>
     		<th>招聘要求</th>
     		<td colspan="7">
     			<html:textarea property="majorRelease.engageRequired" style="width:100%;background-color: transparent;" rows="5" ></html:textarea>
     		</td>
     	</tr>
	 </table>
	 <br>
	 	<center><html:submit value="提交" /></center>
    </html:form>
  </body>
</html>
<script type="text/javascript">
<!--
	<!--给隐藏域的一级、二级机构赋值-->
	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;
		}
		
	
	}
	
	//验证
	function tijiao(){
		setSubName();
		if(document.getElementById("firstk").value==-1){
			alert("请选择机构");
			return false;
		}
		var mount=document.getElementById("zprs").value;
		if(mount==''){
			alert("请输入招聘人数");
			return false;
		}
		if(isNaN(mount)){
			alert("请输入正确的人数");
			return false;
		}
		
	}
//-->
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -