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.

307 lines
12 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" />
<link href="Style/skin/font/iconfont.css" rel="stylesheet" type="text/css" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox-content">
<table class="table table-striped">
<thead id="theadDiv">
</thead>
<tbody id="Table1">
</tbody>
</table>
<div class="row">
<div class="col-sm-12">
<span id="Table2"></span>
</div>
</div>
</div>
</div>
<script language="JavaScript" src="./Comm/JScript.js" type="text/javascript"></script>
<script type="text/javascript" src="./Scripts/bootstrap/js/jquery.min.js"></script>
<script type="text/javascript" src="./Scripts/bootstrap/js/bootstrap.min.js"></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 src="Scripts/layui/layui/lay/modules/layer.js" type="text/javascript"></script>
<script src="../DataUser/JSLibData/CommonShowConfig.js"></script>
<!-- 处理多语言 -->
<script src="Data/lang/load.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var RunModel = { "Ordinary": 0, "HL": 1, "FL": 2, "FHL": 3, "SubThread": 4 };
var isContainFuture = GetQueryString("IsContainFuture");
if (isContainFuture == null || isContainFuture == undefined || isContainFuture == "")
isContainFuture = "0";
var Hide_HastenWork = getConfigByKey("Hide_HastenWork", false); //是否隐藏该条信息, CommonShowConfig.js中定义
//页面启动函数.
$(function () {
var _html = `<tr>
<th width="40">
#
</th>
<th width="350"> ${window.lang.biaoti} </th>
<!-- <th>流程</th>-->
<th width="120">
${window.lang.fqr}
</th>
<th width="200">
${window.lang.dqjd}
</th>
<!--<th>申请时间</th>-->
<th width="200">
${window.lang.fqrq}
</th>
<th width="180">
${window.lang.ywcsj}
</th>
<th width="80">
${window.lang.youxianji}
</th>
<th width="120">
${window.lang.zhuangtai}
</th>
</tr>`;
$("#theadDiv").html(_html);
InitPage();
});
function GroupBarClick(groupName) {
var alt = document.getElementById('Img' + groupName).alert;
var sta = 'block';
if (alt == 'Max') {
sta = 'block';
alt = 'Min';
classname = 'fa fa-minus-square';
} else {
sta = 'none';
alt = 'Max';
classname = 'fa fa-plus-square';
}
document.getElementById('Img' + groupName).className = classname;
document.getElementById('Img' + groupName).alert = alt;
var i = 0;
for (i = 0; i <= 600; i++) {
var row = document.getElementById(groupName + i);
if (row == null || row == undefined || row.style == null)
continue;
if (sta == 'block') {
row.style.display = '';
} else {
row.style.display = sta;
}
}
}
/* ESC Key Down */
function Esc() {
if (event.keyCode == 27)
window.close();
return true;
}
/* 打开表单. */
function OpenFrm(workid, nodeID, flowNo, fid, title) {
JumpFlowPage("MyFlow", title, workid, flowNo, nodeID, fid);
return;
}
/**
* 为什么写到这里? Gener.js 是一个与其他任何业务模块无关的js文件.
* 执行跳转到MyFlow/MyView页面的判断方法:
* @param {any} title
* @param {any} workid
* @param {any} fk_flow
* @param {any} fk_node
* @param {any} fid
* @param {any} pworkid
*/
function JumpFlowPage(pageType, title, workid, fk_flow, fk_node, fid, pworkid, isread, paras) {
var handler = new HttpHandler("BP.WF.HttpHandler.WF_MyFlow");
if (pageType == "MyView")
handler = new HttpHandler("BP.WF.HttpHandler.WF_MyView");
if (workid != null && workid != undefined)
handler.AddPara("WorkID", workid);
handler.AddPara("FK_Flow", fk_flow);
if (fk_node != null && fk_node != undefined)
handler.AddPara("FK_Node", fk_node);
if (fid != null && fid != undefined)
handler.AddPara("FID", fid);
if (pworkid != null && pworkid != undefined)
handler.AddPara("PWorkID", pworkid);
if (isread != null && isread != undefined)
handler.AddPara("IsRead", isread);
if (paras != null && paras != undefined)
handler.AddPara("Paras", paras);
var data = "";
if (pageType == "MyView")
data = handler.DoMethodReturnString("MyView_Init");
else
data = handler.DoMethodReturnString("MyFlow_Init");
if (data.indexOf('err@') == 0) {
alert(data);
return;
}
if (data.indexOf('url@') == 0) {
data = data.replace('url@', ''); //如果返回url就直接转向.
data = data.replace('?DoType=HttpHandler', '?');
data = data.replace('&DoType=HttpHandler', '');
data = data.replace('&DoMethod=MyFlow_Init', '');
data = data.replace('&HttpHandlerName=BP.WF.HttpHandler.WF_MyFlow', '');
data = data.replace('?&', '?');
var url = data;
url = url.replace('/WF//WF/', '/WF/');
if (url.indexOf("http") == -1) {
if (url.indexOf('/WF/') == -1)
url = '/WF/' + url;
url = basePath + url;
}
try {
if (window.top.vm != undefined) {
window.top.vm.openTab(title, url);
return;
}
window.open(url); //打开流程.
} catch (e) {
data = data.replace('/WF//WF/', '/WF/');
window.open(data); //打开流程.
return;
}
}
}
//初始化数据.
function InitPage() {
//获取参数FlowNos为空时显示所有的待办否则显示参数中的流程
var flowNos = GetQueryString("FlowNos");
//随机串.
var timeKey = Math.random();
var handler = new HttpHandler("BP.WF.HttpHandler.WF");
handler.AddPara("IsContainFuture", isContainFuture);
handler.AddPara("FK_Flow", GetQueryString("FK_Flow"));
var data = handler.DoMethodReturnString("Timeout_Init");
if (data.indexOf('err@') == 0) {
alert(data);
}
data = JSON.parse(data);
//生成分组的字符串.
var str = "@";
for (var i = 0; i < data.length; i++) {
if (str.indexOf('@' + data[i].FlowName + "@") == -1) {
if (flowNos == null || (flowNos != null && flowNos.indexOf(data[i].FK_Flow) != -1))
str += data[i].FlowName + "@";
}
}
var strs = str.split("@"); //生成数组.
var num = 0;
var is1 = false;
var listbox = '';
//循环数组.
for (var idx = 0; idx < strs.length; idx++) {
var groupName = strs[idx];
if (groupName == "" || groupName == null)
continue;
listbox += "<tr onclick=\"GroupBarClick('" + groupName + "')\" > <th colspan=8 class='table-title'> <i class='fa fa-minus-square' alert='Min' id='Img" + groupName + "'></i><span>" + groupName + "</span></th> </tr>";
//增加处理.
for (var i = 0; i < data.length; i++) {
var work = data[i];
if (work.FlowName != groupName)
continue;
num++;
if (is1 == true) {
listbox += "<tr id='" + groupName + num + "' >";
is1 = false;
} else {
listbox += "<tr id='" + groupName + num + "' >";
is1 = true;
}
listbox += "<td>" + num + "</td>";
listbox += "<td><a href=\"javascript:OpenFrm('" + work.WorkID + "','" + work.NodeID + "','" + work.FlowNo + "','" + 0 + "','" + work.FlowName + "')\" >" + work.Title + "</a></td>";
listbox += "<td>" + work.StarterName + "</td>";
listbox += "<td>" + work.NodeName + "</td>";
listbox += "<td>" + work.RDT + "</td>";
listbox += "<td>" + work.SDT + "</td>";
if (work.PRI === 0)
listbox += "<td><img src='./Img/PRI/0.png'/></td>";
if (work.PRI === 1)
listbox += "<td><img src='./Img/PRI/1.png'/></td>";
if (work.PRI === 2)
listbox += "<td><img src='./Img/PRI/2.png'/></td>";
if (work.WFState == 1) {
listbox += "<td>草稿</td>";
}
if (work.WFState == 2) {
listbox += "<td>进行中</td>";
}
if (work.WFState == 5) {
listbox += "<td>" + '<font color=red>退回</font></td>';
}
if (work.WFState == 3) {
listbox += "<td>" + '<font color=green>完成</font></td>';
}
if (work.WFState == 6) {
listbox += "<td>" + '<font color=red>移交</font></td>';
}
if (work.WFState == 8) {
listbox += "<td>" + '<font color=red>加签</font></td>';
}
listbox += "</tr>";
}
}
$('#Table1').html(listbox);
$("#Table2").html("合计:" + data.length + "条");
}
</script>
</body>
</html>