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.
143 lines
4.7 KiB
Plaintext
143 lines
4.7 KiB
Plaintext
11 months ago
|
<!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="../../DataUser/Style/ccbpm.css" rel="Stylesheet" />
|
||
|
<script type="text/javascript" src="../Scripts/QueryString.js"></script>
|
||
|
<script type="text/javascript" src="../Scripts/jquery-1.7.2.min.js"></script>
|
||
|
<!-- 导入配置文件. -->
|
||
|
<script type="text/javascript" src="../Scripts/config.js"></script>
|
||
|
<script src="../Comm/Gener.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
$(function () {
|
||
|
|
||
|
$('Msg').val('正在加载请稍候....');
|
||
|
|
||
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt");
|
||
|
handler.AddUrlData();
|
||
|
var data = handler.DoMethodReturnString("DBTemplate_Init");
|
||
|
|
||
|
if (data.indexOf('err@') == 0) {
|
||
|
document.getElementById("Msg").innerHTML = data;
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
data = JSON.parse(data);
|
||
|
var dbTemplate = data['DBTemplate'];
|
||
|
var history = data['History'];
|
||
|
|
||
|
var idx = 0;
|
||
|
var html = "<table style='width:90%;'>";
|
||
|
html += "<tr>";
|
||
|
html += "<th colspan=3 >模版数据</th>";
|
||
|
html += "</tr>";
|
||
|
|
||
|
if (dbTemplate.length == 0) {
|
||
|
html += "<tr>";
|
||
|
html += "<td colspan=3>无</th>";
|
||
|
html += "</tr>";
|
||
|
}
|
||
|
|
||
|
for (var i = 0; i < dbTemplate.length; i++) {
|
||
|
var en = dbTemplate[i];
|
||
|
html += "<tr>";
|
||
|
html += "<td>" + i + "</td>";
|
||
|
html += "<td><a href=\"javascript:Start('" + en.WorkID + "');\" >" + en.Title + "</td>";
|
||
|
html += "<td><a href=\"javascript:DBTemplate_DeleteDBTemplate('" + en.WorkID + "');\" >删除</a></td>";
|
||
|
html += "</tr>";
|
||
|
}
|
||
|
|
||
|
|
||
|
html += "<tr>";
|
||
|
html += "<th colspan=3 >历史数据</th>";
|
||
|
html += "</tr>";
|
||
|
|
||
|
if (history.length == 0) {
|
||
|
html += "<tr>";
|
||
|
html += "<td colspan=3>无</th>";
|
||
|
html += "</tr>";
|
||
|
}
|
||
|
|
||
|
for (var i = 0; i < history.length; i++) {
|
||
|
var en = history[i];
|
||
|
html += "<tr>";
|
||
|
html += "<td>" + i + "</td>";
|
||
|
html += "<td><a href=\"javascript:Start('" + en.WorkID + "');\" >" + en.Title + "</td>";
|
||
|
html += "<td><a href=\"javascript:AddToTemplate('" + en.WorkID + "','" + en.Title + "');\" >设置模版</a></td>";
|
||
|
html += "</tr>";
|
||
|
}
|
||
|
html += "<table>";
|
||
|
document.getElementById("Msg").innerHTML = html;
|
||
|
|
||
|
|
||
|
//$('Msg').val('');
|
||
|
//document.getElementById("Msg").innerHTML = html;
|
||
|
});
|
||
|
|
||
|
function Start(workid) {
|
||
|
|
||
|
if (window.confirm('您确定要以次模版发起流程吗?') == false)
|
||
|
return;
|
||
|
var url = '../MyFlow.htm?FK_Flow=' + GetQueryString('FK_Flow') + '&CopyFormWorkID=' + workid + '&CopyFormNode=' + GetQueryString('FK_Flow') + '01&IsDeleteDraft=1';
|
||
|
|
||
|
window.parent.location.href = url;
|
||
|
window.close();
|
||
|
}
|
||
|
|
||
|
function DBTemplate_DeleteDBTemplate(workid) {
|
||
|
|
||
|
if (window.confirm('您确定要删除吗?') == false)
|
||
|
return;
|
||
|
|
||
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt");
|
||
|
handler.AddPara("WorkID", workid);
|
||
|
var data = handler.DoMethodReturnString("DBTemplate_DeleteDBTemplate");
|
||
|
|
||
|
if (data.indexOf('err@') == 0) {
|
||
|
alert(data);
|
||
|
return;
|
||
|
}
|
||
|
alert(data);
|
||
|
Reload();
|
||
|
}
|
||
|
|
||
|
function AddToTemplate(workid, title) {
|
||
|
|
||
|
var name = promptGener('请输入模版名称', title);
|
||
|
if (name == null || name == '')
|
||
|
return;
|
||
|
|
||
|
name = encodeURI(name);
|
||
|
|
||
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_WorkOpt");
|
||
|
handler.AddPara("WorkID", workid);
|
||
|
handler.AddPara("Title", name);
|
||
|
var data = handler.DoMethodReturnString("DBTemplate_SaveAsDBTemplate");
|
||
|
|
||
|
if (data.indexOf('err@') == 0) {
|
||
|
alert(data);
|
||
|
return;
|
||
|
}
|
||
|
alert(data);
|
||
|
Reload();
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
<style type="text/css">
|
||
|
#tb_msg {
|
||
|
height: 72px;
|
||
|
width: 272px;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<center>
|
||
|
<div id="Msg">
|
||
|
<img src='../Img/loading.gif' />正在加载请稍候...
|
||
|
</div>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|