<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include virtual="/inc/chkadmin.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<%
|
searchTXT=trim(Request("searchTXT"))
|
departmentID=trim(Request("departmentID"))
|
If departmentID="" Then departmentID=0
|
|
'各种返回信息
|
SystemMessageType=trim(Request("SystemMessageType"))
|
SMT=trim(Request("SMT"))
|
if SystemMessageType<>"" then
|
if SMT="1" then
|
SystemMessageTXT="员工列表刷新完成"
|
elseif SMT="2" then
|
SystemMessageTXT="创建新员工完成,默认密码:000000.点击[<a href=""/weixin/user_inviteSend.gds?OA_weixinUserID="&trim(Request("NEW_weixinUserID"))&"&departmentID="&departmentID&""">发出关注邀请</a>]关注微信OA"
|
elseif SMT="3" then
|
SystemMessageTXT="微信OA同步失败,请联系IT部!!"
|
elseif SMT="4" then
|
SystemMessageTXT="发出关注邀请完成,新员工默认密码:000000.请首次登陆后尽快修改"
|
elseif SMT="5" then
|
SystemMessageTXT="发出关注邀请失败,请点击[<a href=""/weixin/user_list.gds?departmentID="&departmentID&""">刷新数据</a>]并修改微信相关联系方式后再次发送"
|
elseif SMT="6" then
|
SystemMessageTXT="批量删除权限完成"
|
elseif SMT="7" then
|
SystemMessageTXT="批量添加权限完成"
|
end if
|
end if
|
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
Set rsDt = Server.CreateObject("ADODB.Recordset")
|
If departmentID<>"0" then
|
sql="select id,vID,vtext,vType,vOrder,vtitle from dictionary where vtitle='OA_Department' and vID="&departmentID
|
rs.open sql,objConn,1,1
|
If rs.Eof then Response.Redirect "/"
|
departmentID = rs("vID")
|
departmentName = rs("vtext")
|
rs.close()
|
Else
|
departmentName = "系统角色"
|
End If
|
sql="select count(id) from dictionary where vType in (1,2) and vtitle='OrderClass'"
|
rs.open sql,objConn,1,1
|
SumOrderClass=rs(0)
|
rs.close()
|
|
|
page_URL="&departmentID="&departmentID&"&searchTXT="&searchTXT&"&h_menu1_1=1"
|
%>
|
<!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><%If searchTXT<>"" then%>员工查询 <%=searchTXT%><%ElseIf departmentID="0" then%><%=departmentName%><%else%><%=departmentName%> 员工管理<%End if%></h5>
|
<ul class="links">
|
<%If searchTXT="" then%>
|
<%If departmentID<>"0" And isDepartment("060201")=1 And (isDepartment("060203")=1 Or OA_DepartmentID=session("adminDepartmentID")) then%><li><a href="AdminUser_App.gds?departmentID=<%=departmentID%>&h_menu1_1=1">新建</a></li><%End if%>
|
<%If departmentID<>"0" And isDepartment("060201")=1 then%><li><a href="/weixin/user_list.gds?departmentID=<%=departmentID%>">刷新数据</a></li><%End if%>
|
<%Else%>
|
<%If isDepartment("060204")=1 And InStr(searchTXT,"ModuleID|")>0 Then%><li><a onClick="form1_Del_JS()">删除权限</a></li><%End If%>
|
<%If isDepartment("060204")=1 And InStr(searchTXT,"ModuleIDApp|")>0 Then%><li><a onClick="form1_App_JS()">添加权限</a></li><%End If%>
|
<script LANGUAGE="javascript">
|
//删除权限
|
function form1_Del_JS(){
|
if(confirm("确定删除所选人员权限?"))
|
{
|
document.form1.action = "admin_save.gds";
|
document.form1.admin_save.value="67"
|
form1.submit();
|
}
|
}
|
//添加权限
|
function form1_App_JS(){
|
if(confirm("确定添加所选人员权限?"))
|
{
|
document.form1.action = "admin_save.gds";
|
document.form1.admin_save.value="68"
|
form1.submit();
|
}
|
}
|
</script>
|
<%End if%>
|
<div class="search">
|
<form action="AdminUser_List.gds?departmentID=<%=departmentID%>&h_menu1_1=<%=session("h_menu1_1")%>" method="post">
|
<div class="input">
|
<input type="text" id="search" name="searchTXT" value="<%=searchTXT%>" />
|
</div>
|
<div class="button">
|
<input type="submit" name="submit" value="搜索" />
|
</div>
|
</form>
|
</div>
|
</ul>
|
|
</div>
|
<!-- end box / title -->
|
<%
|
acc1=clng(request("page"))
|
if acc1=empty then acc1=clng(1)
|
QuantityInt = 20
|
acc2=0
|
acc3=0
|
|
if searchTXT<>"" then
|
If InStr(searchTXT,"ModuleID|")>0 Then
|
ModuleID=Replace(searchTXT,"ModuleID|","")
|
searchSql=" OA_Power like '%,"&ModuleID&",%' "
|
ElseIf InStr(searchTXT,"ModuleIDApp|")>0 Then
|
ModuleID=Replace(searchTXT,"ModuleIDApp|","")
|
searchSql=" (OA_Power not like '%,"&ModuleID&",%' or OA_Power is null) and OA_execLevel>=0"
|
Else
|
searchSql=" (OA_User like '%"&searchTXT&"%' or OA_weixinUserID like '%"&searchTXT&"%' or OA_Name like '%"&searchTXT&"%' or OA_mobile='"&searchTXT&"' or OA_email='"&searchTXT&"' or OA_email='"&searchTXT&"') "
|
End If
|
else
|
'searchSql=" OA_execLevel in (0,1) and (OA_B2bID=0 or OA_B2bID in (select SupplierID from B2B_Supplier where Supplier_is=0) or OA_B2bID in (select DealerID from B2B_Dealer where Dealer_is=0))"
|
searchSql=" (OA_DepartmentID="&departmentID&" or OA_DepartmentIDs like '%,"&departmentID&",%' or OA_DepartmentIDs like '"&departmentID&",%' or OA_DepartmentIDs like '%,"&departmentID&"') "
|
end If
|
|
sql="select * from OA_User LEFT JOIN dictionary on vtitle='OA_Department' and vID=OA_DepartmentID where "&searchSql&B2bIDSql&" order by OA_execLevel desc,OA_DepartmentID,OA_User_ID"
|
'Response.Write sql
|
rs.open sql,objConn,1,1
|
if not rs.eof then
|
rs.pagesize=QuantityInt
|
rs.absolutepage=acc1
|
acc2=rs.pagecount
|
acc3=rs.recordcount
|
else
|
SystemMessageType=2
|
SystemMessageTXT="数据库中相关无数据!"
|
end if
|
%>
|
<!--#include virtual="/inc/SystemMessages.gds" -->
|
<div class="table">
|
<form id="form1" name="form1" action="admin_save.gds" method="post">
|
<input name="admin_save" type="hidden" value="">
|
<input name="ModuleID" type="hidden" value="<%=ModuleID%>">
|
<table>
|
<thead>
|
<tr>
|
<th class="selected"></th>
|
<th class="selected">ID</th>
|
<th class="selected"></th>
|
<th>姓名</th>
|
<th>帐号</th>
|
<th>部门</th>
|
<th>职位</th>
|
<th>手机</th>
|
<th>可查看类型</th>
|
<th>P1</th>
|
<th>状态</th>
|
<th class="last">二维码</th>
|
</tr>
|
</thead>
|
<tbody>
|
|
<%i=1
|
do while not rs.Eof and i<=QuantityInt
|
OA_userID = rs("OA_User_ID")
|
OA_User = rs("OA_User")
|
OA_Name = rs("OA_Name")
|
OA_Img_64 = rs("OA_Img_64")
|
OA_weixinAvatar= rs("OA_weixinAvatar")
|
OA_weixinUserID= rs("OA_weixinUserID")
|
OA_DepartmentID= rs("OA_DepartmentID")
|
OA_DepartmentName= rs("vtext")
|
OA_DepartmentIDs= rs("OA_DepartmentIDs")
|
OA_Position= rs("OA_Position")
|
OA_mobile = rs("OA_mobile")
|
OA_email = rs("OA_email")
|
OA_weixinID= rs("OA_weixinID")
|
OA_weixinStatus= rs("OA_weixinStatus")
|
OA_execLevel=rs("OA_execLevel")
|
OA_OrderClass = rs("OA_OrderClass")
|
Post_Name = rs("Post_Name")
|
Post_MoneyP = rs("Post_MoneyP")
|
Post_MoneyP1 = rs("Post_MoneyP1")
|
OA_Power = rs("OA_Power")
|
If (Post_Name="" Or isnull(Post_Name)) And Post_MoneyP1=0.5 Then
|
Post_MoneyP1="--"
|
Else
|
Post_MoneyP1=FormatNumber(Post_MoneyP1,2,-1)
|
End If
|
i=i+1
|
If OA_weixinAvatar<>"" Then
|
If Right(OA_weixinAvatar,2)="/0" Then
|
OA_weixinAvatar = Mid(OA_weixinAvatar,1,Len(OA_weixinAvatar)-2)&"/100"
|
End If
|
Else
|
OA_weixinAvatar="/resources/images/icon_avatar_default.png"
|
End If
|
If OA_Img_64<>"" Then OA_weixinAvatar=OAImgURL&OA_Img_64
|
If InStr(OA_DepartmentIDs,",")>0 Then
|
OA_DepartmentName=replace(OADepartment(OA_DepartmentIDs,"DepartmentName"),"|","<br>")
|
End If
|
%>
|
<tr>
|
<td class="selected"><input type="checkbox" id="OA_userID_<%=OA_userID%>" name="OA_userID" value="<%=OA_userID%>"/></td>
|
<td class="selected"><%=OA_userID%></td>
|
<td class="selected" style="padding-top: 2px;"><img src="<%=OA_weixinAvatar%>" border="0" style="max-width: 29px;max-height: 29px;"></td>
|
<td class="category"><A HREF="AdminUser.gds?userID=<%=OA_userID%>&h_menu1_1=1"><%=OA_Name%></A></td>
|
<td class="category"><A HREF="AdminUser.gds?userID=<%=OA_userID%>&h_menu1_1=1"><%=OA_User%></A></td>
|
<td class="category"><%=OA_DepartmentName%></td>
|
<td class="category"><%=OA_Position%></td>
|
<td class="category"><%=OA_mobile%></td>
|
<td class="category"><%If isnull(OA_OrderClass) Then OA_OrderClass=""
|
OA_OrderClassIDSP = SPLIT(OA_OrderClass,",")
|
If SumOrderClass<=UBOUND(OA_OrderClassIDSP)+1 Or instr(OA_Power,"020114")>=1 Then
|
Response.Write "全部类型"
|
Else
|
Response.Write Replace(OrderClassD(OA_OrderClass),",","<br>")
|
End If
|
%></td>
|
<td class="category"><%=Post_MoneyP1%></td>
|
<td class="category"><%=AdminExecLevel_B(OA_execLevel,OA_weixinStatus,0)%></td>
|
<td class="category last"><a href="https://wx.966120.com.cn/wx_QR.asp?QR_Name=<%=OA_Name%>&QR_type=2&QR_Key=<%=OA_userID%>" target="_blank">查看二维码</a></td>
|
</tr>
|
<%rs.movenext
|
loop
|
rs.close()
|
%>
|
<%for j=i to 20%>
|
<tr>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td class="last"> </td>
|
</tr>
|
<%next%>
|
</tbody>
|
</table>
|
<!-- pagination -->
|
<div class="pagination pagination-left">
|
<div class="results">
|
<%
|
ShowingLeast = (acc1-1)*QuantityInt+1
|
ShowingMax = QuantityInt*acc1
|
if ShowingMax>acc3 then ShowingMax=acc3
|
%>
|
<span><%="显示 "& ShowingLeast &"-"& ShowingMax &" of "&acc3%></span>
|
</div>
|
<%if acc2>1 then%>
|
<ul class="pager">
|
<%if acc1=1 then%>
|
<li class="disabled">« 上页</li>
|
<%else%>
|
<li><a href="?page=<%=acc1-1%><%=page_URL%>">« 上页</a></li>
|
<%end if%>
|
<%
|
acc4=""
|
for i=1 to acc2
|
if acc2<=9 then
|
acc4=acc4&","&i
|
else
|
if i=1 then
|
acc4=acc4&","&i
|
elseif acc1<=5 and i<=7 then
|
acc4=acc4&","&i
|
elseif acc1>=acc2-4 and i>=acc2-6 then
|
acc4=acc4&","&i
|
elseif i>=acc1-2 and i<=acc1+2 then
|
acc4=acc4&","&i
|
elseif i=acc2 then
|
acc4=acc4&","&i
|
elseif i=2 or i=acc2-1 then
|
acc4=acc4&",0"
|
end if
|
end if
|
next
|
acc4SP=SPLIT(acc4,",")
|
for i = 1 to UBOUND(acc4SP)%>
|
<%if acc4SP(i)="0" then%>
|
<li class="separator">...</li>
|
<%elseif acc1=cint(acc4SP(i)) then%>
|
<li class="current"><%=acc4SP(i)%></li>
|
<%else%>
|
<li><a href="?page=<%=acc4SP(i)%><%=page_URL%>"><%=acc4SP(i)%></a></li>
|
<%end if%>
|
<%next%>
|
<%if acc1>=acc2 then%>
|
<li class="disabled">下页 »</li>
|
<%else%>
|
<li><a href="?page=<%=acc1+1%><%=page_URL%>">下页 »</a></li>
|
<%end if%>
|
</ul>
|
<%end if%>
|
</div>
|
<!-- end pagination -->
|
</form>
|
</div>
|
</div>
|
<!-- end table -->
|
|
|
|
</div>
|
<!-- end content / right -->
|
</div>
|
<!-- end content -->
|
<!--#include FILE="vicgame.asp"-->
|
</body>
|
</html>
|