📄 popmenu.jsp
字号:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,java.sql.*,oa.main.DealString,javax.swing.tree.DefaultMutableTreeNode"%>
<%--jsp:useBean id="rtBean" scope="page" class="oa.bean.RightBean"/--%>
<STYLE>
.skin1 {
BORDER-RIGHT: buttonhighlight 0px outset; BORDER-TOP: buttonhighlight 0px outset; FONT-SIZE: 9pt; VISIBILITY: hidden; BORDER-LEFT: buttonhighlight 0px outset; WIDTH: 90px; CURSOR: default; BORDER-BOTTOM: buttonhighlight 0px outset; FONT-FAMILY: Arial, Helvetica, sans-serif; POSITION: absolute; BACKGROUND-COLOR: #CCCCCC; TEXT-ALIGN: center
}
.menuitems {
PADDING-RIGHT: 10px; PADDING-LEFT: 10px
}
</STYLE>
<SCRIPT language=JavaScript1.2>
<!-- Begin
var menuskin = "skin1";
var display_url = 0;
function showmenuie5() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge < ie5menu.offsetWidth)
ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
ie5menu.style.visibility = "visible";
delorg1.style.display = "none";
addorg1.style.display = "none";
modorg1.style.display = "none";
addduty1.style.display = "none";
dutylist1.style.display = "none";
psinf1.style.display = "none";
var str = document.all.txt_orgno.value;
var id= document.all.txt_test.value; //@bmbh:czqx@bmbh:czqx@bmbh:czqx@bmbh:czqx
var ids = id.split("@");
var num =0;
for(var i=0;i<ids.length;i++)
{
var bmrt = ids[i].split(":");
var bmsub = '';
for(var n=19;n>=0; ) //eg: 00100000000000000000
{
bmsub = bmrt[0].charAt(n); // n=3
n--;
bmsub = bmrt[0].charAt(n) + bmsub; // n=2
n--; // n=1 substring(0,4)
if(bmsub!='00')
break;
}
if(bmrt[0]==str || bmrt[0].substring(0,n+3)==str.substring(0,n+3))
{
var rts = bmrt[1].split(",");
for(var j=0;j<rts.length;j++)
{
if(rts[j]=="58")//增加子部门
{
addorg1.style.display = "block";
num++;
}
if(rts[j]=="59")//修改部门
{
modorg1.style.display = "block";
num++;
}
if(rts[j]=="60" && bmrt[0]!=str)//删除部门
{
delorg1.style.display = "block";
num++;
}
if(rts[j]=="61")//职务列表
{
dutylist1.style.display = "block";
num++;
}
if(rts[j]=="62")//增加职务
{
addduty1.style.display = "block";
num++;
}
if(rts[j]=="63")//人员信息
{
psinf1.style.display = "block";
num++;
}
}
}
}
if(document.all.txt_type.value==1){
if(document.all.txt_orgno.value=="00000000000000000000"){
addorg1.style.display = "block";
modorg1.style.display = "block";
psinf1.style.display = "block";
num=3;
}else{
delorg1.style.display = "block";
addorg1.style.display = "block";
modorg1.style.display = "block";
psinf1.style.display = "block";
num=4;
}
}
ie5menu.style.height=num*20;
return false;
}
function hidemenuie5() {
delorg1.style.display = "none";
addorg1.style.display = "none";
modorg1.style.display = "none";
addduty1.style.display = "none";
dutylist1.style.display = "none";
psinf1.style.display = "none";
ie5menu.style.visibility = "hidden";
}
function highlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "highlight";
event.srcElement.style.color = "white";
if (display_url)
window.status = event.srcElement.url;
}
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "black";
window.status = "";
}
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
}
}
// End -->
</SCRIPT>
<q class=skin1 id=ie5menu onmouseover="highlightie5()"
style="LEFT: 280px; TOP: 28px" onclick="jumptoie5()"; onmouseout="lowlightie5()" height=2>
<q id=addorg1>
<table width="100%">
<TR>
<TD
onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';"
onmouseout="this.style.backgroundColor='#ffcc00';" bgColor=#ffcc00 height=20
scroll="no" onload="window.defaultStatus='00009876.4567.net';" onclick="addorg()">
<CENTER><font color="#000000"style="font-size:9pt"><b>增加子机构</b></font></CENTER>
</TD>
</TR>
</table>
</q>
<q id=modorg1>
<table width="100%">
<TR>
<TD
onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';"
onmouseout="this.style.backgroundColor='#ffcc00';" bgColor=#ffcc00 height=20 onclick="modorg()">
<CENTER><font color="#000000"style="font-size:9pt"><b>修改机构</b></font></CENTER>
</TD>
</TR>
</table>
</q>
<q id=delorg1>
<table width="100%">
<TR>
<TD
onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';"
onmouseout="this.style.backgroundColor='#ffcc00';" vAlign=center
bgColor=#ffcc00 height="20" onclick="delorg()">
<CENTER><font color="#000000"style="font-size:9pt"><b>删除机构</b></font></CENTER></TD></TR></table></q>
<q id=addduty1>
<table width="100%">
<TR>
<TD
onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';"
onmouseout="this.style.backgroundColor='#ffcc00';" vAlign=center
bgColor=#ffcc00 height="20" onclick="addduty()">
<CENTER><font color="#000000"style="font-size:9pt"><b>增加职务</b></font></CENTER></TD></TR></table></q>
<q id=dutylist1>
<table width="100%">
<TR>
<TD
onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';"
onmouseout="this.style.backgroundColor='#ffcc00';" vAlign=center
bgColor=#ffcc00 height="20" onclick="dutylist()">
<CENTER><font color="#000000"style="font-size:9pt"><b>职务列表</b></font></CENTER></TD></TR></table></q>
<q id=psinf1>
<table width="100%">
<TR>
<TD
onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';"
onmouseout="this.style.backgroundColor='#ffcc00';" vAlign=center
bgColor=#ffcc00 height="20" onclick="disperson()">
<CENTER><font color="#000000"style="font-size:9pt"><b>人员维护</b></font></CENTER></TD></TR></table></q>
</q>
<SCRIPT language=JavaScript1.2>
var tag = "1";
function onclickshow(id)
{
document.all.txt_orgno.value = id;
tag = "2";
document.oncontextmenu = showmenuie5;
document.body.onclick = hidemenuie5;
}
if (document.all && window.print)
{
ie5menu.className = menuskin;
document.oncontextmenu = showmenuie5;
document.body.onclick = hidemenuie5;
}
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
function onclickhide()
{
//alert();
if (window.Event)
document.captureEvents(Event.MOUSEUP);
if(tag=="1")//鼠标单击在显示菜单地方之外
{
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
}
tag = "1";
}
function addorg()
{
document.all.txt_type.value = "1";
document.all.txt_edit.value = "1";
document.all.form1.action = "index.jsp";
document.all.form1.submit();
}
function modorg()
{
document.all.txt_type.value = "1";
document.all.txt_edit.value = "2";
document.all.form1.action = "index.jsp";
document.all.form1.submit();
}
function delorg()
{
if(document.all.txt_orgno.value=="00000000000000000000")
{
alert("总公司不能删除!");
}
else
{
if(!confirm("是否真的要删除?"))
{
}
else
{
document.all.txt_type.value = "1";
document.all.txt_edit.value = "3";
document.all.form1.action = "../../Org";
document.all.form1.submit();
}
}
}
function dutylist()
{
document.all.txt_type.value = "2";
document.all.txt_edit.value = "";
document.all.form1.action = "index.jsp";
document.all.form1.submit();
}
function addduty()
{
document.all.txt_type.value = "2";
document.all.txt_edit.value = "1";
document.all.form1.action = "index.jsp";
document.all.form1.submit();
}
function disperson()
{
document.all.txt_type.value = "3";
document.all.txt_edit.value = "";
document.all.form1.action = "index.jsp";
document.all.form1.submit();
}
function disnews()
{
document.all.txt_type.value = "5";
document.all.txt_edit.value = "";
document.all.form1.action = "indexmenu.jsp?txt_type=5";
document.all.form1.submit();
}
</SCRIPT>
<%
//rtBean.closeConn();
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -