1.首先引入 easyui的 css 和 js 文件
2.前台 需要写的js
[url=#]
var d = '<a href="#" onclick="auditBatch('+index+',0)">审核通过</a> | ';
var f = '<a href="#" onclick="auditBatch('+index+',1)">审核拒绝</a> ';
return e+d+f;
}}
]],
onLoadSuccess:function(data){
if (data.total == 0) {
}
},
pagination: true,
pageIndex:1,//页索引
pageSize:10,//页容量
pageList: [10,15,20]
})
}
2 后台
int currentPage = request.getParameter("pageIndex") == null ? 1 : Integer.parseInt(request.getParameter("pageIndex"));
// 每页行数
int showCount = request.getParameter("pageSize") == null ? 10 : Integer.parseInt(request.getParameter("pageSize"));
// 分页实体
String obj = request.getParameter("obj");
if (StringUtils.notBlank(obj)) {
fundRetreatVoucher = JsonUtils.toObject(obj, FundRetreatVoucherParam.class); //表单序列化json对象转为实体
}
out = response.getWriter();
List<FundRetreatVoucher> frvs = fundRetreatVoucherService.findAllFundRetreatVoucher(page, fundRetreatVoucher);
int total = fundRetreatVoucherService.findAllFundRetreatVoucher(getTotal(), fundRetreatVoucher).size();//数据大小
JSONObject json = new JSONObject();
json.put("list", frvs);//数据,这里的put的key ,一定要为list,如果改了 需要把 BingData中的 数据改一下
json.put("size", total);
out.print(json);