📄 persondutyright.jsp
字号:
<%
/**********************************************************
PersonDutyRight.jsp
Copyright (C),2003-10-18, Beijing USTB.
All rights reserved.
Filename: workerDuty.jsp
Author:
Version 1.0
Date:2003-10-18
Description:修改个人职务权限
*************************************************************/
%>
<%@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;
oa.bean.PersonBean psBean = null;
try{
myBean = new oa.bean.PersonDutyBean();
dpBean = new oa.bean.DepartmentBean();
psBean = new oa.bean.PersonBean();
if ( myBean.getConn() == null
|| dpBean.getConn() == null
|| psBean.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"));
//取得当前人员编号
String strPersonNo = ds.toString((String)request.getParameter("txt_personno"));
//第几页
String strPage = ds.toString((String)request.getParameter("txt_page"));
%>
<br>
<div align=center>
<font color="#CC00FF" size=2><b>分配特殊权限<b></font>
</div>
<br>
<table id="t1" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="D0E7FF" width="100%" height="2">
<tr bgColor="#ffffff" height="22">
<input type="button" value="确定" class=fashion onmouseover="msover();" onmouseout="msout();" onclick="toServlet()">
<input type=reset class=fashion onmouseover="msover();" onmouseout="msout();">
<input type="button" value="返回" class=fashion onmouseover="msover();" onmouseout="msout();"onclick="todutypg()">
</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 selectedDuty = ds.toGBK(request.getParameter("selectedDuty"));
String bmbh = dpBean.getBMBH(strPersonNo);
String bmMC = psBean.getFatherName(bmbh);//strOrgNO
bmMC+= myBean.getOrgName(bmbh);
String zgXM = myBean.getPersonName(strPersonNo);
String strzgNo = psBean.getZGGH(strPersonNo);
Vector vct = myBean.getData(strPersonNo);
String mixName = "";
for(int i=0;i<vct.size();i++)
{
Hashtable hash=(Hashtable)vct.get(i);
String bmmc = myBean.getOrgName((String)hash.get("BMBH"));
myBean.setDutyOrgNo((String)hash.get("BMBH"));
String zwmc = myBean.getDutyName((String)hash.get("ZWBH"));
mixName += bmmc+":"+zwmc+"\n";
}
String[] strDuties = mixName.split("\n");
int j=0;
if(selectedDuty==null||selectedDuty.equals("")){j=0;}
else
for(j=0;j<strDuties.length;j++){
if(strDuties[j].equals(selectedDuty))
break;
}
if(j==strDuties.length) {
j=0;
selectedDuty=strDuties[0];
}
String dutybmno=(String)((Hashtable)vct.get(j)).get("BMBH");
String dutyzwno=(String)((Hashtable)vct.get(j)).get("ZWBH");
Vector dutyRightVect = myBean.getDutyRight(strPersonNo,dutybmno,dutyzwno);
String oper = "";
String flow = "";
if(dutyRightVect!=null)
{
oper = ds.toString((String)dutyRightVect.get(0));
flow = psBean.toFlowName(ds.toString((String)dutyRightVect.get(1)));
}
%>
<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"> 部门名称:</td>
<td width="45%" align="left" bordercolor="#F6FEE8"><%=bmMC%>
</td>
</tr>
<tr align=center bgColor="#ffffff" height="22">
<td width="30%" > </td>
<td width="22%" align="center"> 工 号:</td>
<td width="48%" align="left"><%=strzgNo%>
</td>
</tr>
<tr align=center bgColor="#d0e7ff" height="22">
<td width="30%" > </td>
<td width="22%" align="center"> 职工姓名:</td>
<td width="48%" align="left"><%=zgXM%>
</td>
</tr>
<tr align=center bgColor="#ffffff" >
<td width="30%" > </td>
<td width="22%" align="center">已分配职务:</td>
<td width="48"align="left">
<input type=hidden value="<%=selectedDuty%>" name="selectedDuty">
<input type=hidden size="15" name="hid_dutybmno" value="<%=dutybmno%>"class="" readonly >
<input type=hidden size="15" name="hid_dutyzwno" value="<%=dutyzwno%>"class="" readonly >
<select name="selobj" width=200 style="border-style: double; border-color: #d0e7ff" onchange="onchg(selobj)">
<%for(int i=0;i<strDuties.length;i++){%>
<option value="<%=strDuties[i]%>" <%if(i==j){%>selected<%}%>><%=strDuties[i]%></option>
<%}%>
</select>
</td>
</tr>
<tr>
<td width="30%" bgColor="#d0e7ff" height="22"> </td>
<td width="22%" bgColor="#d0e7ff" height="22"> </td>
<td width="48%" bgColor="#d0e7ff" height="22"> </td>
</tr>
<tr bgColor="#ffffff" height="22">
<td align="right"> 修改操作权限 :</td>
<td colspan="3" align="left">
<input type="text" size="40" value="<%=oper%>" name="txt_doright" class=txtframe readonly>
<input type="button" value="选择操作" class=fashion onmouseover="msover();" onmouseout="msout();"onclick="GoCzqxWindow(1);">
<input type="hidden" size="40" value="<%=flow%>" name="txt_roadright" class=txtframe readonly>
</td>
</table>
<script>
function toServlet()
{
if(document.all.form1.txt_roadright.value=="" && document.all.form1.txt_doright.value=="")
{
if(!confirm("确定使用缺省权限吗"))
return false;
}
document.all.txt_type.value = "6";//修改个人职务权限
document.all.txt_edit.value = "";
document.all.form1.action="../../Org"
document.all.form1.submit();
alert("修改完成");
}
function onchg(selobj)
{
var choice = selobj.selectedIndex;
document.all.selectedDuty.value=selobj.options[choice].value;
document.all.form1.action="index.jsp";
document.all.form1.submit();
if(istextchged()){
if(confirm("是否应用修改"))
toServlet();
}
}
function GoCzqxWindow(id)//选择操作权限formname
{
var url = "";
if(id==1)
url = "middle.jsp?t=1"//"selectczqx.jsp?strczqx="+document.all.txt_doright.value;
if(id==2)
url = "middle.jsp?t=2"//"sellcqx.jsp?strlcqx="+document.all.txt_roadright.value;
var hWnd = window.open(url,"HelpWindow2","width=600,height=435,resizable=yes,scrollbars=yes");
if ((document.window != null) && (!hWnd.opener))
hWnd.opener = document.window;
hWnd.focus();
}
function istextchged(){
if(document.all.txt_doright.value!="<%=oper%>"||document.all.txt_roadright.value!="<%=flow%>")
return true;
else
return false;
}
function todutypg()
{
document.all.txt_type.value = "4";
document.all.txt_personno.value = "<%=strPersonNo%>";
document.all.form1.action = "index.jsp";
document.all.form1.submit();
}
</script>
<%}finally{
if(psBean!=null)psBean.closeConn();
if(myBean!=null)myBean.closeConn();
if(dpBean!=null)dpBean.closeConn();
}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -