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

📄 initialize.jsp

📁 办公自动化系统,有人事资源管理模块,考勤管理,审批管理,权限设定等.
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"  contentType="text/html; charset=utf-8"%>

<jsp:directive.page import="com.lovo.vo.mjy.TermVo;"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
	<title></title>	
	 <%
			 String count=null;
			  if((String)session.getAttribute("count")!=null){
			    	count=(String)session.getAttribute("count");
			    }else{
			    	count="1";
			    }
			 %>
	<script>
	<!--
   		function jian(){
			var nihao='';
			niaho=document.getElementById('yeshu').value;
			var shuzi= niaho-1;
			if(shuzi<=1){
					document.getElementById('shang').disabled=true;
					document.getElementById('xia').disabled=false;
					document.getElementById('yeshu').value=1;
					alert('已经到了第一页');
			}else{
					document.getElementById('xia').disabled=false;
					document.getElementById('yeshu').value=shuzi;
			}
		}
		function add(){
			var nihao='';
			nihao=document.getElementById('yeshu').value;
			var shuzi=parseInt(nihao)+1;
			var max=<%=count %>;
			if(shuzi>=parseInt(max)){
					document.getElementById('shang').disabled=false;
					document.getElementById('xia').disabled=true;
					document.getElementById('yeshu').value=max;
					alert('最后一页了');
			}else{
					document.getElementById('shang').disabled=false;
					document.getElementById('yeshu').value=shuzi;
			}
		}
		function end(){
			var max=<%=count %>;
			document.getElementById('yeshu').value=max;
		}
		function shouye(){
			document.getElementById('yeshu').value=1;
		}
		function clew(){
		   	var xx=<%=(String)request.getAttribute("nihao")%>;
			if(parseInt(xx)==3){
				alert('你今年已经过了不能在进行初始化!');
			}else if(parseInt(xx)==2){
				alert('年度初始化成功!');
			}
		}
		function judge(){ 
				var xx=<%=(String)session.getAttribute("res")%>;
				var url="<%=request.getContextPath() %>/ItemSer?button=init";
				if(xx==null){
						document.forms[0].action=url;
						document.forms[0].submit(false);
						
						alert('你应该进行年度初始化!');
					}
		}
-->
     </script>
     <style type="text/css">
	body{
		font-size: 10pt;
	}
	 *{
	 	margin: 0px;
		padding: 0px;
		border: 0px;
	 }
	  #nian{
		width: 300px;
		height: 20px;
		margin-left:200px;
		margin-top: 30px;
	 }
	 #shuju{
		width: 590px;
		height: 300px;
	   margin-left:0px;
	 }
	table{
		width:100%;
        }
	</style>
</head >

<body onload="judge();">

 <div id="biaodan">
 后勤行政-->请休假管理-->年度初始化
  <form action="<%=request.getContextPath() %>/ItemSer?button=shang" method="post">
   <div id="nian">
  	<input type="submit" name="button" value="查询" />
  	<input type="button" name="button" value="初始化" onclick="window.location='<%=request.getContextPath() %>/ItemSer?button=init&zhi=is';clew();"/>
 	</div>
  <dir id="shuju">
   <table align="center"  style="text-align:center;">
    <tr>
    <th>姓名</th>
	 <th>探亲假天数</th>
	 <th>工龄假天数</th>
	 <th>年度</th>
      <%
      String manName="",year="",gongling="",tianqing="";
      if((Vector)request.getAttribute("vector")!=null){	
      Vector ve=(Vector)request.getAttribute("vector");
   	  for(int i=0;i<ve.size();i++){
   			TermVo v1=(TermVo)ve.get(i);
   			manName=v1.getManName();
   			year=v1.getYear();
   			gongling=v1.getWeekHoliday();
   			tianqing=v1.getGoHoumeHoliday();
   			manName=new String(manName.getBytes("iso-8859-1"),"gbk");
    %>
   <tr>
    <th><%=manName %></th>
	 <th><%=tianqing %></th>
	 <th><%=gongling %></th>
	 <th><%=year %></th>
	 <%}
	 } %>
   </tr>
	<tr>
	<td colspan="8" style="background:white;">
		<span style="display:block; width:605px;text-align:right;">共<%=count %>页
		<input id="shang" type = "button" name="button" value="上一页" onclick="jian();window.location='<%=request.getContextPath() %>/ItemSer?button=shang&yeshu='+document.getElementById('yeshu').value;"/>
		<input id="xia" type = "button" name="button" value="下一页" onclick="add();window.location='<%=request.getContextPath() %>/ItemSer?button=xia&yeshu='+document.getElementById('yeshu').value;"  />
	    	<input id="shou" type = "button" name="button" value="首页" onclick="shouye();window.location='<%=request.getContextPath() %>/ItemSer?button=shou&yeshu='+document.getElementById('yeshu').value;" />
	   	 <input id="wei"  type = "button" name="button" value="尾页" onclick="end();window.location='<%=request.getContextPath() %>/ItemSer?button=wei&yeshu='+document.getElementById('yeshu').value;"/>
		<input id="id7" type = "submit" name="button" value="转至" />第<%String yeshus=(String)request.getAttribute("yeshu"); if(yeshus==null){yeshus="1";}%>
		<input type="text" size="3" name="yeshu" id="yeshu" value="<%=yeshus%>"/>页</span>
  </tr>
   </table>
 </form>
</body>
</html>

⌨️ 快捷键说明

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