|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<head>
|
|
|
<meta charset="utf-8" />
|
|
|
<title>切换用户</title>
|
|
|
<link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
|
|
|
<script src="../../Scripts/easyUI145/jquery.min.js" type="text/javascript"></script>
|
|
|
<script src="../../Scripts/easyUI145/jquery.easyui.min.js" type="text/javascript"></script>
|
|
|
<script src="../../Scripts/QueryString.js" type="text/javascript"></script>
|
|
|
<script src="../../Scripts/config.js" type="text/javascript"></script>
|
|
|
<script src="../../Comm/Gener.js" type="text/javascript"></script>
|
|
|
<style>
|
|
|
.bg_color{
|
|
|
background:#f6f6f6;
|
|
|
}
|
|
|
.title-center {
|
|
|
text-align: center;
|
|
|
color: #393939;
|
|
|
font-weight: 500;
|
|
|
background:#fff;
|
|
|
}
|
|
|
.title-content{
|
|
|
padding:8px 25px;
|
|
|
}
|
|
|
/* 第一个表格布局 */
|
|
|
#gwf, #gwls {
|
|
|
margin: 10px 35px;
|
|
|
background: #fff;
|
|
|
padding-bottom: 30px;
|
|
|
border-radius: 10px;
|
|
|
}
|
|
|
.add_line::before {
|
|
|
content: '';
|
|
|
margin-left: -10px;
|
|
|
margin-right: 5px;
|
|
|
border-left: 5px solid #0237a1;
|
|
|
}
|
|
|
.content_color {
|
|
|
color: #666;
|
|
|
background:#f6f6f6;
|
|
|
border:1px solid #fff;
|
|
|
}
|
|
|
|
|
|
|
|
|
</style>
|
|
|
<script language="javascript" type="text/javascript">
|
|
|
|
|
|
var flowNo = GetQueryString("FK_Flow");
|
|
|
var workID = GetQueryString("WorkID");
|
|
|
var userNo = GetQueryString("UserNo");
|
|
|
var token = GetQueryString("Token") ||GetQueryString("Token");
|
|
|
|
|
|
var tester = GetQueryString("Tester");
|
|
|
|
|
|
|
|
|
//页面启动函数.
|
|
|
$(function () {
|
|
|
|
|
|
if (token == null || userNo == undefined) {
|
|
|
alert("没有找到,Token, 请确认上一步操作的问题. ");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (workID == 0 || workID == undefined) {
|
|
|
alert("丢失了workid.");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
var gwf = new Entity("BP.WF.GenerWorkFlow", workID);
|
|
|
var adminToken = GetQueryString("AdminToken") || localStorage.getItem("AdminToken");
|
|
|
//访问后台,获得一个工作ID.
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_TestingContainer");
|
|
|
handler.AddPara("Token", adminToken);
|
|
|
handler.AddPara("UserNo", GetQueryString("UserNo"));
|
|
|
handler.DoMethodReturnString("Default_LetAdminerLogin");
|
|
|
window.parent.InitPageUserInfo(adminToken);
|
|
|
|
|
|
handler.AddUrlData();
|
|
|
var ens = handler.DoMethodReturnJSON("SelectOneUser_Init");
|
|
|
|
|
|
// var webUser = new WebUser();
|
|
|
// $("#userInfo").html("<h3>用户信息:<font color=green>" + webUser.No + "," + webUser.Name + " </font> 部门编号:<font color=green>" + webUser.FK_Dept + "</font> 部门名称: <font color=green>" + webUser.FK_DeptName + "</font></h3>");
|
|
|
|
|
|
var html = "<table style='width:93%;margin:15px;'>";
|
|
|
html += "<caption style='color:#000;margin-top: 20px;' class='add_line'>工作人员列表</caption>";
|
|
|
html += "<tr>";
|
|
|
html += "<th class='title-center'>Idx</th>";
|
|
|
html += "<th class='title-center' >人员编号</th>";
|
|
|
html += "<th class='title-center' >名称</th>";
|
|
|
html += "<th class='title-center' >节点ID</th>";
|
|
|
html += "<th class='title-center' >节点名称</th>";
|
|
|
html += "<th class='title-center' >下达时间</th>";
|
|
|
html += "<th class='title-center' >处理时间</th>";
|
|
|
|
|
|
html += "<th class='title-center' >是否读取?</th>";
|
|
|
|
|
|
html += "<th class='title-center' >状态</th>";
|
|
|
html += "<th class='title-center' >IsPass</th>";
|
|
|
html += "<th class='title-center' >节点类型</th>";
|
|
|
|
|
|
// html += "<th>操作</th>";
|
|
|
html += "</tr>";
|
|
|
|
|
|
for (var i = 0; i < ens.length; i++) {
|
|
|
var en = ens[i];
|
|
|
|
|
|
if (en.IsPass == 0) {
|
|
|
html += "<tr class=Sum>";
|
|
|
} else {
|
|
|
html += "<tr >";
|
|
|
}
|
|
|
|
|
|
html += "<td class='title-center content_color' >" + i + "</td>";
|
|
|
html += "<td class='title-center content_color'>" + en.FK_Emp + "</td>";
|
|
|
html += "<td class='title-center content_color'>" + en.FK_EmpText + "</td>";
|
|
|
html += "<td class='title-center content_color'>" + en.FK_Node + "</td>";
|
|
|
html += "<td class='title-center content_color'>" + en.FK_NodeText + "</td>";
|
|
|
|
|
|
html += "<td class='title-center content_color'>" + en.RDT + "</td>";
|
|
|
|
|
|
if (en.IsPass == 0) {
|
|
|
html += "<td class='title-center content_color'> - </td>";
|
|
|
} else {
|
|
|
html += "<td class='title-center content_color'>" + en.CDT + "</td>";
|
|
|
}
|
|
|
html += "<td class='title-center content_color'>" + en.IsRead + "</td>";
|
|
|
html += "<td class='title-center content_color'>" + en.IsPass + "</td>";
|
|
|
|
|
|
if (en.IsPass == 0 && en.FK_Node == gwf.FK_Node) {
|
|
|
html += "<td class='title-center content_color'><b><font color=green>待办</font></b></td>";
|
|
|
html += "<td class='title-center content_color'><a href=\"javascript:ChangUser('" + en.FK_Emp + "','" + en.FK_Node + "','" + en.WorkID + "','" + en.FID + "')\">切换用户</a><br/><a href=\"javascript:ChangUser('" + en.FK_Emp + "','" + en.FK_Node + "','" + en.WorkID + "','" + en.FID + "',1)\">移动端</a></td>";
|
|
|
} else if (en.IsPass == 0 && en.FID != 0) {
|
|
|
html += "<td class='title-center content_color'><b><font color=green>待办</font></b></td>";
|
|
|
html += "<td class='title-center content_color'><a href=\"javascript:ChangUser('" + en.FK_Emp + "','" + en.FK_Node + "','" + en.WorkID + "','" + en.FID + "')\">切换用户</a><br/><a href=\"javascript:ChangUser('" + en.FK_Emp + "','" + en.FK_Node + "','" + en.WorkID + "','" + en.FID + "',1)\">移动端</a></td>";
|
|
|
|
|
|
} else if (en.IsPass == -2) {
|
|
|
html += "<td class='title-center content_color'>分流</td>";
|
|
|
html += "<td class='title-center'> - </td>";
|
|
|
}
|
|
|
else if (en.IsPass == 3) {
|
|
|
html += "<td class='title-center content_color'><font color=red>未到达</font></td>";
|
|
|
html += "<td class='title-center content_color'> - </td>";
|
|
|
} else {
|
|
|
html += "<td class='title-center content_color'>已处理</td>";
|
|
|
html += "<td class='title-center content_color'> - </td>";
|
|
|
}
|
|
|
|
|
|
html += "</tr>";
|
|
|
}
|
|
|
html += "</table>";
|
|
|
$("#gwls").html(html);
|
|
|
|
|
|
|
|
|
|
|
|
//******************************** 绑定流程信息 **/
|
|
|
var gwf = new Entity("BP.WF.GenerWorkFlow", workID);
|
|
|
var html = "<table table table-bordered style='width:93%;margin: 40px 15px 25px 15px;'>"; //style = 'width:900px;'
|
|
|
html += "<caption style='color:#000;margin-top: 20px;' class='add_line'>流程信息</caption>";
|
|
|
html += "<tr>";
|
|
|
html += "<th class='title-center'>标题</th>";
|
|
|
html += "<td colspan=6 class='title-content' >" + gwf.Title + "</td>";
|
|
|
html += "</tr>";
|
|
|
|
|
|
html += "<tr>";
|
|
|
html += "<th class='title-center'>工作ID</th>";
|
|
|
html += "<td class='title-content'>" + gwf.WorkID + "</td>";
|
|
|
html += "<th class='title-center'>状态</th>";
|
|
|
html += "<td class='title-content'>" + GetWFState(gwf.WFState) + "</td>";
|
|
|
html += "<th class='title-center'>发起人</th>";
|
|
|
html += "<td class='title-content'>" + gwf.Starter + "," + gwf.StarterName + "</td>";
|
|
|
html += "</tr>";
|
|
|
|
|
|
html += "<tr>";
|
|
|
html += "<th class='title-center'>停留节点ID</th>";
|
|
|
html += "<td class='title-content'>" + gwf.FK_Node + "," + gwf.NodeName + "</td>";
|
|
|
html += "<th class='title-center'>当前待办人员</th>";
|
|
|
html += "<td class='title-content'>" + gwf.TodoEmps + "</td>";
|
|
|
|
|
|
html += "<td colspan=2 class='title-content'> <b>";
|
|
|
html += "<a href='javascript:Skip();' >实例运维:跳转-调整-删除-移交-强制结束</a></b>";
|
|
|
html += "</td>";
|
|
|
|
|
|
html += "</table>";
|
|
|
$("#gwf").html(html);
|
|
|
|
|
|
});
|
|
|
|
|
|
function Skip() {
|
|
|
var url = "../../Comm/En.htm?EnName=BP.WF.Data.GenerWorkFlowView&PKVal=" + workID + "&FK_Flow=" + GetQueryString("FK_Flow") + "&WFSta=all";
|
|
|
SetHref(url);
|
|
|
}
|
|
|
|
|
|
function ChangUser(empNo, nodeID, workid, fid, isMobile) {
|
|
|
|
|
|
//当这个人登录。
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_TestingContainer");
|
|
|
handler.AddPara("FK_Emp", empNo);
|
|
|
handler.AddPara("WorkID", workid);
|
|
|
handler.AddPara("FID", fid);
|
|
|
|
|
|
var adminer = GetQueryString("Adminer");
|
|
|
handler.AddPara("Adminer", adminer);
|
|
|
|
|
|
var AdminerToken = GetQueryString("AdminerToken") || localStorage.getItem("AdminToken");
|
|
|
handler.AddPara("AdminerToken", AdminerToken);
|
|
|
|
|
|
var orgNo = GetQueryString("OrgNo");
|
|
|
|
|
|
var webUser = new WebUser();
|
|
|
|
|
|
if (orgNo != webUser.OrgNo) {
|
|
|
alert(" 系统错误: " + orgNo + " curr:" + webUser.OrgNo + ", 出现了组织结构编号不一致.");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
handler.AddPara("OrgNo", orgNo);
|
|
|
|
|
|
var data = handler.DoMethodReturnString("SelectOneUser_ChangUser");
|
|
|
if (data.indexOf('err@') == 0) {
|
|
|
alert(data);
|
|
|
return;
|
|
|
}
|
|
|
localStorage.setItem("Token", data);
|
|
|
if (isMobile == 1)
|
|
|
window.open('../../../CCMobile/MyFlow.htm?Token='+data+'&FK_Flow=' + flowNo + '&WorkID=' + workid + "&FID=" + fid + "&FK_Node=" + nodeID, '_self');
|
|
|
else
|
|
|
window.open('../../MyFlow.htm?Token=' + data +'&FK_Flow=' + flowNo + '&WorkID=' + workid + "&FID=" + fid + "&FK_Node=" + nodeID, '_self');
|
|
|
|
|
|
|
|
|
window.parent.InitPageUserInfo(data);
|
|
|
}
|
|
|
|
|
|
function GetWFState(wfstate) {
|
|
|
switch (parseInt(wfstate)) {
|
|
|
case 0:
|
|
|
return "<font color='black'>空白</font>";
|
|
|
case 1:
|
|
|
return "<font color='black'>草稿</font>";
|
|
|
case 2:
|
|
|
return "<font color='#d9b653' style='font-weight:bolder;'>运行中</font>";
|
|
|
case 3: //已完成.
|
|
|
return "<font color='green' style='font-weight:bolder;'>已完成</font>";
|
|
|
case 4:
|
|
|
return "<font color='black'>挂起</font>";
|
|
|
case 5:
|
|
|
return "<font color='red' style='font-weight:bolder;'>退回</font>";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function OpenRpt() {
|
|
|
var url = "../../WFRpt.htm?WorkID=" + workID + "&FK_Flow=" + flowNo;
|
|
|
WinOpen(url);
|
|
|
}
|
|
|
</script>
|
|
|
</head>
|
|
|
<body class="bg_color">
|
|
|
|
|
|
<h4 style="text-align:center">
|
|
|
|
|
|
<!--| <a href="javascript:Skip();">回滚</a>-->
|
|
|
</h4>
|
|
|
<div id="userInfo"></div>
|
|
|
|
|
|
<center>
|
|
|
<div id="gwf"></div>
|
|
|
|
|
|
<div id="gwls"></div>
|
|
|
|
|
|
</center>
|
|
|
</body>
|
|
|
</html> |