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.
356 lines
13 KiB
Plaintext
356 lines
13 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>
|
||
|
<tr id="tablet">
|
||
|
</tr>
|
||
|
</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 type="text/javascript">
|
||
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
function WinOpenIt(url) {
|
||
|
//窗口最大化e
|
||
|
var scrWidth = screen.availWidth;
|
||
|
var scrHeight = screen.availHeight;
|
||
|
var self = window.open(url, '_blank', "resizable=1,scrollbars=yes");
|
||
|
self.moveTo(0, 0);
|
||
|
self.resizeTo(scrWidth, scrHeight);
|
||
|
self.focus();
|
||
|
var loop = setInterval(function () {
|
||
|
if (self.closed) {
|
||
|
clearInterval(loop);
|
||
|
InitPage();
|
||
|
InitHomeCount();
|
||
|
}
|
||
|
}, 1);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
//页面启动函数.
|
||
|
$(function () {
|
||
|
InitPage();
|
||
|
|
||
|
});
|
||
|
|
||
|
//初始化数据.
|
||
|
function InitPage() {
|
||
|
|
||
|
//获取当前时间
|
||
|
var cdt = getNowFormatDate();
|
||
|
var timeKey = Math.random();
|
||
|
|
||
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF");
|
||
|
handler.AddJson();
|
||
|
handler.AddUrlData();
|
||
|
var data = handler.DoMethodReturnString("HuiQianList_Init");
|
||
|
|
||
|
|
||
|
if (data.indexOf('err@') == 0) {
|
||
|
alert(data);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
data = cceval('(' + data + ')');
|
||
|
|
||
|
//设置表头.
|
||
|
var groupBy = GetQueryString("GroupBy");
|
||
|
if (groupBy == "" || groupBy == null)
|
||
|
groupBy = "ByFlow";
|
||
|
|
||
|
|
||
|
var nodeIDt = GetQueryString("FK_Node");
|
||
|
var tablet = "";
|
||
|
|
||
|
tablet += "<th>序号</th>";
|
||
|
// title += "<th style='width:20px;'>优先级</th>";
|
||
|
tablet += "<th>标题</th>";
|
||
|
|
||
|
if (groupBy == "ByNode") {
|
||
|
tablet += "<th><a href='?FK_Node=" + nodeIDt + "&GroupBy=ByFlow' >流程</th>";
|
||
|
tablet += "<th><a href='?FK_Node=" + nodeIDt + "&GroupBy=ByStarter' >发起人</th>";
|
||
|
}
|
||
|
|
||
|
if (groupBy == "ByFlow") {
|
||
|
tablet += "<th><a href='?FK_Node=" + nodeIDt + "&GroupBy=ByNode' >节点</th>";
|
||
|
tablet += "<th><a href='?FK_Node=" + nodeIDt + "&GroupBy=ByStarter' >发起人</th>";
|
||
|
}
|
||
|
|
||
|
if (groupBy == "ByStarter") {
|
||
|
tablet += "<th><a href='?FK_Node=" + nodeIDt + "&GroupBy=ByFlow' >流程</th>";
|
||
|
tablet += "<th><a href='?FK_Node=" + nodeIDt + "&GroupBy=ByNode' >节点</th>";
|
||
|
}
|
||
|
|
||
|
|
||
|
tablet += "<th>参与人</th>";
|
||
|
// title += "<th>备注</th>";
|
||
|
|
||
|
|
||
|
|
||
|
$("#tablet").html(tablet);
|
||
|
|
||
|
|
||
|
|
||
|
//生成分组的字符串.
|
||
|
var str = "";
|
||
|
for (var i = 0; i < data.length; i++) {
|
||
|
|
||
|
if (groupBy == "ByNode") {
|
||
|
if (str.indexOf('@' + data[i].NodeName) == -1)
|
||
|
str += "@" + data[i].NodeName;
|
||
|
}
|
||
|
|
||
|
if (groupBy == "ByFlow") {
|
||
|
if (str.indexOf('@' + data[i].FlowName) == -1)
|
||
|
str += "@" + data[i].FlowName;
|
||
|
}
|
||
|
|
||
|
if (groupBy == "ByStarter") {
|
||
|
if (str.indexOf('@' + data[i].StarterName) == -1)
|
||
|
str += "@" + data[i].StarterName;
|
||
|
}
|
||
|
}
|
||
|
var strs = str.split("@"); //生成数组.
|
||
|
var listbox = '';
|
||
|
var num = 0;
|
||
|
var is1 = false;
|
||
|
|
||
|
//循环数组.
|
||
|
for (var idx = 0; idx < strs.length; idx++) {
|
||
|
|
||
|
var groupName = strs[idx];
|
||
|
|
||
|
if (groupName == "" || groupName == null)
|
||
|
continue;
|
||
|
|
||
|
|
||
|
listbox += "<tr onclick=\"GroupBarClick('" + groupName + "')\" > <th colspan=5 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 (groupBy == "ByNode") {
|
||
|
|
||
|
if (work.NodeName != groupName) {
|
||
|
continue;
|
||
|
}
|
||
|
} else if (groupBy == "ByFlow") {
|
||
|
if (work.FlowName != groupName) {
|
||
|
continue;
|
||
|
}
|
||
|
} else if (groupBy == "ByStarter") {
|
||
|
if (work.StarterName != groupName) {
|
||
|
continue;
|
||
|
}
|
||
|
} else {
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
var newRow = "";
|
||
|
var title = work.Title;
|
||
|
var flowNo = work.FK_Flow;
|
||
|
var flowName = work.FlowName;
|
||
|
var nodeName = work.NodeName;
|
||
|
var starterName = work.StarterName;
|
||
|
var nodeID = work.FK_Node;
|
||
|
var workID = work.WorkID;
|
||
|
var paras = ""; // work.AtPara;
|
||
|
var todoEmps = work.TodoEmps;
|
||
|
|
||
|
if (paras != '') {
|
||
|
paras = paras.replace("'", "\\'");
|
||
|
while (true) {
|
||
|
paras = paras.replace('@', '&');
|
||
|
|
||
|
if (paras.indexOf('@') < 0) {
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
paras = "1" + paras;
|
||
|
}
|
||
|
|
||
|
num++;
|
||
|
|
||
|
if (is1 == true) {
|
||
|
newRow += "<tr id='" + groupName + num + "' >";
|
||
|
is1 = false;
|
||
|
}
|
||
|
else {
|
||
|
newRow += "<tr id='" + groupName + num + "' >";
|
||
|
is1 = true;
|
||
|
}
|
||
|
|
||
|
listbox += "<td>" + num + "</td>"; //序号.
|
||
|
//newRow += "<td><img class=Icon src='Img/PRI/" + pri + ".png' class=Icon /></td>"; //优先级
|
||
|
|
||
|
var url = "";
|
||
|
|
||
|
url = "<a href=\"javascript:WinOpenIt('MyFlow.htm?FK_Flow=" + flowNo + "&FK_Node=" + nodeID + "&WorkID=" + workID + "&IsRead=0&T=" + timeKey + "&Paras=" + paras + "');\" >" + title + "</a>";
|
||
|
|
||
|
listbox += "<td>" + url + "</td>"; //标题
|
||
|
|
||
|
if (groupBy == "ByNode") {
|
||
|
listbox += "<td>" + flowName + "</td>"; //流程类别
|
||
|
listbox += "<td>" + starterName + "</td>"; //发起人
|
||
|
} else if (groupBy == "ByFlow") {
|
||
|
listbox += "<td>" + nodeName + "</td>"; //节点名称
|
||
|
listbox += "<td>" + starterName + "</td>"; //发起人
|
||
|
|
||
|
} else if (groupBy == "ByStarter") {
|
||
|
listbox += "<td>" + flowName + "</td>"; //流程类别
|
||
|
listbox += "<td>" + nodeName + "</td>"; //节点名称
|
||
|
}
|
||
|
|
||
|
var emp = "";
|
||
|
var todoEmp = todoEmps.split(";");
|
||
|
for (j = 0; j < todoEmp.length; j++) {
|
||
|
if (todoEmp[j] == '' || todoEmp[j] == null || todoEmp[j] == undefined)
|
||
|
continue;
|
||
|
if (todoEmp[j].indexOf(',') != -1) {
|
||
|
var aa = todoEmp[j].split(",")[1] + "、";
|
||
|
emp += aa;
|
||
|
|
||
|
} else {
|
||
|
emp += todoEmp[j] + "、";
|
||
|
}
|
||
|
|
||
|
}
|
||
|
emp = emp.substring(0, emp.lastIndexOf("、"));
|
||
|
listbox += "<td>" + emp + "</td>"; //参与人
|
||
|
listbox += "</tr>";
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$('#Table1').html(listbox);
|
||
|
$("#Table2").html("合计:" + data.length + "条");
|
||
|
}
|
||
|
//获取当前时间
|
||
|
function getNowFormatDate() {
|
||
|
var date = new Date();
|
||
|
var seperator1 = "-";
|
||
|
var seperator2 = ":";
|
||
|
var month = date.getMonth() + 1;
|
||
|
var strDate = date.getDate();
|
||
|
if (month >= 1 && month <= 9) {
|
||
|
month = "0" + month;
|
||
|
}
|
||
|
if (strDate >= 0 && strDate <= 9) {
|
||
|
strDate = "0" + strDate;
|
||
|
}
|
||
|
//当前时间=年份-月份-日 小时:分钟
|
||
|
var cdt = date.getFullYear() + seperator1 + month + seperator1 + strDate
|
||
|
+ " " + date.getHours() + seperator2 + date.getMinutes();
|
||
|
|
||
|
return cdt;
|
||
|
}
|
||
|
</script>
|
||
|
<script type="text/javascript">
|
||
|
var NS4 = (document.layers);
|
||
|
var IE4 = (document.all);
|
||
|
var win = window;
|
||
|
var n = 0;
|
||
|
function findInPage(str) {
|
||
|
|
||
|
// alert(document.getElementById('string1'));
|
||
|
str = document.getElementById('string1').value;
|
||
|
// alert(str);
|
||
|
var txt, i, found;
|
||
|
if (str == "")
|
||
|
return false;
|
||
|
if (NS4) {
|
||
|
if (!win.find(str))
|
||
|
while (win.find(str, false, true))
|
||
|
n++;
|
||
|
else
|
||
|
n++;
|
||
|
if (n == 0)
|
||
|
alert("对不起!没有你要找的内容。");
|
||
|
}
|
||
|
if (IE4) {
|
||
|
txt = win.document.body.createTextRange();
|
||
|
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
|
||
|
txt.moveStart("character", 1);
|
||
|
txt.moveEnd("textedit");
|
||
|
}
|
||
|
if (found) {
|
||
|
txt.moveStart("character", -1);
|
||
|
txt.findText(str);
|
||
|
txt.select();
|
||
|
txt.scrollIntoView();
|
||
|
n++;
|
||
|
}
|
||
|
else {
|
||
|
if (n > 0) {
|
||
|
n = 0;
|
||
|
findInPage(str);
|
||
|
}
|
||
|
else
|
||
|
alert("对不起!没有你要找的内容。");
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|