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.

125 lines
4.6 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" 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="../../../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>
<script src="../../Admin.js"></script>
<script type="text/javascript">
var extType = "";
$(function () {
extType = GetQueryString("ExtType");
extType = extType == null || extType == undefined ? "" : extType;
InitBar("DDLs");
var html = "";
//查询出来数据.
//更新节点表单类型.
var frmID = GetQueryString("FK_MapData");
var refPK = GetQueryString("RefPK");
var keyOfEn = GetQueryString("KeyOfEn");
var thisPK = refPK + "_FullData";
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_FoolFormDesigner_MapExt");
handler.AddPara("FK_MapData", frmID);
handler.AddPara("KeyOfEn", keyOfEn);
handler.AddPara("MyPK", thisPK);
var data = handler.DoMethodReturnString("TBFullCtrlDDL_Init");
if (data.indexOf('err@') == 0) {
alert(data);
return;
}
data = JSON.parse(data);
mapdtls = data;
if (data.length == 0) {
$("#doc").html("<h3>没有要填充的下拉框字段.</h3>");
return;
}
var html = "<table style='width:99%;'>";
for (var i = 0; i < data.length; i++) {
var mapAttr = data[i];
if (data[i].KeyOfEn == keyOfEn)
continue;
html += "<tr>";
html += "<th>下拉框:" + mapAttr.KeyOfEn + " - " + mapAttr.Name;
html += "</tr>";
html += "<tr>";
html += "<td>";
html += '<textarea rows=4 name=TB_' + mapAttr.KeyOfEn + ' name=TB_' + mapAttr.KeyOfEn + ' style="width:98%;" > ' + mapAttr.DefVal + '</textarea>';
html += "</td>";
html += "</tr>";
}
$("#doc").html(html);
return;
});
function Save() {
var str = "";
var frmID = GetQueryString("FK_MapData");
var refPK = GetQueryString("RefPK");
var thisPK = refPK + "_FullData";
// var mapExt = new Entity("BP.Sys.MapExt", thisPK);
// var mapAtrr = new Entity("BP.Sys.MapAttr", frmID);
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_FoolFormDesigner_MapExt");
handler.AddPara("FK_MapData", GetQueryString("FK_MapData"));
handler.AddPara("Tag", str);
handler.AddPara("MyPK", thisPK);
handler.AddPara("AttrOfOper", GetQueryString("KeyOfEn"));
handler.AddFormData();
var data = handler.DoMethodReturnString("TBFullCtrlDDL_Save");
if (data.indexOf('err@') != -1) {
alert(data);
return;
}
Reload();
}
</script>
</head>
<body>
<form id="cc">
<div id="bar">
</div>
<div id="doc">
</div>
<fieldset>
<legend>帮助.</legend>
<ul>
<li>填充下拉框的SQL, </li>
<li>返回一个数据源用来填充下拉框该行里必须有No,Name两个字段 No就是下拉框的值Name就是下拉框的标签.</li>
<li>
实例(选择的人员的岗位下拉框)
<font color="green">
SELECT B.FK_Station AS No, A.Name FROM Port_Station A, Port_DeptEmpStation B
WHERE B.FK_Emp='@Key' AND B.Station=A.No
</font>
</li>
<li>@Key 系统约定的选择的编号.</li>
</ul>
</fieldset>
</form>
</body>
</html>