|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<title>新建流程向导</title>
|
|
|
|
|
<link href="../../../WF/Scripts/easyUI145/themes/color.css" rel="stylesheet" />
|
|
|
|
|
<link href="../../../WF/Scripts/easyUI145/themes/default/easyui.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
<script src="../../../WF/Scripts/jquery-1.11.0.min.js" type="text/javascript"></script>
|
|
|
|
|
<link href="../../../App/layuiadmin/layui/css/modules/layer/default/layer.css" rel="stylesheet" />
|
|
|
|
|
<script src="../../../App/layuiadmin/layui/lay/modules/layer.js"></script>
|
|
|
|
|
<script src="../../../WF/Scripts/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../../../WF/Scripts/QueryString.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../../../WF/Scripts/config.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../../../WF/Comm/Gener.js" type="text/javascript"></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
|
|
|
|
|
|
//类别.
|
|
|
|
|
var sorts = new Entities("BP.Cloud.Template.FlowSorts");
|
|
|
|
|
sorts.RetrieveAll();
|
|
|
|
|
|
|
|
|
|
GenerBindDDL("DDL_FlowSort", sorts);
|
|
|
|
|
|
|
|
|
|
//让它选择最后一个值.
|
|
|
|
|
var objS = document.getElementById("DDL_FlowSort");
|
|
|
|
|
////获取选择的下拉框
|
|
|
|
|
//var name = objS.options[objS.selectedIndex].value;
|
|
|
|
|
var length = objS.length;
|
|
|
|
|
alert(length);
|
|
|
|
|
//objS.se
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// alert("选中的下拉框中的值" + name);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
///创建类别.
|
|
|
|
|
function NewSort() {
|
|
|
|
|
|
|
|
|
|
var val = window.prompt('请输入类别名称', '流程类别1');
|
|
|
|
|
if (val == null || val == undefined)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
var webUser = new WebUser();
|
|
|
|
|
var en = new Entity("BP.Cloud.Template.FlowSort");
|
|
|
|
|
en.Name = val;
|
|
|
|
|
en.OrgNo = webUser.OrgNo;
|
|
|
|
|
en.Insert();
|
|
|
|
|
|
|
|
|
|
var url = "Default.htm?sortNo=" + en.No;
|
|
|
|
|
|
|
|
|
|
window.location.href = filterXSS(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//新建流程
|
|
|
|
|
function NewFlow() {
|
|
|
|
|
|
|
|
|
|
var index = layer.msg('正在创建流程请稍后.....', {
|
|
|
|
|
icon: 16,
|
|
|
|
|
shade: [0.3, '#000']
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var flowSort = $("#DDL_FlowSort").val();
|
|
|
|
|
var flowName = $("#TB_FlowName").val();
|
|
|
|
|
if (flowSort == null || flowSort == undefined || flowSort === "") {
|
|
|
|
|
alert("没有指定创建流程所在的分组");
|
|
|
|
|
layer.close(index);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (flowName === "") {
|
|
|
|
|
layer.alert("请填写流程名称");
|
|
|
|
|
layer.close(index);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//创建流程
|
|
|
|
|
var handler = new HttpHandler("BP.Cloud.HttpHandler.Admin_Portal");
|
|
|
|
|
handler.AddPara("FlowName", flowName);
|
|
|
|
|
handler.AddPara("FlowSort", flowSort);
|
|
|
|
|
handler.AddPara("FlowMark", "");
|
|
|
|
|
var data = handler.DoMethodReturnString("Default_NewFlow");
|
|
|
|
|
if (data.indexOf('err@') == 0) {
|
|
|
|
|
layer.alert(data);
|
|
|
|
|
console.log(data);
|
|
|
|
|
layer.close(index);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//在左侧流程树上增加新建的流程,并选中
|
|
|
|
|
var flowNo = data;
|
|
|
|
|
//window.parent.AppendFlowToFlowTree(flowSort, flowNo, flowName);
|
|
|
|
|
window.location.href = "../Designer.htm?FK_Flow=" + flowNo + "&RunModel=2";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//从ftp服务器导入模板
|
|
|
|
|
function ImpFlowFromFtp() {
|
|
|
|
|
var url = "../Template/Flow.htm?SortNo=" + GetQueryString("sort");
|
|
|
|
|
window.location.href = filterXSS(url);
|
|
|
|
|
}
|
|
|
|
|
//从本机导入模板
|
|
|
|
|
function ImpFlowFromLocal() {
|
|
|
|
|
var url = "../Template/Flow.htm?SortNo=" + GetQueryString("sort");
|
|
|
|
|
window.location.href = filterXSS(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
<!--<div style=" padding:10px; padding-left:30px;">
|
|
|
|
|
<button onclick="javascript:NewFlow()"><img src="../../../WF/Img/New.gif" style="width:20px;">新建流程</button>
|
|
|
|
|
<button onclick="javascript:ImpFlowFromFtp()"><img src="../../../WF/Img/ftp.png" style="width:20px;">从ftp服务器导入模板</button>
|
|
|
|
|
<button onclick="javascript:ImpFlowFromLocal()"><img src="../../../WF/Img/dot.png" style="width:20px;">从本机导入模板</button>
|
|
|
|
|
</div>-->
|
|
|
|
|
<form id="cc">
|
|
|
|
|
|
|
|
|
|
<h3>
|
|
|
|
|
<img src="../../../WF/Img/Home.gif"> <a href="../Flows.htm">流程目录</a> - 创建流程
|
|
|
|
|
<!--<a href="http://ccflow.org/ke.htm"><img src='../../../WF/Img/FileType/rmvb.gif' style="margin-left:20px" />教您做一个小流程</a>-->
|
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
<table style="width: 95%;margin-left:30px;" id="Table">
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width:500px;"><font color=red><b>*</b></font>名称:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input type="text" id="TB_FlowName" style="width:90%;" />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td nowarp="true" style="width:20%;">
|
|
|
|
|
描述:
|
|
|
|
|
</td>
|
|
|
|
|
<td colspan="1">
|
|
|
|
|
<textarea type="text" id="TB_FlowMark" rows="5" style="width:90%;">
|
|
|
|
|
</textarea>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td><font color=red><b>*</b></font>类别:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select id="DDL_FlowSort">
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<button onclick="NewSort();" id="Btn_New">新建类别</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<!--<tr>
|
|
|
|
|
<td>流程数据表:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input type="text" id="TB_PTable" style="width: 200px" />
|
|
|
|
|
</td>
|
|
|
|
|
<td> <font color="gray"><a href="http://ccbpm.mydoc.io/?v=5404&t=17897" target=_blank> <img src='../../../WF/Img/Help.png' /></a></font></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td nowarp="true" style="width:20%;">
|
|
|
|
|
流程标记:
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input type="text" id="TB_FlowMark" style="width: 200px" />
|
|
|
|
|
</td>
|
|
|
|
|
<td> <a href="http://ccbpm.mydoc.io/?v=5404&t=16847"><img src='../../../WF/Img/Help.png' /></a></td>
|
|
|
|
|
</tr>-->
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="Idx"></td>
|
|
|
|
|
<td colspan="1">
|
|
|
|
|
<input type="button" value="创建 - Create" onclick="NewFlow()" id="Btn_Save" />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|