/// /// var Templet = { pageClick: function (pageIndex, pageSize) { var _query = "../BackHandler/BaseHandler.ashx?action=getLocationList"; pageSize = pageSize == undefined ? 10 : pageSize; var _paramter = {}; _paramter["PageIndex"] = pageIndex; _paramter["PageSize"] = pageSize; jqUtils.Ajax.post(_query, _paramter, function (data) { var Html = ""; if (data != undefined && data.PagedList.length > 0) { $(data.PagedList).each(function (i, item) { Html += ""; Html += ""; Html += "" + (i + 1) + ""; Html += "" + item.OrderID + ""; Html += "" + item.OrderDate + ""; Html += "" + item.ShipName + ""; Html += "" + item.ShipCity + ""; Html += "" + item.ShipRegion + ""; Html += "" + item.ShipPostalCode + ""; Html += "" + item.ShipCountry + ""; Html += ""; Html += "  "; Html += "  "; //if (item.IsForbid == 1) { // Html += ""; //} //else { Html += ""; // } Html += ""; Html += ""; }); } $("#tabInfo tbody").html(Html); $('#mypager').jqPaginator({ totalPages: data.TotalPageCount, visiblePages: 10, currentPage: pageIndex, activeClass: 'active', prev: '', next: '', page: '
  • {{page}}
  • ', last: '
  • 尾页
  • ', first: '
  • 首页
  • ', onPageChange: function (num, type) { if (type != 'init') Templet.pageClick(num, pageSize); } }); }); }, selectAll: function (item) { var flag = $(item).prop("checked"); $("input[name='user_item']").prop("checked", flag); }, ToExcel: function () { var _query = "../BackHandler/BaseHandler.ashx?action=exportLocationExcel"; jqUtils.Ajax.post(_query, null, function (result) { if (result.Type == 'Success') { if (result.Data != undefined && result.Data != "") { var path = unescape(result.Data); window.location.href = path; return true; } else { alert("导出EXCEL失败,请稍后重试!"); return true; } } }); return true; } };