2018-06-03 22:26:41 +08:00

65 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@page import="com.amarsoft.asquery.*"%>
<%@ page contentType="text/html; charset=GBK"%><%@
include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Content: 对查询条件进行处理,并且显示数据窗口
*/
//获得组件参数 传入要执行的sql语句、查询类型
String sSelectedCol = CurPage.getParameter("SelectedCol");
String sColName = CurPage.getParameter("ColName");
String sSelectCol="";
ASQuery xquery = (ASQuery)session.getAttribute("AdvanceXQuery");
String as1 = xquery.getCodeItemDefinition(sColName);
String as2[][] = {
{ "ColumnName", sColName, "" },
{ "RelatedDataObjectName", "", "" },
{ "EnvironmentUserID", CurUser.getUserID(), "" } ,
{ "EnvironmentOrgID", CurUser.getOrgID(), "" } ,
{ "QueryClass", xquery.queryClass, "" },
{ "EnvironmentSortNo", CurOrg.getSortNo(), "" },
{ "EnvironmentCorpID", CurOrg.getCorpOrgID(), "" }
};
String s = xquery.getStringWithParameterReplaced(as1, as2);
String[] sCodeTableArray = StringX.parseArray(s);
String codeTableType = sCodeTableArray[0];
String codeTableSource = sCodeTableArray[1];
String sql = "";
String[] sqlArray = null;
if("datasource".equals(codeTableType)){
sqlArray = codeTableSource.split(",");
String zd = "";
for(int i=1;i<sqlArray.length-1;i++){
zd += sqlArray[i]+",";
}
sql = "select "+zd.substring(0,zd.length()-1) +" from "+sqlArray[0] +" where "+sqlArray[sqlArray.length-1];
}else{
//throw Exception("参数错误!");
}
ASObjectModel doTemp = new ASObjectModel();
doTemp.initQuery(sqlArray[0], sql);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.setPageSize(20);
dwTemp.Style="1"; //设置为Grid风格
dwTemp.ReadOnly = "1";//只读模式
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = {
{"true","","Button","确定","确定","sure()","","","","btn_icon_detail",""},
{"true","","Button","关闭","关闭","closeWindow()","","","","btn_icon_close",""},
};
%><%@ include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
/*~[Describe=查看客户详情;]~*/
function closeWindow(){
parent.AsDialog.ClosePage();
}
function sure(){
var text = getItemValueByIndex(0,getRow(),0)+"@"+getItemValueByIndex(0,getRow(),1);
parent.AsDialog.ClosePage(text);
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>