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.

237 lines
9.3 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!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>
<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:900px;'>";
html += "<caption>工作人员列表</caption>";
html += "<tr>";
html += "<th>Idx</th>";
html += "<th>人员编号</th>";
html += "<th>名称</th>";
html += "<th>节点ID</th>";
html += "<th>节点名称</th>";
html += "<th>下达时间</th>";
html += "<th>处理时间</th>";
html += "<th>是否读取?</th>";
html += "<th>状态</th>";
html += "<th>IsPass</th>";
html += "<th>节点类型</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>" + i + "</td>";
html += "<td>" + en.FK_Emp + "</td>";
html += "<td>" + en.FK_EmpText + "</td>";
html += "<td>" + en.FK_Node + "</td>";
html += "<td>" + en.FK_NodeText + "</td>";
html += "<td>" + en.RDT + "</td>";
if (en.IsPass == 0) {
html += "<td> - </td>";
} else {
html += "<td>" + en.CDT + "</td>";
}
html += "<td>" + en.IsRead + "</td>";
html += "<td>" + en.IsPass + "</td>";
if (en.IsPass == 0 && en.FK_Node == gwf.FK_Node) {
html += "<td><b><font color=green>待办</font></b></td>";
html += "<td><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><b><font color=green>待办</font></b></td>";
html += "<td><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>分流</td>";
html += "<td> - </td>";
}
else if (en.IsPass == 3) {
html += "<td><font color=red>未到达</font></td>";
html += "<td> - </td>";
} else {
html += "<td>已处理</td>";
html += "<td> - </td>";
}
html += "</tr>";
}
html += "</table>";
$("#gwls").html(html);
//******************************** 绑定流程信息 **/
var gwf = new Entity("BP.WF.GenerWorkFlow", workID);
var html = "<table style='width:900px;'>";
html += "<caption>流程信息</caption>";
html += "<tr>";
html += "<th>标题</th>";
html += "<td colspan=6>" + gwf.Title + "</td>";
html += "</tr>";
html += "<tr>";
html += "<th>工作ID</th>";
html += "<td>" + gwf.WorkID + "</td>";
html += "<th>状态</th>";
html += "<td>" + GetWFState(gwf.WFState) + "</td>";
html += "<th>发起人</th>";
html += "<td>" + gwf.Starter + "," + gwf.StarterName + "</td>";
html += "</tr>";
html += "<tr>";
html += "<th>停留节点ID</th>";
html += "<td>" + gwf.FK_Node + "," + gwf.NodeName + "</td>";
html += "<th>当前待办人员</th>";
html += "<td>" + gwf.TodoEmps + "</td>";
html += "<td colspan=2> <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>
<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>