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.

212 lines
8.1 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="../../../Scripts/easyUI145/themes/icon.css" rel="stylesheet" type="text/css" />
<link href="../../../Scripts/easyUI145/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
<!-- 引用通用的js文件. -->
<script src="../../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../../../Scripts/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../../../Scripts/EasyUIUtility.js" type="text/javascript"></script>
<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("PopGroupList");
var html = "";
var mapExt = new Entity("BP.Sys.MapExt");
mapExt.MyPK = "PopGroupList_" + GetQueryString("FK_MapData") + "_" + GetQueryString("KeyOfEn");
var i = mapExt.RetrieveFromDBSources(); //从数据库来查询.
if (mapExt.GetPara("SelectType") == "")
mapExt.SetPara("SelectType", "1");
//批量为赋值.
GenerFullAllCtrlsVal(mapExt);
//设置按钮是否可以用?
if (i == 0) {
$("#Btn_Delete").hide();
$("#Btn_FullData").hide();
$("#Btn_Gener").hide();
}
});
function Save() {
//更新节点表单类型.
var frmID = GetQueryString("FK_MapData");
var keyOfEn = GetQueryString("KeyOfEn");
var en = new Entity("BP.Sys.MapAttr", frmID + "_" + keyOfEn);
en.SetPara("PopModel", "PopGroupList");
en.Update();
var mapExt = new Entity("BP.Sys.MapExt");
mapExt.MyPK = "PopGroupList_" + GetQueryString("FK_MapData") + "_" + GetQueryString("KeyOfEn");
var count = mapExt.RetrieveFromDBSources(); //从数据库来查询.
if (count == 0) {
mapExt.SetPara("OpenPopType", 0);
mapExt.SetPara("SelectType", 1);
} else {
if (mapExt.GetPara("OpenPopType") == undefined)
mapExt.SetPara("OpenPopType", 0);
if (mapExt.GetPara("SelectType") == undefined)
mapExt.SetPara("SelectType", 1);
}
mapExt.CopyURL(); //从url里面copy数据.
mapExt.CopyForm(); //从from里面copy数据.
mapExt.ExtType = "PopGroupList";
mapExt.AttrOfOper = GetQueryString("KeyOfEn");
var err = "";
if (mapExt.GetPara("Title") == "")
err += '\t\n必填字段[标题]不能为空';
if (err != "") {
alert(err);
return;
}
var val = mapExt.Save();
// alert(val);
Reload();
}
function Delete() {
if (confirm('您确定要删除吗?') == false)
return;
var mapExt = new Entity("BP.Sys.MapExt");
mapExt.MyPK = "PopGroupList_" + GetQueryString("FK_MapData") + "_" + GetQueryString("KeyOfEn");
mapExt.RetrieveFromDBSources(); //从数据库来查询.
mapExt.Delete();
Reload();
}
</script>
<style type="text/css">
.style1 {
height: 21px;
}
#bar {
text-align: left;
}
.cs-content-box {
padding: 0 5px;
}
.table a {
color: #1c60be
}
.table ul {
padding: 10px 0px;
}
.table li {
list-style-type: none;
line-height: 26px;
}
</style>
</head>
<body>
<div class="container-full">
<div id="bar">
</div>
<form id="cc">
<table id="Table1" class="table">
<tr>
<td colspan="3">
设置显示列数
</td>
<td>
<input id="TBPara_ShowCol" name="TBPara_ShowCol" value="2" />列
</td>
</tr>
<tr>
<td colspan="4">
<a href="javascript:ShowHidden('PopValSearchCond')">分组数据源</a>
<div id="PopValSearchCond" style="color: Gray; display: none">
<ul>
<li>设置一个可以返回json的数据源该数据源有No,Name,ParentNo三个约定的列. </li>
<li>SQL事例1: SELECT No,Name FROM Demo_BanJi</li>
<li>SQL事例2: SELECT No,Name FROM Port_Dept</li>
<li>Url事例: /DataUser/Handler.ashx?DoType=ReqDepts</li>
</ul>
</div>
</td>
</tr>
<tr>
<td colspan="4">
<textarea id="TB_Tag1" name="TB_Tag1" style="width: 98%; height: 23px;">
</textarea>
</td>
</tr>
<tr>
<td colspan="4">
<a href="javascript:ShowHidden('entity')">实体数据源</a>
<div id="entity" style="color: Gray; display: none">
<ul>
<li>设置一个可以返回json的数据源该数据源有No,Name, 关联外键列 三个约定的列. </li>
<li>比如:Url事例: /DataUser/Handler.ashx?DoType=Demo_Students</li>
<li>SQL事例: SELECT No,Name,FK_BanJi FROM Demo_Student</li>
<li>SQL事例: SELECT No,Name,FK_Dept FROM Port_Emp</li>
</ul>
</div>
</td>
</tr>
<tr>
<td colspan="4">
<textarea id="TB_Tag2" name="TB_Tag2" style="width: 98%; height: 23px;">
</textarea>
</td>
</tr>
<tr>
<td colspan="4">
<a href="javascript:ShowHidden('backFunction')">确定后执行的JS</a>
<div id="backFunction" style="color: Gray; display: none">
<ul>
<li>该选项可以为空,弹出框确定后执行的JS可以直接写方法名或者方法().</li>
</ul>
</div>
</td>
</tr>
<tr>
<td colspan="4">
<input type="text" id="TB_Tag5" name="TB_Tag5" style="width: 99%;" />
</td>
</tr>
</table>
<fieldset>
<legend id="help"></legend>
<ul>
<li><font color="red"> 返回的数据都要区分大小写并且所有的SQL ,都要按照顺序进行。</font> </li>
<li><font color="red"> 如果没有No,Name列您需要 xxx AS No, xxxx AS Name 的方式来书写表达式. </font> </li>
<li>
<a href="javascript:WinOpen('5.GroupList.png');"> <img id="help" alt="" src='5.GroupList.png' style="width:90%;" /></a>
</li>
</ul>
</fieldset>
</form>
</div>
</body>
</html>