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.5 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!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>
<script type="text/javascript" src="../../../Scripts/bootstrap/js/jquery.min.js"></script>
<script src="../../../Scripts/QueryString.js" type="text/javascript"></script>
<link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
<!-- 引用通用的js文件. -->
<script type="text/javascript" src="../../../Scripts/config.js"></script>
<script type="text/javascript" src="../../../Comm/Gener.js"></script>
<script src="DDLBar.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
//页面启动函数.
$(function () {
InitBar("Simple");
var html = "";
var mapExt = new Entity("BP.Sys.MapExt");
mapExt.MyPK = "TBFullCtrl_" + GetQueryString("FK_MapData") + "_" + GetQueryString("KeyOfEn") ;
var i = mapExt.RetrieveFromDBSources(); //从数据库来查询.
//批量为复制.
GenerFullAllCtrlsVal(mapExt);
//去掉 ' 号。
var tag = mapExt.Doc;
while (tag.indexOf('~') > 1) {
tag = tag.replace("~", "'");
}
//按照文本计算.
$("#TB_Doc").val(tag);
//设置按钮是否可以用?
if (i == 0) {
$("#Btn_FullData").attr("disabled", true);
} else {
$("#Btn_FullData").removeAttr("disabled");
}
});
function Save() {
//更新节点表单类型.
var frmID = GetQueryString("FK_MapData");
var keyOfEn = GetQueryString("KeyOfEn");
var en = new Entity("BP.Sys.MapAttr", frmID + "_" + keyOfEn);
en.SetPara("TBFullCtrl", "Simple");
en.Update();
var mapExt = new Entity("BP.Sys.MapExt");
mapExt.MyPK = "TBFullCtrl_" + GetQueryString("FK_MapData") + "_" + GetQueryString("KeyOfEn");
var n = mapExt.RetrieveFromDBSources(); //从数据库来查询.
mapExt.CopyURL(); //从url里面copy数据.
mapExt.CopyForm(); //从from里面copy数据.
mapExt.ExtType = "TBFullCtrl";
mapExt.AttrOfOper = GetQueryString("KeyOfEn");
mapExt.FK_MapData = GetQueryString("FK_MapData");
var sql = $("#TB_Doc").val();
mapExt.Doc = sql; //设置主表的SQL.
if (mapExt.Update() == 0)
mapExt.Insert();
Reload();
}
</script>
<style type="text/css">
.style1
{
height: 21px;
}
</style>
</head>
<body>
<div id="bar">
</div>
<form id="cc">
<table id="table" style="width: 100%;">
<caption>
为文本框填充其它控件</caption>
<tr>
<td>
数据源类型
</td>
<td>
<select id="DDL_DBType" name="DDL_DBType" onchange="changeDoc(this)">
<option value="0">执行SQL</option>
<option value="1">执行url返回JSON</option>
<option value="2">执行CCFromRef.js返回JSON</option>
</select>
</td>
</tr>
<tr>
<th colspan="2">
数据源 <a href="javascript:ShowHidden('sqlexp')">帮助: </a>
</th>
</tr>
<tr>
<td colspan="2">
<div id='sqlexp' style='color: Gray; display: none'>
<ul>
<li>填充SQL帮助:</li>
<li>1. 设置一个查询的SQL语句该SQL必须包含 No, Name 列, 用与展示快速补全的部分。</li>
<li>2. 该SQL必须包含 @Key 关键字,@Key 输入文本框的值. </li>
<li>3. SQL返回的列与其他字段名称保持一致就可以完成控件数据的自动填充。</li>
<li>4. 比如:SELECT No,Name FROM WF_Emp WHERE No LIKE '@Key%' </li>
</div>
</td>
</tr>
<tr>
<td colspan="2" style="width: 100%;">
<textarea rows="4" name="TB_Doc" id="TB_Doc" style="width: 98%;"> </textarea>
</td>
</tr>
</table>
</form>
</body>
</html>