📄 dipwaste.jsp
字号:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,oa.main.DealString"%>
<%
oa.bean.PersonBean myBean = null;
try{
myBean = new oa.bean.PersonBean();
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"));
%>
<br>
<div align=center>
<font style='font-size: 24px;font-weight: bold;font-family: "楷体_GB2312";'><b>离退休及已挂起人员信息列表<b></font>
<hr align="center" width="95%" size="2" noshade>
</div>
<TABLE cellSpacing=1 cellPadding=0 width="95%" align=center bgColor=#000000 style="word-break;break-all;">
<TBODY>
<TR bgColor=#FFFFFF height=20>
<TD >
<CENTER><B>工号</B></CENTER></TD>
<TD>
<CENTER><B>姓名</font></B></CENTER></TD>
<TD >
<CENTER><B>性别</font></B></CENTER></TD>
<TD ><!--<font color="#9933CC">-->
<CENTER><B>在职状态</font></B></CENTER></TD>
<TD>
<CENTER><B>操作</B></CENTER></TD>
</TR>
<%
myBean.setOrgNO(strOrgNO);
Vector vect = new Vector();
if(strOrgNO.equals("00000000000000000000"))
{
vect = (Vector)myBean.getWastePs(true);
}
else
{
vect = (Vector)myBean.getWastePs(false);
}
Hashtable ht = (Hashtable)vect.get(0);
String sql = (String)ht.get("sql");
String bm = (String)request.getParameter("bm");
if(bm==null || bm.equals("")) bm = "1";
int cur = Integer.parseInt(bm);
int recsum = ((Integer)vect.get(vect.size()-1)).intValue();
vect = (Vector)myBean.getOnePage(sql,cur,10);
int sum = Integer.parseInt((String)vect.get(0));
String bgcolor="";
String bmchg = "",bmchgmax="";
boolean flgbmchg = true;
for(int i=1;i<vect.size();i++)
{
if ((i%2)!=0) {
bgcolor="#FFFFFF";
}else {
bgcolor="#ffffff";
}
Hashtable hash = (Hashtable)vect.get(i);
String strBH0 = (String)hash.get("BMBH");//部门编号
String strBH = myBean.getApartName(strBH0);//部门名称
strBH = myBean.getApartName(strBH0);
String strBH1 = (String)hash.get("ZGBH");
String strXM = (String)hash.get("XM");
String strXB = (String)hash.get("XB");
String strZZZT = (String)hash.get("ZZZT");
if(strZZZT.equals("1"))strZZZT="离职";
if(strZZZT.equals("2"))strZZZT="退休";
if(strZZZT.equals("3"))strZZZT="挂起";
String strGH = (String)hash.get("GH");
//String strOper = "";//(String)hash.get("CZQX");
//String strFlow = "";//(String)hash.get("LCQX");
String strConf = (String)hash.get("PZCS");
String strOper1="",strFlow1="",strConf1="";
myBean.setPersonNO(strBH1);
strOper1 = "模块操作权限";
String strOper = myBean.toOperName(myBean.getOper());
strFlow1 = "流程操作权限";
String strFlow = myBean.toFlowName(myBean.getFlow());
strConf1 = "网络资源配置";
strConf = myBean.getConf();
%>
<%//判断部门是否变了
if(!strBH0.equals(bmchg))
{
flgbmchg = true;
bmchg = strBH0;
bmchgmax = myBean.getFatherName(strBH0);
if(bmchgmax!=null && !bmchgmax.equals(""))
bmchgmax +=strBH;
else if(bmchgmax==null || bmchgmax.equals(""))
bmchgmax = strBH;
}
else if(strBH0.equals(bmchg))
{
flgbmchg = false;
}
if(flgbmchg)
{
%>
<TR bgColor="#FFFFFF" height=20>
<TD colspan="8" align=left><%=bmchgmax%></TD><!--部门名称-->
</TR>
<%
}
%>
<TR bgColor="<%=bgcolor%>" height=20>
<TD width=60 align=center><%=strGH%></TD>
<TD width=90 title="查看详细信息" align=center><A onclick="viewinf('<%=strBH1%>');" style="cursor:hand;"><font color="#000000"><%=strXM%></font></a></TD>
<TD width=40 align=center><%=strXB%></TD>
<TD width=60 align=center><%=strZZZT%></TD>
<TD align=center>
<FONT color="#000000">
<A title="删除人员"onclick="delps('<%=strBH1%>','<%=strXM%>')" style="cursor:hand;">删除</A> | <A title="恢复人员"onclick="resume('<%=strBH1%>','<%=strXM%>')" style="cursor:hand;">恢复</A>
</FONT>
</TD>
</TR>
<%
}
int t =-1;
int s = -1;
%>
<tr height=25>
<TD align=right colspan=8 bgColor=#FFFFFF>
共有记录数:<%=recsum%>
<%if(vect.size()>1){%>
当前<%=cur%>/<%=sum%>页   <a onclick="firsrpg()" style="cursor:hand">第一页    </a> <!--href="index.jsp?txt_type=3&bm=1"-->
<%if(cur>1){ t=cur-1;%>
<a onclick="lastpg()" style="cursor:hand">上一页    </a><%}%><!--href="index.jsp?txt_type=3&bm=<%=t%>"-->
<%if(cur<sum){ s=cur+1;%>
<a onclick="nextpg()" style="cursor:hand">下一页   </a><%}%>  
<!--href="index.jsp?txt_type=3&bm=<%=s%>"-->
<a onclick="finalpg()" style="cursor:hand">最后页    </a><!--href="index.jsp?txt_type=3&bm=<%=sum%>"-->
直接<input type=image src="../images/hand.gif" name="gotof" onclick="return chkdata()">
<input type=text size=5 name=bm class=formcolor>页</TD>
<%}%>
</tr>
</TBODY></TABLE>
<script>
function firsrpg()
{
document.all.txt_type.value = "3";
document.all.txt_edit.value = "5";
document.all.form1.action = "index.jsp?bm=1";
document.all.form1.submit();
}
function lastpg()
{
document.all.txt_type.value = "3";
document.all.txt_edit.value = "5";
document.all.form1.action = "index.jsp?bm="+<%=t%>;
document.all.form1.submit();
}
function nextpg()
{
document.all.txt_type.value = "3";
document.all.txt_edit.value = "5";
document.all.form1.action = "index.jsp?bm="+<%=s%>;
document.all.form1.submit();
}
function finalpg()
{
document.all.txt_type.value = "3";
document.all.txt_edit.value = "5";
document.all.form1.action = "index.jsp?bm="+<%=sum%>;
document.all.form1.submit();
}
function delps(personno,person_name)
{
if(!confirm("确定要从数据库中永久删除 \""+person_name+"\" 的信息吗?"))
{
}
else
{
document.all.txt_type.value = "3";
document.all.txt_personno.value = personno;
document.all.txt_edit.value = "4";
document.all.form1.action = "../../Org";
document.all.form1.submit();
}
}
function resume(personno,person_name)
{
if(!confirm("确定要恢复 \""+person_name+"\" 的信息吗?"))
{
}
else
{
document.all.txt_type.value = "3";
document.all.txt_personno.value = personno;
document.all.txt_edit.value = "5";
document.all.form1.action = "../../Org";
document.all.form1.submit();
}
}
function viewinf(personno)
{
document.all.txt_type.value = "3";
document.all.txt_edit.value = "4";
document.all.txt_personno.value = personno;
document.all.form1.action = "index.jsp";
document.all.form1.submit();
}
function viewcont(strcont)
{
var url = "";
url = "viewqx.jsp?strcont="+strcont;
var hWnd = window.open(url,"HelpWindow","width=300,height=235,resizable=yes,scrollbars=yes");
if ((document.window != null) && (!hWnd.opener))
hWnd.opener = document.window;
hWnd.focus();
}
function chkdata()
{
document.all.txt_type.value = 3;
if(!isDigit(document.all.bm.value))
{
alert("输入的页码不是数字!");
document.all.bm.value="";
document.all.bm.focus();
return false;
}
if(document.all.bm.value=="")
{
alert("请输入页码!");
document.all.bm.value="";
document.all.bm.focus();
return false;
}
else
{
var t = document.all.bm.value;
var cur = <%=cur%>;
var sum = <%=sum%>;
while(t.length>cur.length)
{
alert("请跳至1和"+sum+"之间!");
document.all.bm.value="";
document.all.bm.focus();
return false;
}
if(t==cur){return false;}
while(t.length>sum.length)
{
alert("请跳至1和"+sum+"之间!");
document.all.bm.value="";
document.all.bm.focus();
return false;
}
if(t<1||t>sum)
{
alert("请跳至1和"+sum+"之间!");
document.all.bm.value="";
document.all.bm.focus();
return false;
}
}
return true;
}
function isDigit(str)
{
var bool = true;
for(var i=0;i<str.length;i++)
{
if(!(str.charAt(i)>=0&&str.charAt(i)<=9))
{
bool = false;
break;
}
}
return bool;
}
</script>
<%}finally{
if(myBean!=null)myBean.closeConn();
}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -