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.

285 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="/WF/Scripts/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="/WF/Scripts/bootstrap/css/font-awesome.css" rel="stylesheet">
<link href="/WF/Style/skin/css/style.css" rel="stylesheet" type="text/css" />
<link href="/WF/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="/WF/Scripts/bootstrap/js/jquery.min.js"></script>
<script type="text/javascript" src="/WF/Scripts/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/WF/Style/skin/js/mp.mansory.min.js"></script>
<script src="/WF/Scripts/layui/layui/lay/modules/layer.js" type="text/javascript"></script>
<link href="../WF/Scripts/layui/layui/css/modules/layer/default/layer.css" rel="stylesheet" />
<script src="/WF/Scripts/QueryString.js"></script>
<script src="/WF/Scripts/config.js" type="text/javascript"></script>
<script src="/WF/Comm/Gener.js" type="text/javascript"></script>
<!-- 处理多语言 -->
<script src="/WF/Data/lang/load.js" type="text/javascript"></script>
<script src="/WF/Data/lang/js/zh-cn.js"></script>
<script src="/WF/Data/lang/lang.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var webUser = new WebUser();
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 WinOpenStartFlow(flowNo, title, workModel, FrmID) {
workModel = workModel == null || workModel == undefined|| workModel=="undefined" ? 0 : workModel;
var showList = GetQueryString("ShowList");
var url = "";
if (workModel == 0) {
if (showList == 1)
url = "/WF/List.htm?FK_Flow=" + flowNo;
else
url = "/WF/MyFlow.htm?FK_Flow=" + flowNo;
//内部流程
if (workModel == 0) {
window.open(url);
return;
}
}
//实体
if (workModel == 2 || workModel == 3) {
//在Tab页打开SearchDict页面
if (FrmID == null || FrmID == undefined || FrmID == "")
FrmID = "Frm_FenSiHuoDongDengJi_" + webUser.OrgNo;
if(workModel ==2)
url = basePath + "/App/OneFrm/Default.htm?FrmID=" + FrmID + "&FK_MapData=" + FrmID + "&WorkModel=" + workModel + "&OrgNo=" + webUser.OrgNo + "&FK_Flow=" + flowNo;
if (workModel == 3)
url = basePath + "/App/OneFrm/Default.htm?FrmID=" + FrmID + "&FK_MapData=" + FrmID + "&WorkModel=" + workModel + "&OrgNo=" + webUser.OrgNo + "&FK_Flow=" + flowNo;
//if (top.layui && top.layui.index) {
// top.layui.index.openTabsPage(url, title)
//} else {
window.open(url)
//}
return;
}
//外部流程
url = basePath + "/App/Share.htm?FK_Flow=" + flowNo + "&OrgNo=" + webUser.OrgNo;
layer.open({
skin: 'layer-class',
type: 2,
title: title + ' : 发起申请',
area: ['96%', '90%'],
content: url
});
}
/**
* 发起时打开窗口
* @param flowNo 流程编号
* @param title 弹出窗标题
* @param workModel 0内部流程 1外部流程 2实体 3单据
*/
function WinOpenCenter(flowNo, title, workModel, FrmID) {
var showList = GetQueryString("ShowList");
var url = "";
if (workModel == 0) {
if (showList == 1)
url = "/WF/List.htm?FK_Flow=" + flowNo;
else
url = "/WF/MyFlow.htm?FK_Flow=" + flowNo;
//内部流程
if (workModel == 0) {
window.open(url);
return;
}
}
//实体
if (workModel == 2 || workModel == 3) {
//在Tab页打开SearchDict页面
if (FrmID == null || FrmID == undefined || FrmID == "")
FrmID = "Frm_FenSiHuoDongDengJi_" + webUser.OrgNo;
url = basePath + "/WF/CCBill/SearchDict.htm?FrmID=" + FrmID + "&OrgNo=" + webUser.OrgNo + "&FlowNo=" + flowNo;
if (top.layui && top.layui.index) {
top.layui.index.openTabsPage(url, title)
} else {
window.open(url)
}
return;
}
//外部流程
url = basePath + "/App/Share.htm?FK_Flow=" + flowNo + "&OrgNo=" + webUser.OrgNo;
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.Cloud.HttpHandler.App");
handler.AddUrlData();
var data = handler.DoMethodReturnString("Start_Init");
if (data.indexOf('err@') == 0) {
alert(data);
return;
}
data = JSON.parse(data);
console.log(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>";
//增加处理.
for (var idx = 0; idx < dtStart.length; idx++) {
var flow = dtStart[idx];
var flowSort = flow.FK_FlowSort;
if (sortNo != flowSort)
continue;
listbox += "<tr>";
listbox += " <td>";
//流程就打开流程中心, 表单就打开表单中心.
listbox += "<a href=\"javascript:WinOpenStartFlow('" + flow.No + "','" + sortName + " - " + flow.Name + "','" + flow.WorkModel + "','" + flow.FrmID + "');\" > &sdot;<img src='' />" + flow.No + "." + flow.Name + "</a></td>";
listbox += "</td>";
listbox += "<td class='chooser' style='text-align:right' >";
//流程就发起流程, 表单就创建表单.
listbox += "<a href=\"javascript:WinOpenStartFlow('" + flow.No + "','" + sortName + " - " + flow.Name + "','" + flow.WorkModel + "','" + flow.FrmID + "');\" ><img src='/App/OneFlow/MenuImg/Default.png' style='width:16px;' />发起</a></td><td class='chooser'>";
listbox += " </td>";
listbox += "</tr>";
}
listbox += '</tbody></table></div></div></div>';
myNum++;
}
$('#lists').html(listbox);
}
function Ref() {
SetHref('Start.htm?IsRef=1');
}
</script>
</body>
</html>