var currActName;function setLayout(){var height=$(this).height();var adjustHeight=0;if(isIE8){adjustHeight=5};var toolBar_height=$("#toolBar").outerHeight();var noteBar_height=0;var $noteBar=$("#noteBar");if($noteBar.length>0){noteBar_height=$("#noteBar").outerHeight()};var searchBar_height=$("#searchBar").outerHeight();var pageNavBar_height=$("#pagerBar").outerHeight();var dataBar_height=height-toolBar_height-noteBar_height-searchBar_height-pageNavBar_height-adjustHeight;$("#dataBar").height(dataBar_height)};function initLoadData(){var currPageObj=document.getElementById("hfCurrPage");var currPageValue=currPageObj.value;if(currPageValue==""||currPageValue=="0"){currPageValue="1"};pageTo(currPageValue)};function receiveServerResult(result){if(currActName=="PageTo"){var resultContainerObj=null;resultContainerObj=$("#dataBar")[0];resultContainerObj.innerHTML=result;var $divPagerInfo=$("#divPagerInfo");$("#pagerBar").html($divPagerInfo.html());$divPagerInfo.html("");JTongSuperListTable_init(JTongSuperListTable_HTableColWidthArray);setLayout()}else{showActResult(result)}};function pageTo(pageIndex){loadData(pageIndex)};function loadData(pageIndex){document.getElementById("hfCurrPage").value=pageIndex;var dataBarObj=document.getElementById("dataBar");var arg="";dataBarObj.innerHTML="<div style='padding:10px;text-align:right;'>正在加载...</div>";callServer("PageTo",arg,pageIndex)};function getCheckedItems(){var ids="";var idArray=document.getElementsByName("ckb_dataItem");if(idArray.length<=0){return""};for(var i=0;i<idArray.length;i++){var chkBoxObj=idArray[i];if(chkBoxObj.checked){ids+=","+chkBoxObj.value}};if(ids==""){return""};if(ids.length>0&&ids.charAt(0)==","){ids=ids.substring(1,ids.length)};return ids};function checkSelect(){var ids=getCheckedItems();if(ids==""){return false};var idArray=ids.split(',');if(idArray.length==0){return false};return true};function batchllyAct(obj){var ids="";var idArray=document.getElementsByName("ckb_dataItem");if(idArray.length<=0){$.messager.alert('提示','没有可供选择的项！','error');return false};for(var i=0;i<idArray.length;i++){var chkBoxObj=idArray[i];if(chkBoxObj.checked){ids+=","+chkBoxObj.value}};if(ids==""){$.messager.alert('提示','请选择要操作的记录！','error');return false};if(obj.alertMsg!=""){$.messager.confirm('确认对话框',obj.alertMsg,function(r){if(r){if(ids.length>0&&ids.charAt(0)==","){ids=ids.substring(1,ids.length)};var arg=ids+"$"+obj.customArg;callServer(obj.actName,arg,obj.pageIndex);}})};return false};function BatchllyActObj(actName,alertMsg,pageIndex,customArg){this.actName=actName;this.alertMsg=alertMsg;this.pageIndex=pageIndex;this.customArg=customArg};function pageGoTo(){var pageIndex=document.getElementById("pageGoToValue").value;var pageCount=document.getElementById("hidden_pageCnt").value;if(pageIndex==null||pageIndex==""){alert('请输入要转到的页码!');return};for(var i=0;i<pageIndex.length;i++){var theChar=pageIndex.charAt(i);if(theChar<'0'||theChar>'9'){alert('请输入正确的页码!');break}else{if(parseInt(pageIndex)>parseInt(pageCount)){pageIndex=pageCount}else if(parseInt(pageIndex)<=0){pageIndex=1};pageTo(pageIndex)}}}