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.
255 lines
10 KiB
Plaintext
255 lines
10 KiB
Plaintext
|
|
<!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>
|
|
<script src="../layuiadmin/layui/lay/modules/layer.js" type="text/javascript"></script>
|
|
<link href="../layuiadmin/layui/css/modules/layer/default/layer.css" rel="stylesheet" />
|
|
<link href="../layuiadmin/layui/css/layui.css" rel="stylesheet" />
|
|
<script src="/WF/Scripts/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
|
<script src="/WF/Scripts/xss.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>
|
|
<style>
|
|
body, html {
|
|
font-family: "SimHei";
|
|
height: 95%
|
|
}
|
|
|
|
table {
|
|
border: 0px;
|
|
}
|
|
|
|
.layui-form input[type=checkbox], .layui-form input[type=radio], .layui-form select {
|
|
display: inline-block;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
var height = $(".layui-card-body").height();
|
|
//类别.
|
|
var sorts = new Entities("BP.Cloud.Template.FlowSorts");
|
|
sorts.RetrieveAll();
|
|
GenerBindDDL("DDL_FlowSort", sorts);
|
|
|
|
$("#DDL_FlowSort option:last").prop("selected", 'selected');
|
|
|
|
var img = GetQueryString("FileName");
|
|
var sortName = GetQueryString("SortName");
|
|
|
|
var name = img.substring(img.indexOf('/'));
|
|
name = name.replace('.png', '');
|
|
name = name.replace('Icon', '');
|
|
name = name.replace('/', '');
|
|
$("#TB_FlowName").val(name);
|
|
|
|
var url = "./AppTemplate/" + GetQueryString("SortName") + "/" + GetQueryString("FileName");
|
|
|
|
var html = "<img onclick='OpenIt()' style='width:600px;' src='" + url + "' />";
|
|
|
|
$("#divImg").html(html);
|
|
$(".layui-card-body").height(height + 240);
|
|
|
|
});
|
|
|
|
function OpenIt() {
|
|
var img = GetQueryString("Path");
|
|
img = img.replace('Icon', '');
|
|
var url = "./AppTemplate/" + img;
|
|
window.open(url);
|
|
}
|
|
|
|
///创建类别.
|
|
function NewSort() {
|
|
var val = promptGener('请输入类别名称', '');
|
|
if (val === "") return;
|
|
if (val == "") return;
|
|
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 ens = new Entities("BP.Cloud.Template.FlowSorts");
|
|
ens.RetrieveAll();
|
|
//获得最后一个en. en = ens[ens.length - 1];
|
|
//构造一个Option var option = $("<option />");
|
|
option.html(en.Name);
|
|
option.val(en.No);
|
|
$("#DDL_FlowSort").append(option);
|
|
//把他放入到最后. $("#DDL_FlowSort option:last").prop("selected", 'selected');
|
|
}
|
|
|
|
//新建流程
|
|
function NewFlow() {
|
|
var flowSort = $("#DDL_FlowSort").val();
|
|
var flowType = $("#DDL_FlowType").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 index = layer.msg('正在安装模版,请稍候.....', {
|
|
icon: 16,
|
|
shade: [0.3, '#000']
|
|
});
|
|
|
|
//创建流程
|
|
var handler = new HttpHandler("BP.Cloud.HttpHandler.App_FlowDesigner");
|
|
handler.AddPara("FlowName", flowName);
|
|
handler.AddPara("FlowSort", flowSort);
|
|
handler.AddPara("FlowType", flowType);
|
|
|
|
handler.AddPara("FileName", GetQueryString('FileName'));
|
|
handler.AddPara("SortName", GetQueryString('SortName'));
|
|
|
|
var data = handler.DoMethodReturnString("NewFlowByTemplate_Save");
|
|
|
|
if (data.indexOf('err@') == 0) {
|
|
layer.alert(data);
|
|
console.log(data);
|
|
layer.close(index);
|
|
return;
|
|
}
|
|
|
|
//在左侧流程树上增加新建的流程, 并选中.
|
|
var flowNo = data;
|
|
|
|
var url = "/App/FlowDesigner/Designer.htm?FK_Flow=" + flowNo + "&RunModel=2";
|
|
|
|
OpenWindowRight(url, '设计:' + flowName);
|
|
//关闭当前Tab页
|
|
top.layui.element.tabDelete("layadmin-layout-tabs", '/App/FlowDesigner/NewFlowByTemplate.htm?FileName=' + GetQueryString("FileName") + '&SortName=' + GetQueryString("SortName"));
|
|
}
|
|
|
|
//已知URL, 在右侧打开页面
|
|
function OpenWindowRight(url, title) {
|
|
if (top.layui.index) {
|
|
parent.layui.index.openTabsPage(url, title);
|
|
//关闭当前Tab页 top.layui.element.tabDelete("layadmin-layout-tabs", "/App/FlowDesigner/NewFlowByTemplate.htm?FileName=" + GetQueryString("FileName") + "&SortName=" + GetQueryString("SortName"));
|
|
}
|
|
|
|
else {
|
|
window.open(url)
|
|
}
|
|
|
|
}
|
|
|
|
|
|
//从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);
|
|
}
|
|
|
|
function ToTemplateDir() {
|
|
var url = "Flows.htm?EnsName=BP.Cloud.Template.FlowExts";
|
|
window.location.href = filterXSS(url);
|
|
}
|
|
|
|
function ToShareDir() {
|
|
var url = "Template.htm?EnsName=BP.Cloud.Template.FlowExts";
|
|
window.location.href = filterXSS(url);
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body style="overflow:hidden">
|
|
<!-- <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" style="height:100%" >
|
|
<!-- <h3 >
|
|
<a href="Flows.htm" >
|
|
<img src="/App/Img/Home.png" style="width:30px;" / > 模版台账:
|
|
</a >
|
|
<a href="Flows.htm" >
|
|
<img src="/App/Img/Share.png" style="width:30px;" / > 共享模版:
|
|
</a >
|
|
<img src="/WF/Img/Btn/New.gif" style="width:30px;" / > 创建模版
|
|
</h3 >-->
|
|
<!-- <h3 > <img src="/WF/Img/Btn/New.gif" style="width:30px;" / > 创建模版 </h3 >-->
|
|
<div class="layui-card" style="margin: 30px 30px;height:100%">
|
|
<div class="layui-card-body" style="overflow-y:auto">
|
|
<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_FlowType" >
|
|
<option value="0" > 业务流程: 具有固定的审批路线, 需要设计流程后才可以使用.</option >
|
|
<option value="1" > 表单: 增、删、改、查,统计分析台账类,支持自由审批, 类似于钉钉微信的简单审批.</option >
|
|
</select >
|
|
</td >
|
|
</tr >-->
|
|
<tr>
|
|
<td> <font color=red> <b> *</b> </font> 类别:</td>
|
|
<td>
|
|
<select id="DDL_FlowSort">
|
|
</select>
|
|
<a href="javascript:NewSort();" id="Btn_NewSort"> 新建类别</a>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="Idx"> </td>
|
|
<td colspan="1">
|
|
|
|
<button onclick="NewFlow()" id="Btn_Save">
|
|
<img style="border:0px;" src="/Imgs/Install.png" />
|
|
安装 - Install
|
|
</button>
|
|
<!-- <input type="button" value="安装 - Install" onclick="NewFlow()" id="Btn_Save" / >-->
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" style="text-align:center;">
|
|
<div id="divImg"> </div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</form >
|
|
|
|
</body >
|
|
</html >
|