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

📄 worktipsearch.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.WorkTipRecordSet"%>
<%@ page import="java.sql.Date"%>
<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="userDeptManage" scope="page" class="cn.com.aheadsoft.manage.UserDeptManage" />

<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年6月7日

*/
	String userID=null;
	String userName=null;
	String userDeptName=null;              //新增
	String selfDeptID=null;
	
        userInfo=(UserInfo)session.getAttribute("userinfo") ;
	List userList=userPurviewManage.getUserPurview(userInfo,"5","1","q");
	if(userList==null){
		response.sendRedirect("/krm/jsp/nologin.htm");
		return;
	}
	
	String[][] userDept;
	String deptID[];
	userID=userInfo.GetUserID();
	userName=userInfo.GetRealName();
	userDeptName=userInfo.GetDeptName();
	userDept=userDeptManage.serReset(userList);
	selfDeptID=userInfo.GetDeptID();
		
	String showDeptName=null;//用于显示选择的部门名称
	String showSelectYear=null;//用于显示选择的年度
	
	/*String userIDShow=request.getParameter("user");
	String year=request.getParameter("year");
	String month=request.getParameter("month");
	String deptIDShow=request.getParameter("dept");       */
	
	String userIDShow=null;
	String year=null;
	String deptIDShow=null;
	String month=null;
	
		
	//selfDeptID=deptIDShow;
	String self[]=userDeptManage.getName(userIDShow);
	String userNameShow=self[3];
	String userDeptShow=self[1];        //新增
	Calendar calendar= Calendar.getInstance();
	int nowYear=calendar.get(Calendar.YEAR);
	if(userIDShow==null||year==null){

		deptIDShow=userInfo.GetDeptID();
		selfDeptID=userInfo.GetDeptID();
		userIDShow=userID;
		userNameShow=userName;
		userDeptShow=userDeptName;   //新增
		year=String.valueOf(nowYear);
		month=String.valueOf(calendar.get(Calendar.MONTH)+1);
	}
	
%>
<script language="JavaScript">
<!--
	isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
	isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;	

	function useSet(){
		var deptID=document.form1.deptSel.value;
		var deptUser=new Array();
		var len=document.form1.user.options.length;
		<%
			for(int i=0;i<userDept.length;i++){
				out.println("deptUser["+i+"]=new Array();");
				for(int j=0;j<4;j++){
				/*
				   如果 userDept[i][2]为空,则不显示
				   userDept[i][2]存储的是系统所有用户的 userID,该用户被禁用,则不显示
				   修改:曾红立
				   时间:2004年3月2日
				*/
				    if(null==userDept[i][2])
				      continue;
				
					out.println("deptUser["+i+"]["+j+"]='"+userDept[i][j]+"'");
				}				
			}			
		%>
		for(var i=len;i>=0;i--){
			document.form1.user.remove(i);
		}
		for(i=0;i<deptUser.length;i++){
			if(deptID==deptUser[i][0]){
				if(isIE){
					document.form1.user.options.add(new Option(deptUser[i][3],deptUser[i][2]));
				}else{
					infoid=document.createElement("option");
					infoid.value=deptUser[i][2];
					infoid.text=deptUser[i][3];					
					document.form1.user.appendChild(infoid);
				}
			}
		}
	}
	
	function changeuser(){
		//alert("A"+document.form1.user.disabled);
		document.form1.user.disabled=!document.form1.chkuser.checked;				
	}
	function changemonth(){
	        //alert("A"+document.form1.month.disabled);
		document.form1.month.disabled=!document.form1.chkmonth.checked;		
				
	}
	function changetype(){
	        //alert("A"+document.form1.month.disabled);
		document.form1.type.disabled=!document.form1.chktype.checked;						
	}

	function chanagestatus(){
	        //alert("A"+document.form1.month.disabled);
		document.form1.mystatus.disabled=!document.form1.chkmystatus.checked;						
	}

	function changememo(){
	        //alert("A"+document.form1.month.disabled);
		document.form1.memo.disabled=!document.form1.chkmemo.checked;
		if(!document.form1.memo.disabled)
		  document.form1.memo.focus();						
	}
	
	
-->
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="F1F7F9">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="F1F7F9">
  <tr>
    <td align="center">
      <fieldset style="width:95%; text-align:center">
      <legend><img src="/krm/jsp/diamanage/image/dia_gztscx.gif"></legend>
      <form name="form1" method="post" action="/krm/servlet/WorkTipServlet" >
      <%
        String status="q";
      %>
	<input type="hidden" name="status" value="<%=status%>" >
        <table border="1" width="95%" align="center" height="30%" bordercolor="A1B7DB" class="collapse">
          <tr bgcolor="3366CC"> 
           <td class="common" colspan="7" align="center"><font color="ffffff"> 
              工作提示查询</font></td>
          </tr>
          <tr> 
            <td width="50%" class="common">&nbsp;部门: 
              <select name="deptSel" onChange="useSet()">
                <%

			  		String checked="";
			  		if(deptIDShow!=null&&deptIDShow.equals(userDept[0][0])){
						checked=" selected";
					}
			  		out.println("<option value=\""+userDept[0][0]+"\""+checked+">"+userDept[0][1]+"</option>");		
					for(int i=0;i<userDept.length-1;i++){
						String temp[]=userDept[i];
						String deptID1="";
						checked="";
						deptID1=userDept[i][0];
						if(null==userDept[i+1][0])
						  continue;
						userDeptName=userDept[i][1];
						if(deptIDShow.equals(userDept[i+1][0])){
							checked=" selected";
						}
						if(!deptID1.equals(userDept[i+1][0])){
							out.println("<option value=\""+userDept[i+1][0]+"\""+checked+">"+userDept[i+1][1]+"</option>");
						}
					}
			  %>
              </select>
			</td>
			<td width="50%" class="common">
			<input type="checkbox" name="chkuser" value="0" onClick="changeuser()" >
              责 任 人: 
              <select name="user" disabled>
                <%	

					checked="";
					for(int i=0;i<userDept.length;i++){
						if(userIDShow.equals(userDept[i][2])){
							checked=" selected";
						}else{
							checked="";
						}
						/*
						  如果 userDept[i][2]为空 则不显示
						*/
						if(null==userDept[i][2])
						  continue;
						if(selfDeptID.equals(userDept[i][0])){
							out.println("<option value=\""+userDept[i][2]+"\""+checked+">"+userDept[i][3]+"</option>");
						}
					}
			  %>
              </select></td>
              </tr>
			<tr>
            <td width="50%" class="common" >&nbsp;年份: 
              <select name="year">
                <%
		  	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>
			  </td>
			  <td width="50%" class="common" >
              <input type="checkbox" name="chkmonth" value="0"  onClick="changemonth()" >
              月   份:&nbsp;&nbsp;&nbsp;&nbsp;<select name="month" disabled>
                <%
			  		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>
              月 </td>
			  
          </tr>
          <tr> 
          
            <td width="50%" class="common" >
			<input type="checkbox" name="chktype" value="0"  onClick="changetype()" >
              类别:&nbsp;&nbsp;&nbsp;&nbsp;
              <select name="type"  class="common" disabled >
  			  <option value="1">现有任务</option>
			  <option value="2">其他工作</option>
			  <option value="3">陈董思想</option>
			  <option value="4">主要信息</option>
			  <option value="5">新增任务</option>
              </select>
              </td>
            <td width="50%" class="common" colspan="2"> 
			<input type="checkbox" name="chkmystatus" value="0"  onClick="chanagestatus()" > 
			落实情况:
			 <select name="mystatus" disabled>
  			  <option value="1">已落实</option>
			  <option value="2">未落实</option>
			  <option value="3">进行中</option>
			  <option value="4">不清楚 </option>			 
              </select>
              </td>
              </tr>
           <tr>
		     <td  class="common" colspan="2">
    		 <input type="checkbox" name="chkmemo" value="0"  onClick="changememo()" >
              提示内容:
<input type="text" name="memo" class="long" disabled>
			 </td>
		   </tr>
          <tr>
	   <td class="common" colspan="4" align="center">
    		  <input name="imageField" type="image" src="/krm/jsp/image/search.gif" >
    		  &nbsp;&nbsp;&nbsp;<a href="javascript:history.back();" ><img src="/krm/jsp/image/back.gif" border="0"></a>
           </td>			  
          </tr>
        </table>
        <br>
       <table border="1" width="95%" align="center" height="20%" bordercolor="A1B7DB" class="collapse">
        <tr bgcolor="F7FDF3"> 
          <td class="common" width="5%" align="center">序号</td>
          <td class="common" width="35%" align="center">提示内容</td>
          <td class="common" width="10%" align="center">类别</td>
            <td class="common" width="10%" align="center">所属任务</td>
          <td class="common" width="10%" align="center">责任人</td>
          <td class="common" width="10%" align="center">落实情况</td>
          <td class="common" width="5%" align="center">状态</td>
          <td class="common" width="15% "align="center">提示日期</td>
        </tr>
	<%
           WorkTipRecordSet workTipRs;
           workTipRs=(WorkTipRecordSet)request.getAttribute("WorkTipRecordSet");
           if((null!=workTipRs)&&(workTipRs.size()>0)){
	      for(int i=0;i<workTipRs.size();i++){
	         workTipRs.next();
	%>      
        <tr>
          <td class="common" align="center"><%=i+1%></td>
          <td class="common" align="left">
          <a href="/krm/servlet/WorkTipListServlet?status=search&hiddenWorkID=<%=workTipRs.getWTD_ID()%>">
		  <%=workTipRs.getWTD_Memo()%></a></td>
          <%
             String type=null;
             if(workTipRs.getWTD_Type().equals("1")){
                type="现有任务";
             }else if(workTipRs.getWTD_Type().equals("2")){
                type="其他工作";
             }else if(workTipRs.getWTD_Type().equals("3")){
                type="陈董思想";
             }else if(workTipRs.getWTD_Type().equals("4")){
                type="主要信息";
             }else if(workTipRs.getWTD_Type().equals("5")){
                type="新增任务";
             }
          %>          
          <td class="common" align="center"><%=type%> </td>
          <td class="common" align="center"><%=workTipRs.getWTD_TaskName()%></td>
          <td class="common" align="center"><%=workTipRs.getUserName()%></td>
          <%
             String mystatus=null;
             if(workTipRs.getWTD_Status().equals("1")){
                mystatus="已落实";
             }else if(workTipRs.getWTD_Status().equals("2")){
                mystatus="未落实";
             }else if(workTipRs.getWTD_Status().equals("3")){
                mystatus="进行中";
             }else if(workTipRs.getWTD_Status().equals("4")){
                mystatus="不清楚";
             }else 
                mystatus="未知";                                 
          %>          
          <td class="common" align="center"><%=mystatus%></td>                              
          <%
            String flag=null;
            if(workTipRs.getWTD_Flag().equals("1")){
              flag="是";
            }else{
              flag="否";
            }                
          %>          
          <td class="common" align="center">
          <%
            if(flag.equals("否")){
          %>
          <font color="FF0000">
          <%=flag%> 
          </font>
          <%
            }else{
          %>
          <%=flag%>
          <%
            }
          %>
          </td>
          <td class="common" align="center"><%=workTipRs.getWTD_TipDate()%></td>
        </tr>
        <%
           }
         }  
        %>
       </table> 
        
	

		
       </form>
      </fieldset>
   </td>
</tr>	
</table>
 
</body>
</html>

⌨️ 快捷键说明

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