sping mvc_jquery

 @RequestMapping(value = "/doQuery", method = RequestMethod.POST)
   public @ResponseBody Page<PsPdaTask>doQuery(Model model, Page<PsPdaTask> page,
           @RequestParam(value = "status", required = false, defaultValue = "3") int status,
           @RequestParam(value = "courierId", required = false, defaultValue = "0") int courierId,
           @RequestParam(value = "siteId", required = false, defaultValue = "0") int siteId) {
    try {
      logger.debug("query begin...");
    PsPdaTask dto=new PsPdaTask();
    dto.setStatus(status);
    dto.setCourierId(courierId);
    dto.setSiteId(siteId);
        page = psPdaTaskService.selectPsPdaTaskListForpickUpQuery(dto, page);
        
} catch (Exception e) {
logger.error("query error!", e);
}
       return page;
   }
function gotoPage(pageNum) {
var param = {};
param.siteId = $("#siteId").val();
param.status = $("#status").val();
param.courierId = $("#courierId").val();
param.currentPage = pageNum;
$('#currentPage').val(pageNum);
doQuery(param);
}
//查询请求
function doQuery(param) {
var contextPath = $("#contextPath").val();
jQuery.ajax({
type : "POST",
url : contextPath + "//transport/pickUpCompleteQuery/doQuery",
data : param,
success : function(data, textStatus, jqXHR) {
refreashDateHeader();
refreshDataTable(data.result);//刷新页面数据
$("#pageBarDiv").show();
PageBar.fillHtml("gotoPage", "pageBarDiv", data);//填充分页框
},
error : function(e) {
alert('Error: ' + e);
}
});
}

你可能感兴趣的:(mvc+jquery,spinrg)