日期:2014-05-16 浏览次数:20345 次
$(function(){
$('#datagrid').datagrid({
title:'冲正历史记录列表 ',//表格标题
iconCls:'icon-search',//表格图标
nowrap: true,//是否只显示一行,即文本过多是否省略部分。
striped: true,
url:'/account/Reversal_findAll.action', //action地址
sortName: 'reversalOrdId',
sortOrder: 'asc',
idField:'reversalOrdId',
loadMsg:'查询中,请稍等!',
fitColumns:false,
fit:true,
striped:true,//是否纹理化表
nowrap:false,//是否把文本显示在一行里
frozenColumns:[[
{field:'reversalOrdId',title:'冲正记录订单号',width:0,align:'center',sortable:true,hidden:true}
]
],
columns:[[
{checkbox:true},
{field:'businessOrdId',title:'业务订单号',width:180,align:'center',sortable:true},
{field:'memberNo',title:'冲正会员账号',width:150,align:'center',sortable:true},
{field:'reverseTime',title:'冲正时间',width:180,align:'center',sortable:true},
{field:'consumType',title:'业务类型ID',width:180,align:'center',sortable:true,hidden:true},
{field:'consumName',title:'业务类型',width:200,align:'center',sortable:true},
{field:'tradeAmount',title:'冲正金额(分)',width:180,align:'center',sortable:true},
{field:'reversalState',title:'冲正状态',width:180,align:'center',sortable:true,formatter:function(val,rec){
if(val=="1001"){return "成功"}else if(val=="1002"){return "失败"}else{return val}
}},
]],
toolbar:[
],
pagination:true, //包含分页
rownumbers:true,
singleSelect:true,
onLoadSuccess:function(data){
if(data.result=="error"){
$.messager.alert('提示信息',data.errorMsg,'error');
};
}
});
$(".datagrid-toolbar").append($("#searchbox"));
$('#datagrid').datagrid('getPager').pagination({
pageSize: 10,//每页显示的记录条数,默认为10
pageList: [10,20,30,50,100],//可以设置每页记录条数的列表
beforePageText: '第',//页数文本框前显示的汉字
afterPageText: '页 共 {pages} 页',
displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录'
});
$(".search_btn").click(function(){
if($('#backadd_fm').form('validate')){