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

📄 diaryinfotipapprove.jsp

📁 tomcat最新安装程序
💻 JSP
字号:
<%@ page import="java.util.*"%>
<%@ page contentType="text/html;charset=GB2312" %> 
<%@ page import="cn.com.aheadsoft.util.UserInfo"%>
<%@ page import="cn.com.aheadsoft.recordset.DiaryInfoTipRecordSet"%>
<%@ page import="cn.com.aheadsoft.recordset.PersonInfoRecordSet"%>
<%@ page import="cn.com.aheadsoft.recordset.DiaryOtherInfoTipRecordSet"%>

<jsp:useBean id="userPurviewManage" scope="page" class="cn.com.aheadsoft.manage.UserPurviewManage" />
<jsp:useBean id="userInfo" scope="page" class="cn.com.aheadsoft.util.UserInfo" />
<jsp:useBean id="diaryManage" scope="page" class="cn.com.aheadsoft.manage.DiaryManage" />
<jsp:useBean id="userDeptManage" scope="page" class="cn.com.aheadsoft.manage.UserDeptManage" />
<jsp:useBean id="diaryInfoTipRecordSet" scope="page" class="cn.com.aheadsoft.recordset.DiaryInfoTipRecordSet" />
<jsp:useBean id="diaryOtherInfoTipRecordSet" scope="page" class="cn.com.aheadsoft.recordset.DiaryOtherInfoTipRecordSet" />

<html>
<head>
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
</head>

<%

/*
   修改:曾红立
   时间:2004年3月3日
   每日信息审批页面

*/
	//权限校验
        userInfo=(UserInfo)session.getAttribute("userinfo") ;
	/*List userList=userPurviewManage.getUserPurview(userInfo,"5","3","q");
	if(userList==null){
		response.sendRedirect("/krm/jsp/nologin.htm");
		return;
	}*/ //replace by zenghongli 2004.9.7 去除数据授权信息 
	
	int userPopInt=userPurviewManage.getUserPopInt(userInfo,"5","3","q"); 	
	if(userPopInt==-2){
		response.sendRedirect("/krm/jsp/nologin.htm");
		return;
	}
		
	String status="a";//审批标志
	String year=request.getParameter("year");
	String month=request.getParameter("month");
	String date=request.getParameter("date");
	
	Calendar calendar= Calendar.getInstance();
	int nowYear=calendar.get(Calendar.YEAR);	
	if(year==null||month==null||date==null){
		year=String.valueOf(nowYear);
		month=String.valueOf(calendar.get(Calendar.MONTH)+1);
		date=String.valueOf(calendar.get(Calendar.DATE));
	}
	
	
%>
<script language="JavaScript">
<!--
	isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
	isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;	
	
	function fsubmit(){
	   document.form2.submit();	
	}
	
	function sub(){
	   document.form2.submit();
	   return true;	
	}
	
-->
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">

 <tr height="8">
	<td class="trA"> &nbsp;您的位置:工作日记 >> 每日信息 >> <font class="fontcolor">每日信息审批</font></td>
 </tr>
   <tr height="8"> 
    <td></td>
  </tr>   
  <tr>
    <td align="center">
      <form name="form1" method="post" action="/krm/servlet/DiaryInfoTipServlet">
	  <input type="hidden" name="userNameShow">
      <input type="hidden" name="status" value="<%=status%>"> 	  
	  <%//if(userList.size()!=0){%>
        <table border="0" width="98%" align="center" height="30%"  class="collapse">
          <tr > 
            <td class="tdA" colspan="7" >
              每日信息审批</td>
          </tr>          
		  <tr> 
           
			
          <td class="tdB" colspan="2"> 
              &nbsp; &nbsp;<select name="year">
          <%
		  	String checked="";
		  	for(int i=nowYear;i>2003;i--){
				if(year!=null&&year.equals(String.valueOf(i))){
			  		checked=" selected";
				}
		  %>
                <option value="<%=i%>"<%=checked%>><%=i%></option>
          <%
				}
		  %>
              </select>
              <select name="month">
			  <%
			  		for(int i=1;i<=12;i++){
					checked="";
					if(month!=null&&month.equals(String.valueOf(i))){
						checked=" selected";
					}
			  %>
                <option value="<%=i%>"<%=checked%>><%=i%></option>
				<%
					}
				%>
              </select>
              <select name="date">
			  <%
			  		for(int i=1;i<=31;i++){
					checked="";
					if(date!=null&&date.equals(String.valueOf(i))){
						checked=" selected";
					}
			  %>
                <option value="<%=i%>"<%=checked%>><%=i%></option>
                
				<%
					}
				%>
              </select>
              日&nbsp;&nbsp;&nbsp;
           <input name="imageField" type="submit" onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" value="查 询">
		<%		   
			String upyear=year;
		   if(month.equals("1")&&date.equals("1")){
		      upyear=String.valueOf(Integer.parseInt(year)-1);	
		   }
		   String upmonth=month;
			  if(month.equals("1")){
			     if(date.equals("1")){
				    upmonth=("12");		
			     }
			  }else{
			     if(date.equals("1")){
				    upmonth=String.valueOf(Integer.parseInt(month)-1);		
			     }
			  }  
			  String update=date;
              if(month.equals("5")||month.equals("7")||month.equals("10")||month.equals("12")){
				if(date.equals("1")){
				  update="30";
				}else{		   
                  update=String.valueOf(Integer.parseInt(date)-1);
				}
			  }			  
			  if(month.equals("3")){
				 if(date.equals("1")){
					 if((Integer.parseInt(year)%4==0)||(Integer.parseInt(year)%400==0&&year.
substring(2,3)=="00")){
				        update="29";
	                 }else{
					    update="28";
					 }
				 }else{					   
                   update=String.valueOf(Integer.parseInt(date)-1);
				}
			  }			 
             if(month.equals("2")||month.equals("4")||month.equals("6")||month.equals("8")||month.equals("9")||month.equals("11")||month.equals("1")){
			     if(date.equals("1")){
					update="31";
				}else{		   
                    update=String.valueOf(Integer.parseInt(date)-1);
				}
	  	     }
			 %>		   
              &nbsp;&nbsp; &nbsp;&nbsp;<input type="button" value="上一日" onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" onClick="document.location.href='/krm/servlet/DiaryInfoTipServlet?year=<%=upyear%>&month=<%=upmonth%>&date=<%=update%>&write=betoday&flag=a'" >
<%
		   String backyear=year;
		   if(month.equals("12")&&date.equals("31")){
		      backyear=String.valueOf(Integer.parseInt(year)+1);	
		   }
              String backmonth=month;
			  if(month.equals("12")){
			     if(date.equals("31")){
				    backmonth=("1");		
			     }
			  } 
			  if(month.equals("2")){
				 if((Integer.parseInt(year)%4==0)||(Integer.parseInt(year)%400==0&&year.substring(2,3)=="00")){
			        if(date.equals("29")||date.equals("30")||date.equals("31")){
				       backmonth="3";		
			        }
			     }else{
			       if(date.equals("28")||date.equals("29")||date.equals("30")||date.equals("31")){
				       backmonth="3";		
			       }
			     }
	          }
			  if(month.equals("1")||month.equals("3")||month.equals("5")||month.equals("7")||month.equals("8")||month.equals("10")){
				if(date.equals("31")){					   
                  backmonth=String.valueOf(Integer.parseInt(month)+1);
				}
	          }	          if(month.equals("4")||month.equals("6")||month.equals("9")||month.equals("11")){
				if(date.equals("30")||date.equals("31")){					   
                  backmonth=String.valueOf(Integer.parseInt(month)+1);
				}
	          }
			  String backdate=date;
              if(month.equals("1")||month.equals("3")||month.equals("5")||month.equals("7")||month.equals("8")||month.equals("10")||month.equals("12")){
				if(date.equals("31")){
				  backdate="1";
				}else{		   
                  backdate=String.valueOf(Integer.parseInt(date)+1);
				}
			  }			  if(month.equals("4")||month.equals("6")||month.equals("9")||month.equals("11")){
				if(date.equals("30")||date.equals("31")){
				  backdate="1";
				}else{		   
                  backdate=String.valueOf(Integer.parseInt(date)+1);
				}
			  }	
			  if(month.equals("2")){
			  	 if((Integer.parseInt(year)%4==0)||(Integer.parseInt(year)%400==0&&year.substring(2,3)=="00")){
				 	               if(date.equals("29")||date.equals("30")||date.equals("31")){
				        backdate="1";
	                 }else{
 					    backdate=String.valueOf(Integer.parseInt(date)+1);
					 }
	             }else{
					 if(date.equals("28")||date.equals("29")||date.equals("30")||date.equals("31")){
				        backdate="1";
	                 }else{
 					    backdate=String.valueOf(Integer.parseInt(date)+1);
					 }
				 }				 
			  }           
%>			  
			  &nbsp;&nbsp;<input type="button" value="下一日" onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" onClick="document.location.href='/krm/servlet/DiaryInfoTipServlet?year=<%=backyear%>&month=<%=backmonth%>&date=<%=backdate%>&write=betoday&flag=a'" >
		  
             </td>              
          </tr>

        </table>
       </form> 
       
       <%
         status="approve";
       %>
        
      <form name="form2" method="post" action="/krm/servlet/DiaryInfoTipServlet">      
        <table border="0" width="98%" align="center" height="20%"  class="collapse">
        <input type="hidden" name="status" value="<%=status%>"> 	          
          <tr  width="95%"> 
            <td class="tdA" colspan="13" ><div align="center">每日信息</div></td>
          </tr>
          <tr align="center" > 
                    
            <td class="tdB" width="4%">日期</td>
            <td class="tdB" width="6%">姓名</td>
            <td class="tdB" width="4%" >工作</td>
            <td class="tdB" width="4%">学习</td>
            <td class="tdB" width="4%">运动</td>
            <td class="tdB" width="4%">休息</td>
            <td class="tdB" width="19%">上午</td>
            <td class="tdB" width="19%">下午</td>
            <td class="tdB" width="19%">晚上</td>
            <td class="tdB" width="17%">备注</td>
          </tr>
        <%
           /*  得到高层领导每日信息记录 */
           diaryInfoTipRecordSet=(DiaryInfoTipRecordSet)request.getAttribute("M_DiaryInfoTipRecordSet");
           
           /*  得到高层领导记录 */
           List manageNames=new ArrayList();
           manageNames=(List)request.getAttribute("ManageNames");
           
           String dateStr=null;
           if(null!=diaryInfoTipRecordSet){
               int size=diaryInfoTipRecordSet.size();               
               String uid=null;
               String name=null;
               String strTemp=null;
               int iPos=0;
               for(int i=0;i<size;i++){
                  diaryInfoTipRecordSet.next();        
                  strTemp=(String)manageNames.get(i);
                  iPos=strTemp.indexOf('-');
                  uid=strTemp.substring(0,iPos);
                  name=strTemp.substring(iPos+1);
                  String memoInfo=null;
                  memoInfo=diaryInfoTipRecordSet.getDIT_MemoInfo();
                  if(memoInfo.length() > 254){
		            memoInfo = memoInfo.substring(0,254)+".";
		           }
                  
        %>
          <tr> 
                  
            <td width="6%" class="common" nowrap><%=diaryInfoTipRecordSet.getDIT_WriteDate()%></td>
            <%
              dateStr=diaryInfoTipRecordSet.getDIT_WriteDate();
            %>
            <input type="hidden" name="date" value="<%=diaryInfoTipRecordSet.getDIT_WriteDate()%>"> 
            <input type="hidden" name="manageUserID" value="<%=uid%>">             	          
            <td width="6%" class="common" align="center"><%=name%></td>
            <td width="4%" class="common" align="center"><%=diaryInfoTipRecordSet.getDIT_WorkTime()%></td>
            <td width="2%" class="common" align="center"> <%=diaryInfoTipRecordSet.getDIT_StudyTime()%></td>
            <td width="2%" class="common" align="center"><%=diaryInfoTipRecordSet.getDIT_SportTime()%></td>
            <td width="2%" class="common" align="center"><%=diaryInfoTipRecordSet.getDIT_RestTime()%></td>
            <td width="19%" class="common" align="center"><%=diaryInfoTipRecordSet.getDIT_MorningInfo()%></td>
            <td width="19%" class="common" align="center"><%=diaryInfoTipRecordSet.getDIT_AfternoonInfo()%></td>
            <td width="19%" class="common" align="center"><%=diaryInfoTipRecordSet.getDIT_NightInfo()%></td>
            <td width="17%"class="common" align="center"><%=memoInfo%></td>            
          </tr>
        <%
           ;}
         }          
        %>  
          
        </table>
        
        <br>
        <table border="0" width="98%" align="center" height="20%"  class="collapse">
          <tr  width="95%"> 
            <td class="tdA" colspan="13" ><div align="center">其他信息</div></td>
          </tr>
          <tr align="center" > 
            <td class="tdB" width="5%">序号</td>          
            <td class="tdB" width="10%">日期</td>
            <td class="tdB" width="60%">内容</td>
            <td class="tdB" width="20%">备注</td>
          </tr>

        <%
            diaryOtherInfoTipRecordSet=(DiaryOtherInfoTipRecordSet)request.getAttribute("M_DiaryOtherInfoTipRecordSet");        
            
            if(null!=diaryOtherInfoTipRecordSet){
               int size=diaryOtherInfoTipRecordSet.size();
               for(int i=0;i<size;i++){
                  diaryOtherInfoTipRecordSet.next();
        %>
          <tr > 
            <td align="center" width="5%" class="common"><%=i+1%></td>          
            <td align="center" width="15%" class="common"><%=diaryOtherInfoTipRecordSet.getDOIT_WriteDate()%></td>
            <td width="45%" class="common" align="center"><%=diaryOtherInfoTipRecordSet.getDOIT_Info()%></td>
            <td width="35%" class="common" align="center"><%=diaryOtherInfoTipRecordSet.getDOIT_MemoInfo()%></td>
          </tr>
        <%
          ;}
          }
        %>
       </table> 
       
       <table width="98%" >
         <tr>
            <td class="tdC" align="center"> <input type="button" onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" value="全审通过" onClick="document.location.href='/krm/servlet/DiaryInfoTipServlet?write=approveall&dateStr=<%=dateStr%>'">
              <input name="button" type="button" onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" onClick="history.back(1);" value="返 回" > 
            </td>
         </tr>
       </table>
		
		<%//}else{%>
		<!--<table border="0" width="100%" align="center" height="20%"  class="collapse">
          <tr> 
            <td class="common"  align="center">您没有可查看的数据!请与管理员联系</td>
          </tr>
		  </table>-->
		
      <%//}%>
  	  </form>      
   </td>
</tr>	
</table>
 
</body>
</html>

⌨️ 快捷键说明

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