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.
320 lines
13 KiB
Plaintext
320 lines
13 KiB
Plaintext
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>驰骋工作流</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="white" />
|
|
|
|
<link href="../js/mui/css/mui.css" rel="stylesheet" type="text/css" />
|
|
<script src="../js/mui/js/mui.min.js" type="text/javascript"></script>
|
|
<script src="../js/jquery.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts/config.js" type="text/javascript"></script>
|
|
<script src="../Scripts/QueryString.js" type="text/javascript"></script>
|
|
<script src="../Comm/Gener.js" type="text/javascript"></script>
|
|
|
|
<script src="../Scripts/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/bootstrap/js/jquery.cokie.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/vue.js"></script>
|
|
<style type="text/css">
|
|
* {
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
|
|
.mui-button{
|
|
font-size:12px !important;
|
|
line-height:15px;
|
|
padding:3px 6px;
|
|
margin-right:10px;
|
|
}
|
|
.xm-label .scroll .label-content {
|
|
display: flex;
|
|
padding: 3px 10px;
|
|
}
|
|
.xm-label .xm-label-block {
|
|
height: 26px;
|
|
line-height: 26px;
|
|
}
|
|
|
|
.xm-label .xm-label-block {
|
|
display: flex;
|
|
position: relative;
|
|
padding: 0px 5px;
|
|
margin: 2px 5px 2px 0;
|
|
border-radius: 3px;
|
|
align-items: baseline;
|
|
color: #FFF;
|
|
}
|
|
|
|
|
|
</style>
|
|
<script type="text/javascript" language="javascript">
|
|
var currSelectNode = "";
|
|
$(function () {
|
|
|
|
var html = "<table class='table table-hover table-bordered' style='width:100%;' >";
|
|
html += "<tr>";
|
|
html += "<th width='5%'>步骤</th>";
|
|
html += "<th width='*'>节点</th>";
|
|
html += "<th width='50%'>处理人</th>";
|
|
//html += "<th width='15%'>应完成时间</th>";
|
|
html += "<th width='200px'>操作</th>";
|
|
html += "</tr>";
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt");
|
|
handler.AddUrlData();
|
|
var data = handler.DoMethodReturnJSON("TransferCustom_Init");
|
|
|
|
var nds = data["WF_Node"]; //节点.
|
|
var tcs = data["WF_TransferCustoms"]; //选择的接受人.
|
|
var gwls = data["WF_GenerWorkerList"]; //选择的接受人.
|
|
|
|
//输出已经走过的节点.
|
|
var _html = "";
|
|
for (var i = 0; i < gwls.length; i++) {
|
|
var gwl = gwls[i];
|
|
_html += "<li class='mui-table-view-cell' style='padding-left:15px;padding-right:15px'>";
|
|
_html += "<div style='color:#666666;font-size:0.625rem' >";
|
|
|
|
_html += "<span style='margin-right:20px'>步骤:" + gwl.FK_Node + "</span> <span>节点:" + gwl.FK_NodeText + "</span>";
|
|
_html += "<div>处理人:" + gwl.FK_EmpText + "</div> ";
|
|
_html += "</div>";
|
|
_html += "</li>";
|
|
}
|
|
$("#complete").html(_html);
|
|
//要排列的节点.
|
|
var IsShowSave = false;
|
|
_html = "";
|
|
for (var i = 0; i < tcs.length; i++) {
|
|
var tc = tcs[i];
|
|
if (tc.IsEnable == 0)
|
|
continue;
|
|
_html += "<li class='mui-table-view-cell' style='padding-left:15px;padding-right:15px'>";
|
|
_html += "<div style='color:#666666;font-size:0.625rem' >";
|
|
|
|
_html += "<span style='margin-right:20px'>步骤:" + tc.FK_Node + "</span> <span>节点:" + tc.NodeName + "</span>";
|
|
_html += "<div><div style='display: flex;float: left;margin-top: 10px;'>处理人:</div>" + getEmpsTag(tc) + "</div> ";
|
|
|
|
_html += "<div style='text-align:right'>";
|
|
_html += "<button type='button' class='mui-btn mui-button mui-btn-warning mui-icon mui-icon mui-icon-plusempty' onclick='OpenEmps(" + tc.FK_Node + ")'>接收人</button>";
|
|
_html += "<button type='button' class='mui-btn mui-button mui-btn-primary mui-icon mui-icon-arrowthinup' onclick='DoUp(\"" + tc.MyPK + "\")'>上移</button>";
|
|
_html += "<button type='button' class='mui-btn mui-button mui-btn-success mui-icon mui-icon-arrowthindown' onclick='DoDown(\"" + tc.MyPK + "\")'>下移</button>";
|
|
_html += "<button type='button' class='mui-btn mui-button mui-btn-danger mui-icon mui-icon-trash' onclick='Remove(\"" + tc.MyPK + "\")'>移除</button>";
|
|
_html += "</div>";
|
|
_html += "</li>";
|
|
}
|
|
$("#comb").html(_html);
|
|
//可选步骤.
|
|
_html = "";
|
|
for (var i = 0; i < tcs.length; i++) {
|
|
var tc = tcs[i];
|
|
if (tc.IsEnable == 1)
|
|
continue;
|
|
|
|
_html += "<li class='mui-table-view-cell' style='padding-left:15px;padding-right:15px'>";
|
|
_html += "<div style='color:#666666;font-size:0.625rem' >";
|
|
|
|
_html += "<span style='margin-right:20px'>步骤:" + tc.FK_Node + "</span> <span>节点:" + tc.NodeName + "</span>";
|
|
_html += "<div>接收人:" + tc.WorkerName + "</div> ";
|
|
_html += "</div>";
|
|
_html += "<div style='text-align:right'>";
|
|
_html += "<button type='button' class='mui-btn mui-button mui-btn-primary mui-icon mui-icon-arrowthinup' onclick='Add(\"" + tc.MyPK + "\")'>增加</button>";
|
|
_html += "</div>";
|
|
_html += "</li>";
|
|
}
|
|
|
|
$("#option").html(_html);
|
|
})
|
|
|
|
function OpenEmps(currNode) {
|
|
var u = new WebUser();
|
|
mui.openWindow({
|
|
url: "./SelectEmps.htm?FK_Dept=" + u.FK_Dept + "&ToNode=" + currNode + "&WorkID=" + GetQueryString("WorkID") + "&FK_Node=" + GetQueryString("FK_Node") + "&FK_Flow=" + GetQueryString("FK_Flow") +"&PageName=TransferCustom&s=" + Math.random(),
|
|
id: "SelectEmps.htm",
|
|
styles: {
|
|
popGesture: "close",
|
|
statusbar: {
|
|
background: "#f7f7f7"
|
|
}
|
|
},
|
|
show: {
|
|
aniShow: true,
|
|
duration: 300
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
function getEmpsTag(tc) {
|
|
if (tc.Worker == null) tc.Worker = "";
|
|
if (tc.WorkerName == null) tc.WorkerName = "";
|
|
|
|
var selecter = ",";
|
|
var workers = tc.Worker.split(',');
|
|
var workerNames = tc.WorkerName.split(',');
|
|
var _html = '<div class="xm-label auto-row">';
|
|
_html+='<div class="scroll">';
|
|
_html += '<div class="label-content" title="' + workerNames + '">';
|
|
$.each(workers, function (i, worker) {
|
|
if (worker == null || worker == undefined || worker == "")
|
|
return true;
|
|
if (selecter.indexOf("," + worker + ",") != -1)
|
|
return true;
|
|
selecter += worker + ",";
|
|
_html += '<div class="xm-label-block " style="background-color: #007aff;">';
|
|
_html += '<span>' + workerNames[i] +'</span>';
|
|
_html += "<i class='mui-icon mui-icon-closeempty' style = 'font-size:17px' onclick='RemoveEmp(\"" + tc.MyPK + "\",\"" + worker + "\",\"" + workerNames[i] +"\")'></i>";
|
|
_html += "</div>";
|
|
|
|
});
|
|
_html += "</div>";
|
|
_html += "</div>";
|
|
_html += "</div>";
|
|
return _html;
|
|
}
|
|
|
|
//设置选中的人员
|
|
function selectEmpsWindowClose(data) {
|
|
|
|
$('#SelectEmpsModal').modal('hide');
|
|
if (data == '取消') {
|
|
return;
|
|
}
|
|
var val = frames["iframeSelectEmpsForm"].window.returnVal;
|
|
var mypk = currSelectNode + "_" + GetQueryString("WorkID");
|
|
var en = new Entity("BP.WF.TransferCustom", mypk);
|
|
en.Worker = en.Worker + "," + val.No + ",";
|
|
en.WorkerName = en.WorkerName + "," + val.Name + ",";
|
|
en.Update();
|
|
Reload();
|
|
}
|
|
|
|
//初始化接收人员列表
|
|
function InitMtags(mtags, MyPK, worker, workerName) {
|
|
var workers = worker.split(',');
|
|
var workerNames = workerName.split(',');
|
|
var initJsonData = [];
|
|
$.each(workers, function (k, o) {
|
|
if (o != null && o != "")
|
|
initJsonData.push({
|
|
"No": o,
|
|
"Name": workerNames[k],
|
|
"MyPK": MyPK
|
|
});
|
|
});
|
|
mtags.mtags("loadData", initJsonData);
|
|
}
|
|
|
|
//删除人员
|
|
function RemoveEmp(mypk, empNo, empName) {
|
|
var en = new Entity("BP.WF.TransferCustom", mypk);
|
|
en.Worker = en.Worker.replace(empNo + ",", "");
|
|
en.WorkerName = en.WorkerName.replace(empName + ",", "");
|
|
en.Update();
|
|
Reload();
|
|
}
|
|
function DoUp(myPK) {
|
|
|
|
var en = new Entity("BP.WF.TransferCustom", myPK);
|
|
en.DoMethodReturnString("DoUp");
|
|
Reload();
|
|
}
|
|
|
|
function DoDown(myPK) {
|
|
|
|
var en = new Entity("BP.WF.TransferCustom", myPK);
|
|
en.DoMethodReturnString("DoDown");
|
|
Reload();
|
|
}
|
|
|
|
|
|
function Add(myPK) {
|
|
|
|
var en = new Entity("BP.WF.TransferCustom", myPK);
|
|
en.IsEnable = 1;
|
|
en.Update();
|
|
Reload();
|
|
}
|
|
function Remove(myPK) {
|
|
var ens = new Entities("BP.WF.TransferCustoms");
|
|
ens.Retrieve("WorkID", GetQueryString("WorkID"), "IsEnable", 1);
|
|
if (ens.length == 1) {
|
|
alert("流转自定义必须选择一个游离态节点,当前只有一个游离态节点不能移除");
|
|
return;
|
|
}
|
|
var en = new Entity("BP.WF.TransferCustom", myPK);
|
|
en.IsEnable = 0;
|
|
en.Update();
|
|
Reload();
|
|
}
|
|
function Save() {
|
|
//获取需要保存时间的数据
|
|
var tfs = $('input[name=CHTime]');
|
|
if (tfs.length == 0)
|
|
return;
|
|
var workId = GetQueryString("WorkID");
|
|
$.each(tfs, function (i, obj) {
|
|
var id = obj.id;
|
|
if (obj.value == "") {
|
|
alert("节点" + id.replace("_" + workId, "") + "不能为空");
|
|
return;
|
|
}
|
|
var en = new Entity("BP.WF.TransferCustom");
|
|
en.SetPKVal(id);
|
|
en.RetrieveFromDBSources();
|
|
en.MyPK = id;
|
|
en.PlanDT = obj.value;
|
|
en.Save();
|
|
|
|
});
|
|
|
|
}
|
|
function Back() {
|
|
window.location.href = "../MyFlow.htm?WorkID=" + GetQueryString("WorkID") + "&FK_Flow=" + GetQueryString("FK_Flow") + "&FK_Node=" + GetQueryString("FK_Node") + "&FID=" + GetQueryString("FID");
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<header class="mui-bar mui-bar-nav">
|
|
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" href="javascript:Back();"></a>
|
|
<a class="mui-action-back mui-icon mui-pull-right" href="javascript:Back();" style="font-size:14px">完成</a>
|
|
<h1 class="mui-title">设计流程运行</h1>
|
|
</header>
|
|
<div class="mui-content">
|
|
<div class="mui-scroll-wrapper">
|
|
<div class="mui-scroll">
|
|
<ul id="listview" class="mui-table-view mui-table-view-chevron" style="margin-top:46px">
|
|
<li class='mui-table-view-cell mui-collapse mui-active'>
|
|
<a class='mui-navigate-right' href='#' style="font-size:14px">已运行的节点</a>
|
|
<ul class='mui-table-view mui-table-view-chevron' id="complete">
|
|
</ul>
|
|
</li>
|
|
<li class='mui-table-view-cell mui-collapse mui-active'>
|
|
<a class='mui-navigate-right' href='#' style="font-size:14px">可以动态组合的节点</a>
|
|
<ul class='mui-table-view mui-table-view-chevron' id="comb">
|
|
</ul>
|
|
</li>
|
|
<li class='mui-table-view-cell mui-collapse mui-active'>
|
|
<a class='mui-navigate-right' href='#' style="font-size:14px">可选节点</a>
|
|
<ul class='mui-table-view mui-table-view-chevron' id="option">
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
mui.init({
|
|
|
|
beforeback: function () {//监听物理返回按键的方法
|
|
Back();
|
|
return false;
|
|
}
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|