Extjs Ajax 分页详解编程语言
2023-06-13 09:20:39 时间
proxy : new Ext.data.HttpProxy({
url : cxgl_cpye.app?dateTime= + new Date().getTime() + subTranCode=list
}),
reader : new Ext.data.JsonReader({
root : hstamcx,
totalProperty : "results",
fields : ["zfe_hz","khbh","bankacc","fundacc","xxsdm","dxjgdm",
"cpdm","tazh","tajyzh","tadm","hybh","zfe","lsdjfe",
"cqdjfe","zhtzfe","bddjfe","fhfs","yfhfs","fhbl",
"zrzfe","fejg","khlb","zjtzbz","bqsy","sybl","mrcb",
"ljsr","wfsy","wfsydj","dtsy","glfzkl","glfje",
"dqglf","glfrq","gxrq","apex1","apex2","apex3"]
})//,
//sortInfo : {
// field : cpdm,
// direction : DESC
//},
//groupField : cpdm
var colMArray = new Array();
colMArray = [{header : "产品代码", dataIndex : "cpdm", width : 100},
{header : "代销机构代码", dataIndex : "dxjgdm", width : 100},
//{header : "总份额汇总", dataIndex : "zfe_hz", width : 100},
{header : "总份额", dataIndex : "zfe", width : 100, align:"right"},
{header : "客户编号", dataIndex : "khbh", width : 100},
{header : "理财账号", dataIndex : "bankacc", width : 100},
{header : "客户资金账号", dataIndex : "fundacc", width : 100},
{header : "本行销售商代码", dataIndex : "xxsdm", width : 100},
{header : "TA账号", dataIndex : "tazh", width : 100},
{header : "TA交易账号", dataIndex : "tajyzh", width : 100},
{header : "TA代码", dataIndex : "tadm", width : 100},
{header : "合约编号", dataIndex : "hybh", width : 100},
{header : "临时冻结份额", dataIndex : "lsdjfe", width : 100, align:"right"},
{header : "长期冻结份额", dataIndex : "cqdjfe", width : 100, align:"right"},
{header : "组合投资份额", dataIndex : "zhtzfe", width : 100, align:"right"},
{header : "本地冻结份额", dataIndex : "bddjfe", width : 100, align:"right"},
{header : "当前分红方式", dataIndex : "fhfs", width : 100},
{header : "原分红方式", dataIndex : "yfhfs", width : 100},
{header : "红利比例(%)", dataIndex : "fhbl", width : 100},
{header : "昨日总份额", dataIndex : "zrzfe", width : 100, align:"right"},
{header : "份额所属机构", dataIndex : "fejg", width : 100},
{header : "客户类别", dataIndex : "khlb", width : 100},
{header : "追加投资标志", dataIndex : "zjtzbz", width : 100},
{header : "本期收益", dataIndex : "bqsy", width : 100, align:"right"},
{header : "收益客户比例(%)", dataIndex : "sybl", width : 100},
{header : "买入成本", dataIndex : "mrcb", width : 100, align:"right"},
{header : "累计收入", dataIndex : "ljsr", width : 100, align:"right"},
{header : "未付收益", dataIndex : "wfsy", width : 100, align:"right"},
{header : "冻结的未付收益", dataIndex : "wfsydj", width : 100, align:"right"},
{header : "当天新分配收益", dataIndex : "dtsy", width : 100, align:"right"},
{header : "管理费折扣率(%)", dataIndex : "glfzkl", width : 100},
{header : "管理费总额", dataIndex : "glfje", width : 100, align:"right"},
{header : "当前管理费", dataIndex : "dqglf", width : 100, align:"right"},
{header : "管理费计算日期", dataIndex : "glfrq", width : 100},
{header : "更新日期", dataIndex : "gxrq", width : 100}];
var colQd = new Ext.grid.ColumnModel(colMArray);
// GRID定义
var gridCpye = new Ext.grid.GridPanel({
id : cpye_grid,
title:[产品余额]查询,
height : 800,
stripeRows : true,
bodyStyle : width:100%,
disableSelection : true,
cm : colQd,
viewConfig : {
forceFit : false
store : storeCpye,
iconCls : details,
animCollapse : true,
trackMouseOver : false,
loadMask : {
msg : 正在加载[产品余额]信息,请稍侯……
//selModel : smQd,
selModel : new Ext.grid.RowSelectionModel({singleSelect:true}),
tbar : [-,new Ext.form.Label({
text : 产品代码:
}),new Ext.form.TextField({
id : cpdm,
name : cpdm,
width : 130
}),-,new Ext.form.Label({
text : 代销机构代码:
}), new Ext.form.TextField({
id : dxjgdm,
name : dxjgdm,
width : 130
}), -, {
pressed : true,
text : nbsp; nbsp;查 nbsp; nbsp; nbsp; nbsp;询 nbsp; nbsp; nbsp; nbsp;,
iconCls : yes,
handler : selinfo
},-,new Ext.Toolbar.Fill(),-,new Ext.form.Label({
text : 查询方式:
}),new Ext.form.Radio({
id:"cpdm_radio",
name : "select_method",
inputValue : "cpdm desc,dxjgdm desc",
checked : true,
boxLabel : " 产 品 nbsp; nbsp;"//,
//listeners : {
//check : radiochange
//}
}),
new Ext.form.Radio({
id:"dxjgdm_radio",
name : "select_method",
inputValue : "dxjgdm desc,cpdm desc",
boxLabel : "代销机构 nbsp; nbsp;"//,
//listeners : {
//check : radiochange
//}
}),-
bbar : new Ext.PagingToolbar({
pageSize : 20,
store : storeCpye,
displayInfo : true,
emptyMsg : 没有记录
});
CpyeDao cpyeDao = new CpyeDao(request, response); String sql = cpyeDao.select(cpdm,dxjgdm,order_by); List HashMap list1 = null; try { list1 = this.findSql(new String(sql.getBytes("iso8859-1"),"UTF-8")); } catch (UnsupportedEncodingException e) { e.printStackTrace();
//把list转化成Json // StringBuffer s = new StringBuffer("{results:"+list1.size()+",result:["); // for( int i=0;i list.size();i++){ // HashMap hm = list.get(i); // for(int j=0;j columns.length; j++){ // if(j==0) s.append("{"); // s.append(columns[j]+":/""+hm.get(columns[j].toUpperCase().toString()).toString()+"/""); // if(j 0 j (columns.length-1) ) s.append(","); // if(j==(columns.length-1)) s.append("}"); // } // } // s.append("]}"); // AjaxTools.exAjax("{results:"+list1.size()+",hstamcx:"+JsonTools.agentJdbcLstToJson(list,lpDict,gbismDict)+",/""+paramName+"/":/""+paramValue+"/"}",response); AjaxTools.exAjax("{results:"+list1.size()+",hstamcx:"+JsonTools.agentJdbcLstToJson(list,lpDict,gbismDict)+"}",response); }
CpyeDao cpyeDao = new CpyeDao(request, response); String sql = cpyeDao.select(cpdm,dxjgdm,order_by); List HashMap list1 = null; try { list1 = this.findSql(new String(sql.getBytes("iso8859-1"),"UTF-8")); } catch (UnsupportedEncodingException e) { e.printStackTrace();
//把list转化成Json // StringBuffer s = new StringBuffer("{results:"+list1.size()+",result:["); // for( int i=0;i list.size();i++){ // HashMap hm = list.get(i); // for(int j=0;j columns.length; j++){ // if(j==0) s.append("{"); // s.append(columns[j]+":/""+hm.get(columns[j].toUpperCase().toString()).toString()+"/""); // if(j 0 j (columns.length-1) ) s.append(","); // if(j==(columns.length-1)) s.append("}"); // } // } // s.append("]}"); // AjaxTools.exAjax("{results:"+list1.size()+",hstamcx:"+JsonTools.agentJdbcLstToJson(list,lpDict,gbismDict)+",/""+paramName+"/":/""+paramValue+"/"}",response); AjaxTools.exAjax("{results:"+list1.size()+",hstamcx:"+JsonTools.agentJdbcLstToJson(list,lpDict,gbismDict)+"}",response); }
public class AjaxTools { public static void exAjax(String ajaxString,HttpServletResponse response)throws HsException{ PrintWriter out = null; try{ response.setContentType("text/html;charset=utf-8"); response.setHeader("Cache-Control", "no-cache"); out=response.getWriter(); out.write(ajaxString); out.flush(); }catch(Exception e){ throw new HsException(HsErrorMsg.ERR_DEFAULT, "AJAX通讯出错!"+e.getMessage()); finally{ out.close(); }
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/13226.html
cjava相关文章
- 什么是Ajax以及ajax请求的步骤[通俗易懂]
- spring ajax 长轮询,Ajax轮询和长轮询
- AJAX技术之DWR框架详解编程语言
- 用原生JS对AJAX做简单封装详解编程语言
- 使用微软的标准方法实现Ajax详解编程语言
- 配合JAVA的AJAX使用详解编程语言
- Ajax.html:35 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org详解编程语言
- struts2实现ajax校验的2种方法详解编程语言
- JQuery中$.ajax()方法参数详解编程语言
- Ajax 的用法详解编程语言
- 关于AJAX详解编程语言
- 使用AJAX时候,你可能没有想过他的背景技术详解编程语言
- 通过AJAX来做推送与轮询方式的比较详解编程语言
- Ajax在使用过程中需要注意的事项详解编程语言
- $.ajax()方法详解编程语言
- jQuery与AJAX详解编程语言
- Python3.x:Selenium+PhantomJS爬取带Ajax、Js的网页详解编程语言
- Struts2与Ajax数据交互详解编程语言
- jquery ajax怎么使用jsonp跨域访问详解编程语言
- ajax下载文件的方法 php下载图片的方法详解编程语言
- php form表单ajax上传图片方法详解编程语言
- ajax异步加载查询数据库详解编程语言
- Ajax快速查询MySQL数据库(ajax查询mysql)
- Ajax与MySQL结合实现互联网数据交互的动力(ajax和mysql)
- php通过ajax实现双击table修改内容