'+m[d].name+":"+c+""}else{if(m[d].code=="expectdate"||m[d].code=="actualdate"){c=fmtStringToDate(c)}}l+=m[d].name+":"+c+"\n"}var b=getColorBysStatus(n[e].status);var a=n[e].id;var h="cur"+e;if(k){h+=" day-detail";g="";g+='期:'+(n[e].issue!=null?n[e].issue:"");+"
";g+='册:'+(n[e].issue!=null?n[e].copies:"");+"
"}f+='";return f}function getColorBysStatus(a){var c="";var d=[{code:"0",color:"cell-weidao"},{code:"1",color:"cell-zhengchang"},{code:"2",color:"cell-weidaoqi"},{code:"3",color:"cell-cuique"},{code:"4",color:"cell-zhuangding"},{code:"5",color:"cell-tingding"},{code:"6",color:"cell-yanqi"},{code:"9",color:"cell-qita"},];for(var b=0;b1){return openMessageDlg("您只能选中一个记到格,进行操作!")}var h=c.bibid;var i="";var a=0;if(c.id){a=c.id}var e=c.checkid;var f=c.sortfld;if(c.flag){i=c.flag}var k=$("#checkDataGridList").datagrid("getSelected");var b=k.copies;if($(".percheckdetailFrame").html()==""){$(".percheckdetailFrame").html('')}else{percheckdetailFrame.percheckdetailReLoadData(e,h,a,f,i,b)}$("#percheckdetail_dlg").dialog("setTitle",j);$("#percheckdetail_dlg").dialog("open")};_checkDetailEvent.prototype.appendPrevRecord=function(){_checkDetailEvent.prototype.getSortFldNum("0")};_checkDetailEvent.prototype.appendNextRecord=function(){_checkDetailEvent.prototype.getSortFldNum("1")};_checkDetailEvent.prototype.checkDetailRecord=function(){var b=checkdetailData[checkdetailIdx];var a="详细记到";_checkDetailEvent.prototype.openDlg(b,a)};_checkDetailEvent.prototype.checkToMarkRecord=function(){var c=$("#checkDataGridList").datagrid("getSelected");var a=checkdetailData[checkdetailIdx];if(!a){return openMessageDlg("请先选择一条详细记到信息,进行详细记到操作!")}a.copies=parseInt(a.copies)+1;if(a.status=="0"&&a.status=="2"){if(a.copies>=c.copies){a.status="1"}}var d=checkdetailIdx;var b=base_path+"per/detailcheck/update.do";$.post(b,a,function(e){if(e.status=="0"){_checkDetailEvent.prototype.addPrintList(e.rows[0].id);_checkPerDetailObj.prototype.bindTable(e.rows[0].checkid);$("#checkdetail_dlg").dialog("close")}else{openMessageDlg(e.message)}},"json")};_checkDetailEvent.prototype.addPrintList=function(c){var a=base_path+"per/detailcheck/listBarcode.do";var b={};b.id=c;$.post(a,b,function(e){if(e.status=="0"){var d=e.rows;_checkDetailEvent.prototype.addPrintListByGetRows(d)}},"json")};_checkDetailEvent.prototype.addPrintListByGetRows=function(f){var e=mystorage.get("perCheckItemList");if(!e){e=[]}var a=f;for(var d=0;d0){var c=false;for(var b=0;b0){var d=j[h-1];a=parseInt((parseInt(f)+parseInt(d.sortfld))/2);e.id=j[h].id;e.flag="add"}}}else{if(g=="1"){if(h==(j.length-1)){a=parseInt((parseInt(f)*3)/2)}else{if(h<(j.length-1)){var d=j[h+1];a=parseInt((parseInt(f)+parseInt(d.sortfld))/2);e.id=j[h].id;e.flag="add"}}}}e.sortfld=a;_checkDetailEvent.prototype.openDlg(e,b)}};var _bindPerGridObj=function(){};_bindPerGridObj.prototype.add=function(e){var f=$("#acqDataGridList").datagrid("getSelected");var a={};a.bibid=f.id;if(getValue("page_bind_batchno").length==0){return openMessageDlg("请在设置-其他参数中设置装订批号")}var b=base_path+"per/bind/bindManual.do";var g={};if(getValue("bindcopies")>0){g.copies=getValue("bindcopies")}if(getValue("bindfee")>0){g.bindfee=getValue("bindfee")}if(getValue("bindcount")>0){g.bindcount=getValue("bindcount")}var f=$("#checkDataGridList").datagrid("getSelected");if(e=="1"){b=base_path+"per/bind/bindAuto.do";if(!f){return openMessageDlg("请先选择一条总记到信息,进行自动装订")}g.checkid=f.id}else{var d="";var c=$(".cell-box-selected");c.each(function(h,i){d+=i.id+","});d=d.substr(0,d.length-1);g.ids=d;if(d.toString().length==0){return openMessageDlg("请先选择至少一条详细记到信息,进行新增装订")}}a.url=b;a.param=g;mystorage.set("per_bind_iframe_param",a);if($(".perbindFrame").html()==""){$(".perbindFrame").html('')}else{perbindFrame.perbindReLoadData()}$("#perbind_dlg").dialog("setTitle","期刊装订");$("#perbind_dlg").dialog("open")};function perBindSaveResult(c,a){openMessageDlg(c.message,5000);var b=$("#acqDataGridList").datagrid("getSelected");_comGridObj.prototype.loadData(b.id,"bind",1);var d=$("#checkDataGridList").datagrid("getSelected");_checkPerDetailObj.prototype.bindTable(d.id);$("#tabsRightGrid").tabs("select",2);$("#perbind_dlg").dialog("close")}var _perBindGridObj=function(){};_perBindGridObj.prototype.select=function(a,b){if(!isUpdateByLibcode(b.libcode)){$("#deleteBindPer").linkbutton({disabled:true})}else{$("#deleteBindPer").linkbutton({disabled:false})}};_perBindGridObj.prototype.add=function(c){var b=0;var e=0;if(!c){if(getValue("page_check_batchno").length==0){return openMessageDlg("请点击页面设置,在其他参数页面中设置验收批号")}var d=$("#acqDataGridList").datagrid("getSelected");if(!d){return openMessageDlg("请先选择一条期刊数据,进行订购")}if(!d.classno){return openMessageDlg("你要进行装订验收的书目信息没有分类号,请完善书目信息才能进行装订验收!")}b=d.id}else{b=c.bibid;e=c.id}var a="装订验收";if($(".perbindhandlerFrame").html()==""){$(".perbindhandlerFrame").html('')}else{perbindhandlerFrame.perbindhandlerReLoadData(b,e)}$("#perbindhandler_dlg").dialog("setTitle",a);$("#perbindhandler_dlg").dialog("open")};_perBindGridObj.prototype.update=function(b,a){if(a){a=$("#bindDataGridList").datagrid("getSelected")}if(isUpdateByLibcode(a.libcode)){_perBindGridObj.prototype.add(a)}};_perBindGridObj.prototype.trash=function(){var a=$("#bindDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("请先选择一条记到信息,进行删除")}openConfirmDlg("您确定要删除记录号为["+a.id+"]的数据吗?",null,_perBindGridObj.prototype.trashResult,null)};_perBindGridObj.prototype.trashResult=function(){var c=$("#bindDataGridList").datagrid("getSelected");var b={};b.pk=c.id;var a=base_path+"per/bind/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);_comGridObj.prototype.loadData(c.bibid,"bind",1)}else{openMessageDlg(d.message)}},"json")};function perBindHandlerSaveResult(b,a){openMessageDlg(b.message,5000);_comGridObj.prototype.loadData(a,"bind",1);_comGridObj.prototype.loadData(a,"hold");$("#perbindhandler_dlg").dialog("close");$("#tabsGrid").tabs("select",1)}function printerBookLable(){var b=mystorage.get("perCheckItemList");if(b){var d={};d.rows=b;var a=getValue("page_booklablefmt");if(a.length==0){return openMessageDlg("请在设置-其他参数-设置书标格式!")}var c={};c.keycode=a;c.printPerCheckList="section";c.rows=d;mystorage.remove("perCheckItemList");$("#printer-confirm-dlg").dialog("close");openPostWindow("../export/exportlabelresult.jsp",c)}};