|
|
|
|
<!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" 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/easyUI/jquery-1.8.0.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 src="../../../Scripts/config.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../../../Comm/Gener.js" type="text/javascript"></script>
|
|
|
|
|
<script src="SFTable.js" type="text/javascript"></script>
|
|
|
|
|
<base target="_self" />
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
.style1
|
|
|
|
|
{
|
|
|
|
|
width: 184px;
|
|
|
|
|
}
|
|
|
|
|
.style2
|
|
|
|
|
{
|
|
|
|
|
width: 284px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
function Save() {
|
|
|
|
|
|
|
|
|
|
var no = $("#TB_No").val() || "";
|
|
|
|
|
if (no == "") {
|
|
|
|
|
alert('请输入编号.');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var name = $("#TB_Name").val() || "";
|
|
|
|
|
if (name == "") {
|
|
|
|
|
alert('请输入名称.');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var en = new Entity("BP.Sys.SFTable");
|
|
|
|
|
en.CopyForm();
|
|
|
|
|
|
|
|
|
|
if (en.IsExits() == true) {
|
|
|
|
|
alert("编号已经存在[" + en.No + "]请使用其他的编号.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
en.SrcType = 6; //自定义数据表.
|
|
|
|
|
en.FK_Val = en.No;
|
|
|
|
|
en.Insert();
|
|
|
|
|
|
|
|
|
|
alert("保存成功.");
|
|
|
|
|
window.location.href = "Default.htm";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<form action="" id="cc">
|
|
|
|
|
<table style="width: 95%; margin: 5px; padding: 5px;">
|
|
|
|
|
<caption>
|
|
|
|
|
<a href="./Default.htm">返回</a> - JQuery外键
|
|
|
|
|
</caption>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>项目</th>
|
|
|
|
|
<th class="style2">值</th>
|
|
|
|
|
<th>备注</th>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td >方法名</td>
|
|
|
|
|
<td class="style2"><input type="text" id="TB_No" name="TB_No" /></td>
|
|
|
|
|
<td>方法英文名.</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td >方法描述</td>
|
|
|
|
|
<td class="style2"><input type="text" id="TB_Name" name="TB_Name" /></td>
|
|
|
|
|
<td>方法中文名</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<input type="button" value="保存" onclick="Save()" />
|
|
|
|
|
|
|
|
|
|
<font color=gray>
|
|
|
|
|
<fieldset>
|
|
|
|
|
<legend>帮助</legend>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>首先在 \DataUser\SFTable.js 文件里写一个函数, 该文件可以被流程开发人员重写.</li>
|
|
|
|
|
<li>该函数的格式要求,请参考SFTable.js 的头部文件.</li>
|
|
|
|
|
<li>该功能界面是把外部数据源的js方法注册到Sys_SFTable里.</li>
|
|
|
|
|
<li>方法名就是SFTable.js的函数名, 方法描述就填写一个中文描述. </li>
|
|
|
|
|
<li>比如有一个 function XCLX() 的函数,方法名为XCLX 方法描述为行程类型.</li>
|
|
|
|
|
<li>如果表单引用了该字段,该字段为下来框展示,但是他是外部数据源类型,在Sys_MapAttr里有两条记录分别为FiledName, FieldNameT .</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</font>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|