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.

326 lines
13 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">
<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/font/iconfont.css" rel="stylesheet" type="text/css" />
<!--
关于发起页面的调用说明:
1. 该页面是一个通用的流程发起页面,具有通用的页面风格,可以与很多系统颜色搭配. 如果这个色系不符合您的需要您可以根据这个页面进行改造。
2. 他是根据当前登录人员的权限进行显示该人员所能够发起的流程列表,什么样的岗位人员可以发起什么样的流程.
3. Start.htm?Domain=XXX 则仅仅列出该域下的流程. Domain 就是流程树的节点属性的别名. 您可以在流程设计器的流程树,右键设置,设置一个与域编号.
4. Start.htm?ShowList=1 点击流程的名字的时候直接到达 List.htm?FK_Flow=002, 否则就连接到 MyFlow.htm?FK_Flow=002上。
5. 两个参数可以同时使用 Start.htm?ShowList=1&Domain=XXX
-->
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row c" id="lists">
</div>
</div>
<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 type="text/javascript" src="Style/skin/js/mp.mansory.min.js"></script>
<script src="Scripts/QueryString.js"></script>
<script src="Scripts/layui/layui/lay/modules/layer.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="Data/lang/load.js" type="text/javascript"></script>
<script src="Data/lang/js/zh-cn.js"></script>
<script src="Data/lang/lang.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
//发起时打开窗口
function WinOpenStartFlow(flowNo, title) {
var showList = GetQueryString("ShowList");
var url = "";
if (showList == 1) {
url = "List.htm?FK_Flow=" + flowNo;
window.open(url);
return;
}
JumpFlowPage("MyFlow", title, null, flowNo);
}
function JumpFlowPage(pageType, title, workid, fk_flow, fk_node, fid, pworkid, isread, paras) {
var handler = new HttpHandler("BP.WF.HttpHandler.WF_" + pageType);
handler.AddPara("WorkID", workid);
handler.AddPara("FK_Flow", fk_flow);
handler.AddPara("FK_Node", fk_node);
var data = null;
data = handler.DoMethodReturnString(pageType + "_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 WinOpenSearch(flowNo, title) {
var intFlowNo = flowNo;
var url = "./RptDfine/Default.htm?RptNo=ND" + Number(flowNo) + "RptMy&FK_Flow=" + flowNo;
window.open(url);
return;
//layer.open({
// skin: 'layer-class',
// type: 2,
// title: title + ' : 查询主页',
// area: ['96%', '90%'],
// content: url
//});
}
//我的流程
function WinOpenMyFlow(flowNo, title) {
var intFlowNo = flowNo;
var url = "Search.htm?RptNo=ND" + Number(flowNo) + "RptMy&FK_Flow=" + flowNo;
window.open(url);
return;
//layer.open({
// skin: 'layer-class',
// type: 2,
// title: title + ' : 我的流程',
// area: ['96%', '90%'],
// content: url
//});
}
function GroupBarClick(groupName) {
var alt = document.getElementById('Img' + groupName).alert;
var sta = 'block';
if (alt == 'Max') {
sta = 'block';
alt = 'Min';
classname = 'fa fa-chevron-down';
} else {
sta = 'none';
alt = 'Max';
classname = 'fa fa-chevron-up';
}
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 WinOpenStart(flowNo, title) {
var intFlowNo = flowNo;
var url = "./RptDfine/Search.htm?RptNo=ND" + Number(flowNo) + "RptMy&FK_Flow=" + flowNo + "&SearchType=My";
window.open(url);
return;
}
function WinOpenList(flowNo, title) {
var intFlowNo = flowNo;
var url = "List.htm?RptNo=ND" + Number(flowNo) + "RptMy&FK_Flow=" + flowNo + "&SearchType=My";
window.open(url);
return;
}
//我发起的流程.
function WinOpenJoin(flowNo, title) {
var intFlowNo = flowNo;
var url = "./RptDfine/Search.htm?RptNo=ND" + Number(flowNo) + "RptMyJoin&FK_Flow=" + flowNo + "&SearchType=MyJoin";
window.open(url);
return;
}
//批量发起.
function WinOpenBatch(flowNo, title) {
var url = "BatchStart.htm?FK_Flow=" + flowNo;
layer.open({
skin: 'layer-class',
type: 2,
title: title + ' : 批量发起',
area: ['96%', '90%'],
content: url
});
}
//页面启动函数.
$(function () {
document.title = window.lang.fqxlc;
InitPage();
jQuery(document).ready(function ($) {
$(".c").mpmansory({
childrenClass: 'itemt', // default is a div
columnClasses: 'paddings', //add classes to items
breakpoints: {
lg: 4,
md: 4,
sm: 4,
xs: 12
},
distributeBy: {
order: false,
height: false,
attr: 'data-order',
attrOrder: 'asc'
}, //default distribute by order, options => order: true/false, height: true/false, attr => 'data-order', attrOrder=> 'asc'/'desc'
});
});
});
//初始化数据.
function InitPage() {
$('#lists').html(window.lang.loading);
var handler = new HttpHandler("BP.WF.HttpHandler.WF");
handler.AddUrlData();
var data = handler.DoMethodReturnString("Start_Init");
if (data.indexOf('err@') == 0) {
alert(data);
return;
}
data = JSON.parse(data);
//取出来两个结果集.
var dtSort = data["Sort"]; //类别.
var dtStart = data["Start"]; //发起的流程.
var domain = GetQueryString("Domain");
var myNum = 0;
var is1 = false;
var listbox = '';
for (var i = 0; i < dtSort.length; i++) {
var sortNo = dtSort[i].No;
var sortName = dtSort[i].Name;
var sort = dtSort[i];
if (domain == '' || domain == null) {
} else {
if (sort.Domain != domain)
continue;
}
//检查该类别下是否有流程没有流程就continue ;.
var isHaveFlow = false;
for (var idx = 0; idx < dtStart.length; idx++) {
var flow = dtStart[idx];
if (sortNo == flow.FK_FlowSort) {
isHaveFlow = true;
break;
}
}
if (isHaveFlow == false)
continue;
if (sortName == "" || sortName == null)
continue;
listbox += "<div class='itemt' data-order='" + myNum + "'><div class='ibox float-e-margins'><div class='ibox-title'><h5>" + sortName + "</h5><div class='ibox-tools'><a class='collapse-link' data-toggle='collapse' href='#collapse" + myNum + "'><i class='fa fa-chevron-down' alert='Min' id='Img" + myNum + "' onclick=\"GroupBarClick('" + myNum + "')\"></i></a></div></div><div id='collapse" + myNum + "' class='ibox-contents collapse in'><table class='table table-striped notab'><tbody>";
var isShowFlows = "";
//增加处理.
for (var idx = 0; idx < dtStart.length; idx++) {
var flow = dtStart[idx];
var flowSort = flow.FK_FlowSort;
if (sortNo != flowSort)
continue;
if (isShowFlows.indexOf(flow.No + ",") != -1)
continue;
isShowFlows += flow.No + ",";
listbox += "<tr><td><a href=\"javascript:WinOpenStartFlow('" + flow.No + "','" + sortName + " - " + flow.Name + "');\" > &sdot; " + flow.No + "." + flow.Name + "</a></td><td class='chooser'><a class='dropdown-toggle' data-toggle='dropdown' href='#'><i class='icon iconfont icon-gongju1'></i></a><ul class='dropdown-menu dropdown-user'>"
listbox += "<li><a href=\"javascript:WinOpenList('" + flow.No + "','" + sortName + " - " + flow.Name + "');\" >列表发起</a></li>";
if (flow.IsBatchStart == "1")
listbox += "<li><a href=\"javascript:WinOpenBatch('" + flow.No + "','" + sortName + " - " + flow.Name + "');\" >批量发起</a></li>";
listbox += "<li><a href=\"javascript:WinOpenStart('" + flow.No + "','" + sortName + " - " + flow.Name + "');\" >我发起的流程</a></li>";
listbox += "<li><a href=\"javascript:WinOpenJoin('" + flow.No + "','" + sortName + " - " + flow.Name + "');\" >我审批的流程</a></li>";
listbox += "<li><a href=\"javascript:WinOpenMyFlow('" + flow.No + "','" + sortName + " - " + flow.Name + "');\" >我的流程</a></li>";
//listbox += "<li><a href=\"javascript:WinOpenSearch('" + flow.No + "','" + sortName + " - " + flow.Name + "');\" >查询主页</a></li>;
listbox +="</ul></td></tr>";
}
listbox += '</tbody></table></div></div></div>';
myNum++;
}
$('#lists').html(listbox);
}
function Ref() {
SetHref('Start.htm?IsRef=1');
}
</script>
</body>
</html>