<%@ page contentType="text/html;charset=utf-8"%>
|
<%@page import="com.yc.factory.FactoryBean"%>
|
<%@page import="com.yc.service.commons.GfieldIfc"%>
|
<%@page import="java.util.List"%>
|
<%@page import="java.util.Map"%>
|
<%
|
//@author hq
|
//2011-4-11
|
%>
|
<%
|
//得到URL
|
String URL = (request.getRequestURL() + "").replace(request
|
.getRequestURI(), "")
|
+ request.getContextPath();
|
int formId = -1;
|
String str_formId = request.getParameter("formId");
|
try{
|
formId = Integer.parseInt(str_formId);
|
}catch(Exception e){
|
return;
|
}
|
GfieldIfc gfieldIfc = (GfieldIfc)FactoryBean.getBean("GfieldImpl");
|
List<Map<String,Object>> list = gfieldIfc.getAllowQueryFields(formId);
|
Gson gson = new Gson();
|
String t = gson.toJson(list,new TypeToken<List<Map<String,Object>>>(){}.getType());
|
StringBuilder sb = new StringBuilder(t);
|
sb.insert(0,"{rows:");
|
sb.append("}");
|
%>
|
<!DOCTYPE HTML >
|
|
|
|
<%@page import="com.google.gson.Gson"%>
|
<%@page import="com.google.gson.reflect.TypeToken"%><html>
|
<head>
|
<base href="<%=URL%>">
|
<title>查询</title>
|
<meta http-equiv="pragma" content="no-cache">
|
<meta http-equiv="cache-control" content="no-cache">
|
<meta http-equiv="expires" content="0">
|
<link rel="stylesheet" type="text/css" href="/style/icon.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/icon.css")%>">
|
<link rel="stylesheet" type="text/css" href="/style/default/easyui.css?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/style/default/easyui.css")%>">
|
<script type="text/javascript" src="/js/jquery-1.4.4.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery-1.4.4.min.js")%>"></script>
|
<script type="text/javascript" src="/js/jquery.easyui.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery.easyui.min.js")%>"></script>
|
<script type="text/javascript" src="/js/locale/easyui-lang-zh_CN.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/locale/easyui-lang-zh_CN.js")%>"></script>
|
<script type="text/javascript" src="/js/query/query.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/query/query.js")%>"></script>
|
<script type="text/javascript">
|
var data = <%=sb.toString() %>;
|
</script>
|
<style type="text/css">
|
.queryField{width:150px;overflow: hidden;height: 20px;float: left;}
|
</style>
|
</head>
|
<body style="margin: 0px;padding:0px;">
|
<div class="easyui-tabs" border="true" style="width:497px;height:365px;">
|
<div id="generalQuery" title="简单查询" fit="true" border="true" style="padding:0px;">
|
<div style="margin-left:20px;margin-top:10px;width:450px;font-weight: bold;color: #666666;float: left;">
|
可查询字段:<br></br>
|
<%
|
Map<String,Object> temp = null;
|
for(int i=0;i<list.size();i++){
|
temp = list.get(i);
|
%>
|
<div class="queryField" field="<%=temp.get("fieldid") %>"><%=temp.get("fieldname") %></div>
|
<%} %>
|
</div>
|
<div style="margin-left:20px;width: 450px;height: 150px;">
|
<div> </div>
|
输入查询内容:<input id="queryValue" type="text" style="border: 1px solid #cccccc;width: 300px;"/><br></br>
|
<a iconCls="icon-ok" class="easyui-linkbutton" onclick="simpConfirm();">确 定</a>
|
<a iconCls="icon-cancel" class="easyui-linkbutton" onclick="winClose();">取 消</a>
|
</div>
|
</div>
|
<div id="advancedQuery" title="高级查询" style="padding:0px;">
|
<div id="query">
|
<table id="tt" style="width:495px;height:290px;border-bottom: 1px solid;" border="false" singleSelect="true" >
|
<thead>
|
<tr>
|
<th field="fieldid" width="80" hidde="true">ID</th>
|
<th field="cont" width="60" formatter="contFormatter" align=center editor="{type:'combobox',options:{valueField:'contid',textField:'text',data:cont,editable:false}}" >连接符</th>
|
<th field="fieldname" width="100" >字段名</th>
|
<th field="opt" formatter="opttFormatter" editor="{type:'combobox',options:{valueField:'opid',textField:'text',data:opts,editable:false,onChange:optSelect}}" width="80" >比较符</th>
|
<th field="opt2" formatter="opt2Formatter" width="10" align="center" ></th>
|
<th field="fieldvalue1" width="95" editor="{type:'text'}">字段值</th>
|
<th field="fieldvalue2" width="95" editor="{type:'text'}">字段值2</th>
|
</tr>
|
</thead>
|
</table>
|
<div style="100%;margin-left:20px;">
|
<br /><label for="more">更多选项</label><span style="position:fixed;margin-top:3px;"><input id="more" type="checkbox" /></span>
|
<a iconCls="icon-ok" class="easyui-linkbutton" onclick="confirm2();">确 定</a>
|
<a iconCls="icon-cancel" class="easyui-linkbutton" onclick="winClose();">取 消</a>
|
</div>
|
</div>
|
</div>
|
</div>
|
</body>
|
</html>
|