📄 duty_edit.jsp
字号:
<%
/**********************************************************
Copyright (C),2003-10-17, Beijing USTB.
All rights reserved.
Filename: duty_edit.jsp
Author:
Version 1.0
Date:2003-10-17
Description:
Other:
Variable List:
Function List:
History:
***********************************************************/
%>
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,oa.main.DealString,javax.swing.tree.DefaultMutableTreeNode"%>
<%
oa.bean.DutyBean myBean = null;
oa.bean.RightBean rtBean = null;
try{
myBean = new oa.bean.DutyBean();
rtBean = new oa.bean.RightBean();
if(myBean.getConn()==null || rtBean.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"));
if(strType.equals(""))strType = "1";
//组织机构编号
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 userid = (String)session.getAttribute("zgbh");//从session取出来
if(userid==null || userid.equals(""))
{
System.out.println("session过期,请重新登陆!");
}
%>
<%//权限判断
rtBean.setUID(userid);
rtBean.setOrgid(strOrgNO);
%>
<%
myBean.setOrgNO(strOrgNO);
myBean.setDutyNO(strDutyNO);
String str[] = new String[8];
if(strEdit.equals("2"))
{
Hashtable hash = (Hashtable)myBean.getOneData();
str[0] = myBean.toName();//部门名称
str[1] = (String)hash.get("ZWMC");
str[2] = (String)hash.get("CZQX");
str[3] = (String)hash.get("LCQX");
str[4] = (String)hash.get("PZCS");
str[5] = (String)hash.get("JBXH");
str[6] = (String)hash.get("ZWZT");
if(str[6].equals("0"))
str[6]="正常";
else
str[6]="挂起";
str[7] = (String)hash.get("SFJC");
if(str[7].equals("1"))
str[7] = "不可继承";
else
str[7] = "可以继承";
}
else if(strEdit.equals("1"))
{
str[0] = myBean.toName();
str[1] = "";
str[2] = "";
str[3] = "";
str[4] = "";
str[5] = "";
str[6] = "正常";
str[7] = "可以继承";
}
%>
<div align=center>
<font color="#CC00FF" size=3><b>职务维护<b></font>
</div>
<br>
<div align=center>
<table id="t1" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="D0E7FF" width="95%" height="2">
<tr>
<input type="button" value="确定" class=fashion onmouseover="msover();" onmouseout="msout();"onclick="return toservlet();">
<input type="button" value="取消" class=fashion onmouseover="msover();" onmouseout="msout();"onclick="javascript:history.back();">
</td>
</tr>
</table>
<hr size="4" noshade color="D0E7FF"></hr>
<TABLE WIDTH="90%" BORDER=0 CELLSPACING=0 CELLPADDING=3 ALIGN=center style="table-layout:fixed;word-break:break-all" align=center>
<tr align=center>
<td width="20%" > </td>
<td width="22%" align="left"> 部门名称 :</td>
<td width="40%" align="left">
<input type="text" size="15" value="<%=str[0]%>" name="txt_bmName" class=txtframe readonly>
<input type="hidden" value="" name="hid_dutybmno">
<!--加判断是新增还是修改 确定要不要按钮
<%if(strEdit.equals("2")){%>
<input type="button" value="选择部门" class=fashion onmouseover="msover();" onmouseout="msout();"onclick="javascript:windows.close();">
<%}
else {}%>-->
</td>
<td width="20%" > </td>
<tr>
<tr>
<td width="20%" > </td>
<td width="22%" align="left"> 职务名称 :</td>
<td><input type="text" size="15" value="<%=str[1]%>" maxlength="50" name="txt_dutyname" class=txtframe>
<input type="hidden" value="" name="hid_dutyzwno">
<!--
<%if(strEdit.equals("2")){%>
<input type="button" value="选择职务" class=fashion onmouseover="msover();" onmouseout="msout();"onclick="javascript:windows.close();">
<%}
else {}%>-->
</td>
<td width="40%" align="left">
<!-- <select type="text" size="1" name="sel_dutyName" value=" " >
<option value="处长">处长</option>
<option value="副处长">副处长</option>
<option value="科长">科长</option>
<option value="科员">科员</option>
-->
</td>
<td width="20%" > </td>
<%
if(rtBean.isRightModelbh("职务维护","选择操作"))
{
%>
</tr>
<tr>
<td width="20%" > </td>
<td width="22%" align="left"> 操作权限 :</td>
<td width="40%" align="left">
<input type="text" size="15" value="<%=str[2]%>" name="txt_doright" class=txtframe readonly>
<input type="button" value="选择操作" class=fashion onmouseover="msover();" onmouseout="msout();"onclick="GoCzqxWindow(1);">
</td>
<td width="20%" > </td>
</tr>
<%}
// if(rtBean.isRightModelbh("职务维护","选择流程"))
{
%>
<tr>
<td width="20%" > </td>
<td width="40%" align="left">
<input type="hidden" size="15" value="<%=str[3]%>" name="txt_roadright" class=txtframe readonly>
<input type="hidden" size="15" value="<%=str[4]%>" name="txt_confpara" class=txtframe readonly>
</td>
<td width="20%" > </td>
</tr>
<%}%>
<tr>
<td width="20%" > </td>
<td width="22%" align="left"> 级别序号 :</td>
<td width="40%" align="left">
<input type="text" size="15" value="<%=str[5]%>" maxlength="2" name="txt_jbNo" class=txtframe ></td>
<td width="20%" > </td>
</tr>
<tr>
<td width="20%" > </td>
<td width="22%" align="left"> 职务状态 :</td>
<td width="40%" align="left">
<input type="text" size="15" value="<%=str[6]%>" name="txt_zwStatus" class=txtframe readonly>
<select type="text" size="1" name="sel_dutyzt" onchange="onchg(this,document.all.txt_zwStatus)">
<option value="">请选择职务状态</option>
<option value="正常">正常</option>
<option value="挂起">挂起</option>
</td>
<td width="20%"> <!--/td>
</tr>
<tr>
<td width="20%" > </td>
<td width="22%" align="left"> 职务类型 :</td>
<td width="40%" align="left"-->
<input type="hidden" value="可以继承" name="txt_sfjc">
<!--select type="text" size="1" name="sel_sfjc" onchange="onchg(this,document.all.txt_sfjc)">
<option value="">请选择职务类型</option>
<option value="0">可以继承</option>
<option value="1">不可继承</option>
</td>
<td width="20%"--> </td>
</tr>
</table>
</div>
<script>
function isDig(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;
}
function toservlet()
{//待改
if(document.all.txt_dutyname.value=="")
{
alert("职务名称不能为空!");
return false;
}
else if(!isDig(document.all.txt_jbNo.value))
{
alert("级别序号必须为数字!");
return false;
}
else
{
document.all.txt_type.value = "2";
document.all.txt_orgno.value = "<%=strOrgNO%>";
document.all.txt_dutyno.value = "<%=strDutyNO%>";
document.all.txt_edit.value = "<%=strEdit%>";
document.all.form1.action = "../../Org";
document.all.form1.submit();
}
}
function onchg(selobj,txtobj)
{
var choice = selobj.selectedIndex;
txtobj.value = selobj.options[choice].text;
}
function GoCzqxWindow(id)//选择操作权限formname
{
var url = "";
if(id==1)
{
width = "650";
height = "435";
url = "middle.jsp?t=1";
//url = "selectczqx.jsp?strczqx="+document.all.txt_doright.value;
}
if(id==2)
{
width = "350";
height = "235";
url = "middle.jsp?t=2";
//url = "sellcqx.jsp?strlcqx="+document.all.txt_roadright.value;
}
if(id==3)
{
width = "450";
height = "350";
url = "middle.jsp?t=3";
//url = "splitNetSource.jsp?strnetsource="+document.all.txt_confpara.value;
}
var hWnd = window.open(url,"HelpWindow3","width="+width+",height="+height+",resizable=yes,scrollbars=yes");
if ((document.window != null) && (!hWnd.opener))
hWnd.opener = document.window;
hWnd.focus();
}
</script>
<%}finally{
if(myBean!=null)myBean.closeConn();
if(rtBean!=null)rtBean.closeConn();
}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -