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.

145 lines
4.6 KiB
Plaintext

11 months ago
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>延续子流程</title>
<link href="../../../Comm/Style/CommStyle.css" rel="stylesheet" type="text/css" />
<link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
<link href="../../../Scripts/easyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="../../../Scripts/easyUI/themes/icon.css" rel="stylesheet" type="text/css" />
<script src="../../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../../../Scripts/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../../../Scripts/QueryString.js" type="text/javascript"></script>
<script type="text/javascript" src="../../../Scripts/config.js"></script>
<script type="text/javascript" src="../../../Comm/Gener.js"></script>
<script src="../../../Scripts/EasyUIUtility.js" type="text/javascript"></script>
<base target="_self" />
<script type="text/javascript">
//页面启动函数.
$(function () {
$("#Msg").html("<img src=../../../Img/loading.gif />&nbsp;正在加载,请稍后......");
//求出来已经设置的延续子流程.
var nodeID = GetQueryString("FK_Node");
//如果是集团版,就查询指定组织的.
var orgNo = GetQueryString("OrgNo");
if (orgNo == undefined || orgNo == "undefined")
orgNo = "ccflow";
var webUser = new WebUser();
var dt = new Entities("BP.WF.Template.FlowExts");
if (webUser.CCBPMRunModel == 1)
dt.Retrieve("OrgNo", orgNo);
else
dt.RetrieveAll("FK_FlowSort");
var yanXus = new Entities("BP.WF.Template.SFlow.SubFlowYanXus");
yanXus.Retrieve("FK_Node", nodeID, "SubFlowType", 2);
var html = "";
for (var i = 0; i < dt.length; i++) {
var en = dt[i];
html += "<tr>";
html += "<td>" + en.OrgNo + "</td>"; //组织编号
// html += "<td>" + en.FK_FlowSortText + "</td>";
html += "<td>" + en.No + "</td>";
html += "<td>" + en.Name + "</td>";
var isHave = false;
for (var myidx = 0; myidx < yanXus.length; myidx++) {
var yanXu = yanXus[myidx];
if (yanXu.FK_Flow == en.No) {
isHave = true;
if (yanXu.FlowName != en.Name) {
var yanXuEn = new Entity("BP.WF.Template.SFlow.SubFlowYanXu", yanXu);
yanXuEn.FlowName = en.Name;
yanXuEn.Update();
//yanXu.Update();
}
break;
}
}
if (isHave == false)
html += "<td><a href=\"javascript:CheckIt('" + en.No + "','" + en.Name + "');\" >选择</a></td>";
else
html += "<td><font color=red>已存在</font></td>";
html += "</tr>";
}
$("#Table1 tr:last").after(html);
});
function CheckIt(flowNo, name) {
if (window.confirm('您确定要增加吗?') == false)
return;
var nodeID = GetQueryString("FK_Node");
var ens = new Entities("BP.WF.Template.SFlow.SubFlowYanXus");
ens.Retrieve("FK_Node", nodeID, "FK_Flow", flowNo, "SubFlowType", 2);
if (ens.length == 1) {
alert("该流程已经存在");
return;
}
var myNode = new Entity("BP.WF.Node", nodeID);
var en = new Entity("BP.WF.Template.SFlow.SubFlowYanXu");
en.SubFlowNo = flowNo;
en.FK_Node = nodeID;
en.SubFlowName = name;
en.SubFlowType = 2;
en.FK_Flow = myNode.FK_Flow;
var myen = en.Insert();
SetHref('../../../Comm/RefFunc/EnOnly.htm?EnName=BP.WF.Template.SFlow.SubFlowYanXu&PKVal=' + myen.MyPK);
//alert('当前流程已经加入了延续流程中.');
}
</script>
</head>
<body>
<table id="Table1" style="width: 100%">
<tr>
<th>
组织编号
</th>
<!--<th>
流程类别
</th>-->
<th>
流程编号
</th>
<th>
名称
</th>
<th>
操作
</th>
</tr>
</table>
</body>
</html>