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.

161 lines
6.1 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>
<link href="../../../Scripts/easyUI145/themes/icon.css" rel="stylesheet" type="text/css" />
<link href="../../../Scripts/easyUI145/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
<script src="../../../Scripts/easyUI145/jquery.min.js" type="text/javascript"></script>
<script src="../../../Scripts/easyUI145/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../../../Scripts/QueryString.js" type="text/javascript"></script>
<script src="../../../Scripts/config.js" type="text/javascript"></script>
<script src="../../../Comm/JScript.js" type="text/javascript"></script>
<script src="../../../Scripts/CommonUnite.js" type="text/javascript"></script>
<script src="../../../Scripts/EasyUIUtility.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="DDLBar.js" type="text/javascript"></script>
<script src="../../CCFlowEnum.js" type="text/javascript"></script>
<link href="../../../Style/skin/adminfont/iconfont.css" rel="stylesheet" />
<link href="../../../Style/skin/css/Default.css" rel="stylesheet" />
<script type="text/javascript">
$(function () {
InitBar(StartGuideWay.ByParentFlowModel);
//获取节点属性.
var flowNo = GetQueryString("FK_Flow");
//更新节点表单类型.
var flowNo = GetQueryString("FK_Flow");
var flow = new Entity("BP.WF.Flow", flowNo);
$("#Msg").html("正在加载请稍后....");
var parts = new Entities("BP.WF.Template.Parts");
parts.Retrieve("PartType", "ParentSubFlowGuide", "FK_Flow", flowNo);
var strs = "<table style='width:100%;'>";
strs += "<caption>父流程列表 - <a href='javascript:New();'>新建</a> </caption>";
strs += "<tr>";
strs += "<th>流程编号</th>";
strs += "<th>名称</th>";
strs += "<th>操作</th>";
strs += "</tr>";
for (var i = 0; i < parts.length; i++) {
var part = parts[i];
strs += "<tr>";
strs += "<td>" + part.Tag0 + "</td>";
strs += "<td>" + part.Tag1 + "</td>";
strs += "<td><a href=\"javascript:Edit('" + part.MyPK + "');\" >编辑</a></td>";
strs += "</tr>";
}
strs += "</table>";
$("#Msg").html(strs);
});
function New() {
var flowNo = promptGener('请输入流程编号');
if (flowNo == null || flowNo == undefined)
return;
var en = new Entity("BP.WF.Flow");
en.SetPKVal(flowNo);
var i = en.RetrieveFromDBSources();
if (i == 0) {
alert('流程编号输入错误');
return;
}
var flowName = en.Name;
var myPK = 'ParentSubFlowGuide_' + GetQueryString("FK_Flow") + "_" + flowNo;
var part = new Entity("BP.WF.Template.Part");
part.MyPK = myPK;
part.SetPKVal(myPK);
if (part.RetrieveFromDBSources() != 0) {
part.PartType = "ParentSubFlowGuide";
part.Update();
alert('该流程编号已经存在,当前列表.' + myPK);
Reload();
return;
}
//零件.
var parts = new Entities("BP.WF.Template.Parts");
//检查该流程是否已经被设置了
parts.Retrieve("PartType", "ParentSubFlowGuide", "FK_Flow", flowNo);
if (parts.length != 0) {
alert('ss');
return;
}
part.FK_Flow = GetQueryString("FK_Flow");
part.PartType = "ParentSubFlowGuide";
part.Tag0 = flowNo;
part.Tag1 = flowName;
part.Insert();
var url = "../../../Comm/EnOnly.htm?EnName=BP.WF.Template.PartParentSubGuide&MyPK=" + myPK;
OpenEasyUiDialogExt(url, '设置父流程', 800, 500, true);
return;
}
function Edit(mypk) {
var url = "../../../Comm/EnOnly.htm?EnName=BP.WF.Template.PartParentSubGuide&MyPK=" + mypk;
OpenEasyUiDialogExt(url, '设置父流程', 800, 500, true);
}
function Save() {
//更新节点表单类型.
var flowNo = GetQueryString("FK_Flow");
var flow = new Entity("BP.WF.Flow", flowNo);
flow.StartGuideWay = StartGuideWay.ByParentFlowModel;
flow.StartGuidePara1 = $("#TB_StartGuidePara1").val();
flow.Update();
Reload();
//alert("保存成功.");
}
</script>
</head>
<body>
<div id="bar">
</div>
<fieldset>
<legend> 前置导航支持多个父流程启动。</legend>
<br />
<div id="Msg"></div>
<!--<input type="text" id="TB_StartGuidePara1" name="TB_StartGuidePara1" />-->
<!--<textarea id="TB_StartGuidePara1" name="TB_StartGuidePara1" rows="3" style="width: 98%;height: 51px"></textarea>-->
</fieldset>
<fieldset>
<legend id="help"></legend>
<ul>
<li>发起该流程之前,需要选择一个已经发起的流程实例作为父流程。</li>
<li>启动该流程的时候,需要启动 /WF/WorkOpt/StartGuideParentFlowModel.htm 的页面,让用户选择一个父流程。</li>
</ul>
<legend > 应用场景</legend>
<ul>
<li>在执行财务报销的时候,要选择一个出差申请父流程,并把申请信息带入到报销单里面。</li>
<li>在执行采购入库的时候,要选择一个采购申请单作为父流程。</li>
</ul>
</fieldset>
</body>
</html>