You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
3.2 KiB
Plaintext
90 lines
3.2 KiB
Plaintext
11 months ago
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>切换部门</title>
|
||
|
<link href="../Scripts/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="../Scripts/bootstrap/css/font-awesome.css" rel="stylesheet">
|
||
|
<link href="../Style/skin/css/style.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="../Style/skin/css/animate.css" rel="stylesheet" type="text/css" />
|
||
|
</head>
|
||
|
<body class="gray-bg">
|
||
|
<div class="wrapper wrapper-content animated fadeInRight">
|
||
|
<div class="ibox float-e-margins">
|
||
|
|
||
|
<div class="ibox-content">
|
||
|
<div class="usercenter">切换部门</div>
|
||
|
<form class="form-horizontal" id="cc">
|
||
|
<div class="form-group">
|
||
|
<div id="Msg"></div>
|
||
|
</div>
|
||
|
</form>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<script src="../Scripts/easyUI/jquery-1.8.0.min.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/QueryString.js" type="text/javascript"></script>
|
||
|
<!-- 引用通用的js文件. -->
|
||
|
<script type="text/javascript" src="../Scripts/config.js"></script>
|
||
|
<script type="text/javascript" src="../Comm/Gener.js"></script>
|
||
|
<script type="text/javascript" language="javascript" >
|
||
|
//页面启动函数.
|
||
|
$(function () {
|
||
|
|
||
|
$("#Msg").html("<img src='../Img/loading.gif' /><font color=blue>ccbpm 正在获取部门信息.</font>");
|
||
|
|
||
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Setting");
|
||
|
var data = handler.DoMethodReturnString("ChangeDept_Init");
|
||
|
if (data.indexOf('err@') == 0) {
|
||
|
alert(data);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
data = JSON.parse(data);
|
||
|
|
||
|
if (data.length == 0) {
|
||
|
$("#Msg").html("您有0个部门不需要切换部门.");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
if (data.length == 1) {
|
||
|
$("#Msg").html("<br><br>您有1个部门<font color=green >(" + data[0].Name + ")</font>不需要切换部门.<br><br>");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var html = "<ul>";
|
||
|
for (var i = 0; i < data.length; i++) {
|
||
|
var dept = data[i];
|
||
|
|
||
|
if (dept.CurrentDept == 1)
|
||
|
html += "<li ><font color='green'><b>" + dept.Name + "(当前部门)</b></font></li>";
|
||
|
else
|
||
|
html += "<li onclick=\"ChangeDept_Submit('" + dept.No + "');\" style='font-color:green;' ><u>" + dept.Name + "</u></li>";
|
||
|
}
|
||
|
|
||
|
html += "</ul>";
|
||
|
|
||
|
$("#Msg").html(html);
|
||
|
return;
|
||
|
});
|
||
|
|
||
|
function ChangeDept_Submit(deptNo) {
|
||
|
|
||
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Setting");
|
||
|
handler.AddPara("DeptNo", deptNo);
|
||
|
var data = handler.DoMethodReturnString("ChangeDept_Submit");
|
||
|
|
||
|
if (data.indexOf('err@') == 0) {
|
||
|
$("#Msg").html("<font color=red>" + data + "</font>");
|
||
|
return;
|
||
|
}
|
||
|
alert(data);
|
||
|
history.back();
|
||
|
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|