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

📄 persondutylbh.jsp

📁 “JSP数据库项目案例导航”一书从第一章到第十一章各章实例的源程序文件以及数据库文件。 注意: 1. 本书中的案例提供的数据库环境不同
💻 JSP
字号:
<%
/**********************************************************
Copyright (C),2003-10-18, Beijing  USTB.
All rights reserved.
Filename: workerDuty.jsp
Author:    
Version 1.0
Date:2003-10-18
Description:个人职务管理.jsp
Function List://主要方法列表
1.  ...
History://修改历史纪录表,包括修改日期、修改者、修改内容简述
1.  Date:2003-10-18
    Author:
    Modification:
2.Date:2003-10-22
    Author:
    Modification:修改  
***********************************************************/
%>
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,oa.main.DealString"%>

<%
oa.bean.PersonDutyBean myBean = null;
oa.bean.DepartmentBean dpBean = null;
try{
	myBean = new oa.bean.PersonDutyBean(); 
	dpBean = new oa.bean.DepartmentBean(); 

	if(myBean.getConn()==null || dpBean.getConn() == null)
	{
		%>		
		数据库无法响应,请<a href="javascript:window.history.back(-1);">返回</a>重试
		<%out.close();
	}

  	DealString ds = new DealString();
	//取得菜单类别
	String strType = ds.toString((String)request.getParameter("txt_type"));

	//组织机构编号
	String strOrgNO = ds.toString((String)request.getParameter("txt_orgno"));

	//职务编号
	String strDutyNO = ds.toString((String)request.getParameter("txt_dutyno"));

	//增删改类型
	String strEdit = ds.toString((String)request.getParameter("txt_edit"));
		if(strType.equals(""))strType = "3";
	//取得当前人员编号
	String strPersonNo = ds.toString((String)request.getParameter("txt_personno"));
%>

<table id="t1" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="D0E7FF" width="100%" height="2">
   <tr bgColor="#ffffff" height="22">
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" value="确定" class=fashion onmouseover="msover();" onmouseout="msout();" onclick="return toServlet(1)">
		&nbsp;
<!--		<input type="button" value="删除" class=fashion onmouseover="msover();" onmouseout="msout();" onclick="return toServlet(2)">-->
		&nbsp;
		<input type="button" value="取消" class=fashion onmouseover="msover();" onmouseout="msout();"onclick="javascript:history.back();">			
	 </td>
   </tr>
 </table>
<table class="tab" cellSpacing="0" cellPadding="0" width="100%" border="0">
 <tbody>
    <tr align="left" bgColor="#2969b5" height="22">
       <td></td></tr></tbody></table>

<%
	String bmMC = myBean.getOrgName(strOrgNO);
	String zgXM = myBean.getPersonName(strPersonNo);
	String mixName = myBean.getBMMC_ZWMC(strPersonNo);
%>
	<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=3 ALIGN=center style="table-layout:fixed;word-break:break-all" align=center>
		<tr align=center bgColor="#d0e7ff" height="22">
		  <td width="30%" align="right">将被分配职务的职工:</td>
		  <td width="22%" align="center"> &nbsp;部门名称:</td>         
		  <td width="22%" align="left" bordercolor="#F6FEE8">
          <font color="#FFFFFF"><span style="background-color: #d0e7ff">
		  <input type="text" size="20" value="<%=bmMC%>" name="txt_personBmName" class=txtframe style="background-color: #d0e7ff; color: #000000; border-style: solid; border-color: #d0e7ff" readonly> 		  	  
          </span></font> 
		  		  
		  </td>
		  <td width="22%" > </td>

		</tr>
		<tr align=center  bgColor="#ffffff" height="22">
		  <td width="30%" > </td>
		  <td width="22%" align="center"> &nbsp;职工编号:</td>
		  <td width="22%" align="left">
		  <input type="text" size="20" value="<%=strPersonNo%>" name="txt_personNo" class=txtframe bgcolor=#D0E7FF style="background-color: #ffffff; border-style: solid; border-color: #ffffff" readonly> 		  
		  </td>
		  <td width="22%" > </td>

		</tr>
		<tr align=center bgColor="#d0e7ff" height="22">
		  <td width="30%" > </td>
		  <td width="22%" align="center"> &nbsp;职工姓名:</td>
		  <td width="22%" align="left">
		  <input type="text" size="20" value="<%=zgXM%>" name="txt_personName" class=txtframe style="background-color: #d0e7ff; border-style: solid; border-color: #d0e7ff" readonly> 		  
		  </td>
		  <td width="22%" > 
		  </td>
		</tr>
		<tr align=center bgColor="#ffffff" >
		  <td width="30%" > </td>
		  <td width="22%" align="center">&nbsp;&nbsp;已分配职务:</td>
		  <td colspan="2" width=""align="left">
			<textarea rows="7" name="zwmc" cols="50" style="border-style: double; border-color: #d0e7ff" readonly><%=mixName%></textarea>
		   </td>
		</tr>
		<tr>
		  <td width="30%" bgColor="#d0e7ff" height="22">&nbsp;&nbsp;</td>
		  <td width="22%" bgColor="#d0e7ff" height="22">&nbsp;&nbsp;</td>
		  <td width="22%" bgColor="#d0e7ff" height="22">&nbsp;&nbsp;</td>
		  <td width="22%" bgColor="#d0e7ff" height="22">&nbsp;&nbsp;</td>
		</tr>
		<tr align=center bgColor="#ffffff" height="22">
		  <td width="30%" align="right">将被分配的职务:
		  <input type=hidden size="15" value="www" name="hid_dutybmno" class=txtframe readonly onchange="selduty0();"> <!-----------------隐藏框储存所选部门编号---------------------->
		  </td>
		  <td width="22%" align="center"> &nbsp;部门名称:</td>
		  <td width="22%" align="left">
		  <input type="text" size="20" value="" name="txt_dutyBmName" class=txtframe readonly> 		  
		  </td>
		  <td width="22%" align=""> 
            <input type="button" value="选择部门" name="bmmcxz" class=fashion onmouseover="msover();" onmouseout="msout();" onclick="selduty()"> <!--gototree() -->
          </td>

		</tr>
		<tr bgColor="#d0e7ff" height="22">
		  <td width="30%" > </td>
		  <td width="22%" align="center">&nbsp;职务名称:</td>
		  <td width="22%" align="left">
			<select name=leftselect size=1 style="width:130;" onclick="">
			<option value="">qqq</option>
<script>
	function selduty0()
	{
		alert("eeeeeeeeeeeeeeeee");
	}

	function selduty()
	{
		<%
		String bmno = (String)request.getParameter("hid_dutybmno");
		Vector vt = new Vector();
		//Vector vt1 = new Vector();
		
		if(bmno!=null && !bmno.equals(""))
		{
		//得到所有的职务名称
			dpBean.setID("00000000000000000000");
			vt = (Vector)dpBean.getDutyName();
			for(int i=0;i<vt.size();i++)
			{
				String zwName = (String)(((Hashtable)(vt.get(i))).get("ZWMC"));	
				//vt1.add(zwName);
		%>
		alert("qqqqqqqqqqqqqqq");
			document.write("<option value="<%=zwName%>">"<%=zwName%>"</option>");
		<%
			}
		}
		%>
		alert("wwwwwwww");
	}
</script>		 
		</select>		  
		
		
		<input type="text" size="20" value="" name="txt_dutyName" class=txtframe readonly> 		  
		 
		  
		  </td>
		  <td width="22%" > </td>

		</tr>		
	</table>
<script>
	function toServlet(edittype)
	{
		if(document.all.form1.txt_dutyBmName.value=="")
		{
			alert("部门名称不能为空!");
			return false;
		}		
		if(edittype==1)
		{
			document.all.txt_edit.value = "1";//新增
		}
		if(edittype==2)
		{
			document.all.txt_edit.value = "3";//删除
		}
		document.all.txt_type.value = "4";//个人职务表
		document.all.form1.action="PersonDuty.jsp"
		document.all.form1.submit();
		return false;
	}
	function gototree()
	{
		var url = "";
		url = "selDadbm.jsp?flg=2";
		var hWnd = window.open(url,"HelpWindow","width=500,height=335,resizable=no,scrollbars=yes");
	   if ((document.window != null) && (!hWnd.opener)) 
		   hWnd.opener = document.window;
	   hWnd.focus();
	}
	/*function toSelOrgPage()
	{
		document.all.txt_type.value = "4";
		document.all.txt_edit.value = "4";//操作:选择部门
		document.all.form1.action="SelectOrg.jsp"//转向部门页面
		document.all.form1.submit();
		return false;
	}*/
</script>
<%}finally{
if(myBean!=null)myBean.closeConn();
if(dpBean!=null)dpBean.closeConn();
}%>

⌨️ 快捷键说明

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