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.
155 lines
5.3 KiB
Plaintext
155 lines
5.3 KiB
Plaintext
<!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">
|
|
var keyWord = "";
|
|
var nodeID = GetQueryString("FK_Node");
|
|
var orgNo = GetQueryString("OrgNo");
|
|
//页面启动函数.
|
|
$(function () {
|
|
$("#Msg").html("<img src=../../../Img/loading.gif /> 正在加载,请稍后......");
|
|
GetData();
|
|
|
|
});
|
|
|
|
function SearchIt() {
|
|
keyWord = promptGener('请输入关键字', keyWord);
|
|
if (keyWord == null || keyWord == undefined)
|
|
keyWord = "";
|
|
GetData();
|
|
}
|
|
|
|
function GetData() {
|
|
|
|
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");
|
|
dt.RetrieveCond("Name", "like", '%' + keyWord + '%', "No");
|
|
}
|
|
|
|
//var dt = new Entities("BP.WF.Template.FlowExts");
|
|
//dt.RetrieveCond("Name", "like", '%' + keyWord + '%', "No");
|
|
|
|
|
|
var Autos = new Entities("BP.WF.Template.SFlow.SubFlowAutos");
|
|
Autos.Retrieve("FK_Node", nodeID, "SubFlowType", 1);
|
|
|
|
|
|
var html = "";
|
|
for (var i = 0; i < dt.length; i++) {
|
|
|
|
var en = dt[i];
|
|
|
|
html += "<tr>";
|
|
var orgNo = en.OrgNo || "";
|
|
html += "<td>" + 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 < Autos.length; myidx++) {
|
|
|
|
var Auto = Autos[myidx];
|
|
if (Auto.FK_Flow == en.No) {
|
|
isHave = true;
|
|
|
|
if (Auto.FlowName != en.Name) {
|
|
|
|
var AutoEn = new Entity("BP.WF.Template.SFlow.SubFlowAuto", Auto);
|
|
AutoEn.FlowName = en.Name;
|
|
AutoEn.Update();
|
|
//Auto.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>";
|
|
}
|
|
$("#SubFlows").html(html);
|
|
}
|
|
|
|
function CheckIt(flowNo, name) {
|
|
|
|
if (window.confirm('您确定要增加吗?') == false)
|
|
return;
|
|
|
|
var nodeID = GetQueryString("FK_Node");
|
|
|
|
var ens = new Entities("BP.WF.Template.SFlow.SubFlowAutos");
|
|
ens.Retrieve("FK_Node", nodeID, "SubFlowNo", flowNo, "SubFlowType", 1);
|
|
|
|
if (ens.length == 1) {
|
|
alert("该流程已经存在");
|
|
return;
|
|
}
|
|
|
|
var myNode = new Entity("BP.WF.Node", nodeID);
|
|
var en = new Entity("BP.WF.Template.SFlow.SubFlowAuto");
|
|
|
|
en.SubFlowNo = flowNo;
|
|
en.FK_Node = nodeID;
|
|
en.SubFlowName = name;
|
|
en.SubFlowType = 1;
|
|
en.FK_Flow = myNode.FK_Flow;
|
|
|
|
var myen = en.Insert();
|
|
|
|
SetHref('../../../Comm/RefFunc/EnOnly.htm?EnName=BP.WF.Template.SFlow.SubFlowAuto&PKVal=' + myen.MyPK);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<table id="Table1" style="width: 95%">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
组织
|
|
</th>
|
|
<!--<th>
|
|
流程类别
|
|
</th>-->
|
|
<th>
|
|
流程编号
|
|
</th>
|
|
<th>
|
|
名称<div style='float:right'><img src='../../../Img/Search.png' style='width:24px;' onclick='SearchIt();'></div>
|
|
</th>
|
|
<th>
|
|
操作
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="SubFlows">
|
|
</tbody>
|
|
</table>
|
|
</body>
|
|
</html>
|