<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include virtual="/inc/chkadmin.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<%
|
'各种返回信息
|
SystemMessageType=trim(Request("SystemMessageType"))
|
SMT=trim(Request("SMT"))
|
if SystemMessageType="3" then
|
if SMT="1" then
|
SystemMessageTXT="部门列表更新完成"
|
elseif SMT="2" then
|
SystemMessageTXT="部门修改完成"
|
elseif SMT="3" then
|
SystemMessageTXT="新建部门完成"
|
elseif SMT="4" then
|
SystemMessageTXT="部门删除完成"
|
end if
|
elseif SystemMessageType="1" then
|
if SMT="1" then
|
SystemMessageTXT="请选择需要修改的部门"
|
elseif SMT="2" then
|
SystemMessageTXT="请选择需要删除的部门"
|
elseif SMT="3" then
|
SystemMessageTXT="每次只可以删除一个部门"
|
end if
|
elseif SystemMessageType="4" then
|
if SMT="1" then
|
SystemMessageTXT="数据不足!!"
|
elseif SMT="2" then
|
SystemMessageTXT="修改失败!!"
|
elseif SMT="3" then
|
SystemMessageTXT="请输入新部门名称!!"
|
elseif SMT="4" then
|
SystemMessageTXT="部门名称重复,请重新输入!!"
|
end if
|
end if
|
|
searchTXT=trim(Request("searchTXT"))
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
Set rsDt = Server.CreateObject("ADODB.Recordset")
|
%>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<title><%=LindemanAdmin%></title>
|
<!--#include virtual="/inc/ccs.gds"-->
|
</head>
|
<body onkeydown="xKeyEvent(event)">
|
<!--#INCLUDE FILE="menu_header.gds" -->
|
<!-- content -->
|
<div id="content">
|
<!--#INCLUDE FILE="AdminUser_menu_left.gds" -->
|
<!-- content / right -->
|
<div id="right">
|
<!-- table -->
|
<div class="box">
|
<!-- box / title -->
|
<div class="title">
|
<h5>部门管理</h5>
|
<ul class="links">
|
<li><a onclick="javascript:DepartmentCreate.style.display='block';">新建</a></li>
|
<li><a onClick="form1_department_update()">修改</a></li>
|
<li><a onClick="form1_department_delete()">删除</a></li>
|
<li><a onClick="form1_department_list()">刷新数据</a></li>
|
</ul>
|
<script LANGUAGE="javascript">
|
//修改部门
|
function form1_department_update(){
|
document.form1.action = "/weixin/department_update.gds";
|
form1.submit();
|
}
|
//删除部门
|
function form1_department_delete(){
|
document.form1.action = "/weixin/department_delete.gds";
|
form1.submit();
|
}
|
//刷新部门数据
|
function form1_department_list(){
|
window.location.href='/weixin/department_list.gds';
|
}
|
//选择修改部门
|
function form1_department_Edit(id){
|
if (document.getElementById('Show_departmentName_'+id).style.display=="none")
|
{
|
document.getElementById('Show_departmentName_'+id).style.display='';
|
document.getElementById('Edit_departmentName_'+id).style.display='none';
|
document.getElementById('Show_departmentOrder_'+id).style.display='';
|
document.getElementById('Edit_departmentOrder_'+id).style.display='none';
|
}
|
else
|
{
|
document.getElementById('Show_departmentName_'+id).style.display='none';
|
document.getElementById('Edit_departmentName_'+id).style.display='';
|
document.getElementById('Show_departmentOrder_'+id).style.display='none';
|
document.getElementById('Edit_departmentOrder_'+id).style.display='';
|
}
|
|
|
}
|
//新建部门-关闭上传窗口
|
function JS_DepartmentCreateClose()
|
{
|
DepartmentCreate.style.display="none";
|
}
|
//新建部门-保存
|
function JS_DepartmentCreateSave()
|
{
|
form2.submit();
|
}
|
</script>
|
</div>
|
<div class="dialogJ dialogJfix dialogJshadow" id="DepartmentCreate" style="width: 370px; right: 300px; top: 150px;display:none;">
|
<div class="dialogJtitle">
|
<a href="javascript:JS_DepartmentCreateClose();" class="dialogJclose" title="关闭本窗口"> </a>
|
<span class="dialogJtxt" id="EditPhotoTXT">新建部门</span>
|
</div>
|
<form id="form2" name="form2" action="/weixin/department_create.gds" method="post">
|
<div class="dialogJcontent">
|
<div class="dialogJbody" id="dialogJbody" style="height: 56px;">
|
<div class="modify-album-name">
|
<p class="album-tips"></p>
|
<span>上级部门:</span>
|
<select name="parentid" id="parentid" style="padding: 5px 0 5px 8px;">
|
<option value="1">无上级</option>
|
<%sql="select id,vID,vtext,vType,vOrder,vtitle,parentInt=(select count(id) from dictionary as b where b.vtitle='OA_Department' and b.vType=a.vID) from dictionary as a where vtitle='OA_Department' and vType=1 order by vOrder desc"
|
rs.open sql,objConn,1,1
|
do while not rs.Eof
|
departmentID = rs("vID")
|
departmentName= rs("vtext")
|
%>
|
<option value="<%=departmentID%>"><%=departmentName%></option>
|
<%rs.movenext
|
loop
|
rs.close()%>
|
</select>
|
</div>
|
<div class="modify-album-name">
|
<p class="album-tips"></p>
|
<span>部门名称:</span>
|
<input id="DepartmentName" name="DepartmentName" type="text" value="" maxlength="99/">
|
</div>
|
</div>
|
</div>
|
</form>
|
<div class="dialogJanswers">
|
<input type="button" class="dialogJbtn first-child" onclick="JS_DepartmentCreateSave()" value="确定">
|
<input type="button" class="dialogJbtn" onclick="JS_DepartmentCreateClose()" value="取消">
|
</div>
|
</div>
|
<!-- end box / title -->
|
<%
|
sql="select id,vID,vtext,vType,vOrder,vtitle,parentInt=(select count(id) from dictionary as b where b.vtitle='OA_Department' and b.vType=a.vID) from dictionary as a where vtitle='OA_Department' and vType=1 order by vOrder desc"
|
rs.open sql,objConn,1,1
|
if rs.eof then
|
SystemMessageType=2
|
SystemMessageTXT="数据库中相关无数据!"
|
end if
|
%>
|
<!--#include virtual="/inc/SystemMessages.gds" -->
|
<div class="table">
|
<form id="form1" name="form1" action="" method="post">
|
<table>
|
<thead>
|
<tr>
|
<th class="selected"><input type="checkbox" class="checkall" /></th>
|
<th>部门ID</th>
|
<th>部门名称</th>
|
<th>排序</th>
|
<th class="last"> </th>
|
</tr>
|
</thead>
|
<tbody>
|
|
<%i=1
|
do while not rs.Eof
|
id = rs("id")
|
departmentID = rs("vID")
|
departmentName= rs("vtext")
|
departmentOrder=rs("vOrder")
|
department_parentid= rs("vType")
|
parentInt = rs("parentInt")
|
i=i+1
|
%>
|
<input name="departmentID_<%=id%>" type="hidden" value="<%=departmentID%>">
|
<tr>
|
<td class="selected"><input type="checkbox" id="ID_<%=id%>" name="ID" value="<%=id%>" onclick="javascript:form1_department_Edit('<%=id%>')"/></td>
|
<td class="category"><A HREF="AdminUser.gds?departmentName=<%=departmentName%>&h_menu1_1=1"><%=departmentID%></A></td>
|
<td class="category2" id="Show_departmentName_<%=id%>"><A HREF="AdminUser.gds?departmentName=<%=departmentName%>&h_menu1_1=1"><%=departmentName%></A></td>
|
<td class="category" id="Edit_departmentName_<%=id%>" style="display:none;"><input id="departmentName_<%=id%>" name="departmentName_<%=id%>" class="small" style="width:120px;text-align: center;" value="<%=departmentName%>" type="text"></td>
|
<td class="category" id="Show_departmentOrder_<%=id%>"><%=departmentOrder%></td>
|
<td class="category" id="Edit_departmentOrder_<%=id%>" style="display:none;"><input id="departmentOrder_<%=id%>" name="departmentOrder_<%=id%>" class="small" style="width:40px;text-align: center;" value="<%=departmentOrder%>" type="text"></td>
|
<td class="last"> </td>
|
</tr>
|
<%
|
If parentInt>0 Then
|
sql="select id,vID,vtext,vType,vOrder,vtitle from dictionary as a where vtitle='OA_Department' and vType="&departmentID&" order by vOrder desc"
|
rsDt.open sql,objConn,1,1
|
do while not rsDt.Eof
|
id = rsDt("id")
|
departmentID = rsDt("vID")
|
departmentName= rsDt("vtext")
|
departmentOrder=rsDt("vOrder")
|
department_parentid= rsDt("vType")
|
i=i+1
|
%>
|
<input name="departmentID_<%=id%>" type="hidden" value="<%=departmentID%>">
|
<tr>
|
<td class="selected"><input type="checkbox" id="ID_<%=id%>" name="ID" value="<%=id%>" onclick="javascript:form1_department_Edit('<%=id%>')"/></td>
|
<td class="category"><A HREF="AdminUser.gds?departmentName=<%=departmentName%>&h_menu1_1=1"><%=departmentID%></A></td>
|
<td class="category2" id="Show_departmentName_<%=id%>">--<A HREF="AdminUser.gds?departmentName=<%=departmentName%>&h_menu1_1=1"><%=departmentName%></A></td>
|
<td class="category" id="Edit_departmentName_<%=id%>" style="display:none;"><input id="departmentName_<%=id%>" name="departmentName_<%=id%>" class="small" style="width:120px;text-align: center;" value="<%=departmentName%>" type="text"></td>
|
<td class="category" id="Show_departmentOrder_<%=id%>"><%=departmentOrder%></td>
|
<td class="category" id="Edit_departmentOrder_<%=id%>" style="display:none;"><input id="departmentOrder_<%=id%>" name="departmentOrder_<%=id%>" class="small" style="width:40px;text-align: center;" value="<%=departmentOrder%>" type="text"></td>
|
<td class="last"> </td>
|
</tr>
|
<%
|
rsDt.movenext
|
loop
|
rsDt.close()
|
End If
|
rs.movenext
|
loop
|
rs.close()
|
%>
|
<%for j=i to 21%>
|
<tr>
|
<td class="selected"> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td class="last"> </td>
|
|
</tr>
|
<%next%>
|
</tbody>
|
</table>
|
|
</form>
|
</div>
|
</div>
|
<!-- end table -->
|
|
|
</div>
|
<!-- end content / right -->
|
</div>
|
<!-- end content -->
|
<!--#include FILE="vicgame.asp"-->
|
</body>
|
</html>
|