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
5.0 KiB
Plaintext
125 lines
5.0 KiB
Plaintext
<!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="../../Comm/Style/CommStyle.css" rel="stylesheet" type="text/css" />
|
|
<link href="../../Comm/Style/Table0.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 type="text/javascript" src="../../Scripts/QueryString.js"></script>
|
|
<script src="../../Scripts/config.js" type="text/javascript"></script>
|
|
<script type="text/javascript" src="../../Comm/Gener.js"></script>
|
|
<script language="javascript" type="text/javascript" >
|
|
|
|
//页面启动函数.
|
|
$(function () {
|
|
|
|
$("#Msg").html("<img src=../../../Img/loading.gif /> 正在加载,请稍后......");
|
|
|
|
// InitPage();
|
|
|
|
$("#Msg").html("<h3>当前功能在重构过程中,敬请期待。</h3>");
|
|
|
|
});
|
|
|
|
function InitPage() {
|
|
|
|
var rptNo = unescape(GetQueryString("RptNo"));
|
|
var flowNo = unescape(GetQueryString("FK_Flow"));
|
|
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_RptDfine");
|
|
handler.AddPara("RptNo", rptNo);
|
|
handler.AddPara("FK_Flow", flowNo);
|
|
var data = handler.DoMethodReturnString("S5SearchCond_Init");
|
|
|
|
if (data.indexOf("@") == 0) {
|
|
alert(data);
|
|
return;
|
|
}
|
|
var jsData = JSON.parse(data);
|
|
|
|
var md = jsData["Main"][0]; //主表数据.
|
|
var Sys_MapAttr = jsData["Sys_MapAttr"]; //所有的列.
|
|
var Sys_MapAttrOfDate = jsData["Sys_MapAttrOfDate"]; //日期列表.
|
|
//关键字查询.
|
|
document.getElementById("CB_Key").checked = (md.AtPara.indexOf("@IsSearchKey=1@") != -1);
|
|
|
|
var js = md.AtPara.split("@");
|
|
var RptSearchKeys = null;
|
|
var DTSearchWay = null;
|
|
var DTSearchKey = null;
|
|
for (var i = 0; i < js.length; i++) {
|
|
if (js[i].indexOf("RptSearchKeys") != -1)
|
|
RptSearchKeys = js[i].replace("RptSearchKeys=", "")
|
|
if (js[i].indexOf("DTSearchWay") != -1)
|
|
DTSearchWay = js[i].replace("DTSearchWay=", "")
|
|
if (js[i].indexOf("DTSearchKey") != -1)
|
|
DTSearchKey = js[i].replace("DTSearchKey=", "")
|
|
}
|
|
//绑定外键字段.
|
|
for (var i = 0, length = Sys_MapAttr.length; i < length; i++) {
|
|
var attr = Sys_MapAttr[i],
|
|
flag = false;
|
|
|
|
if (attr.UIContralType != 1) {
|
|
continue;
|
|
}
|
|
if (RptSearchKeys) {
|
|
flag = (RptSearchKeys.indexOf("*" + attr.KeyOfEn + "*") != -1);
|
|
}
|
|
$("#FKeys").append("<input type='checkbox' " + (flag ? "checked = 'checked'" : "") + " id='" + attr.KeyOfEn + "' /><label for='" + attr.KeyOfEn + "' >" + attr.Name + "(" + attr.KeyOfEn + ")</label></br>");
|
|
}
|
|
|
|
$("#DDL_DTSearchWay").val(DTSearchWay);
|
|
|
|
//绑定日期下拉框.
|
|
if (Sys_MapAttrOfDate != null) {
|
|
GenerBindDDL("DDL_DTSearchKey", Sys_MapAttrOfDate, "KeyOfEn", "Name", DTSearchKey);
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
function Save() {
|
|
|
|
var FK_Flow = GetQueryString("FK_Flow"),
|
|
RptNo = GetQueryString("RptNo"),
|
|
IsSearchKey = document.getElementById("CB_Key").checked ? 1 : 0,
|
|
DTSearchWay = document.getElementById("DDL_DTSearchWay").value,
|
|
DTSearchKey = document.getElementById("DDL_DTSearchKey").value,
|
|
Fields = "";
|
|
|
|
var oChecks = document.getElementById("FKeys").getElementsByTagName("input");
|
|
for (var i = 0, len = oChecks.length; i < len; i++) {
|
|
var item = oChecks[i];
|
|
if (item.checked) {
|
|
Fields += "*" + item.id;
|
|
}
|
|
}
|
|
var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_RptDfine");
|
|
handler.AddPara("RptNo", RptNo);
|
|
handler.AddPara("FK_Flow", FK_Flow);
|
|
handler.AddPara("Fields", Fields);
|
|
handler.AddPara("IsSearchKey", IsSearchKey);
|
|
handler.AddPara("DTSearchWay", DTSearchWay);
|
|
handler.AddPara("DTSearchKey", DTSearchKey);
|
|
var data = handler.DoMethodReturnString("S5SearchCond_Save");
|
|
alert(data);
|
|
|
|
}
|
|
</script>
|
|
<base target="_self" />
|
|
</head>
|
|
<body class="easyui-layout">
|
|
|
|
|
|
<br />
|
|
|
|
<div id="Msg"></div>
|
|
|
|
</body>
|
|
</html>
|