Date.prototype.Format=function(a){var c={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};if(/(y+)/.test(a)){a=a.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))}for(var b in c){if(new RegExp("("+b+")").test(a)){a=a.replace(RegExp.$1,(RegExp.$1.length==1)?(c[b]):(("00"+c[b]).substr((""+c[b]).length)))}}return a};var checkedItems=[];var _objEmailGrid;$(function(){setCurPageGirdList();var a={key:"email"};_myPage.prototype.initDataOne(a);$("#overdueDays").numberbox().next("span").find("input").blur(function(b){initSetReturnDate()});_objEmailGrid=$("#loanReturnDataGridList");_objEmailGrid.datagrid({idField:"id",onCheck:function(c,b){addcheckItem()},onUncheck:function(c,b){removeSingleItem(c,b)},onCheckAll:function(b){addcheckItem()},onUncheckAll:function(b){removeAllItem(b)}})});function initSetReturnDate(){var a=parseInt(getValue("overdueDays"));if(a>0){var b=daysJian(a);setValue("export_end_returndate",b)}}function daysJian(a){var b=new Date();if(a>0){b.setDate(b.getDate()-a)}var c=b.Format("yyyyMMdd");return c}function setCurPageGirdList(){initSetReturnDate();var a=$(window).height();var b=a-160;$(".loanReturn-grid-div").css("height",b+"px");$("#loanReturnDataGridList").datagrid("resize")}function searcList(){var a=base_path+"hld/holding/listHoldingWithBibAndRdr.do";var b=getJsonDataByTypeHandler();deleteGridData("loanReturnDataGridList");b.rows=10;b.page=1;_objEmailGrid.datagrid({url:a,queryParams:b,onLoadSuccess:function(c){if(c.total==0){return openMessageDlg("未找到合适的记录")}},method:"post"})}var errorfile,errorcount,handlecount,successcount;function sendEmail(c){var d={};var a=getValue("email");if(!a){return openMessageDlg("请选择发送邮件箱!")}if(c==0){if(checkedItems.length>0){d["limit[0].condition"]="lib_holdings.id";d["limit[0].typeHandler"]="3";d["limit[0].value"]=checkedItems.toString()}else{return openMessageDlg("请至少选择一条记录,进行发送邮件!")}}else{d=getJsonDataByTypeHandler();if(!d["limit[0].condition"]){return openMessageDlg("请输入查询条件!")}}var b=base_path+"par/email/sendRechargeMail.do";d.email_id=a;onHnadlerSvaeBntScreen(null,true);$.post(b,d,function(e){onHnadlerSvaeBntScreen(null,false);var f=e.rows[0];if(f){$(".message-html").html(e.message);errorfile=f.errorfile;errorcount=f.errorcount;handlecount=f.handlecount;successcount=f.successcount;$(".handlecount").html("发送数["+handlecount+"]");$(".successcount").html("发送成功数["+successcount+"]");$(".errorcount").html("发送失败数["+errorcount+"]");$(".errorrows").html("错误日志记录条数["+f.errorfilerows+"]");errorfile=f.errorfile;if(errorcount>0){$("#checkerrorfile").show()}else{$("#checkerrorfile").hide()}$("#acceptFileResultDlg").dialog("open")}},"json")}function checkErrorFile(){if(errorfile){var c=base_path+"com/webuploader/download.do?filename="+errorfile;errorfile=undefined;var b=window.open(c)}else{openMessageDlg("无错误文件")}}function ischeckItem(){for(var a=0;a