var initJson;var checkdetailId;var checkdetailIdx;var checkdetailData;var eidtorAutoBindGridObject=undefined;var eidtorAutoBindGridIndex=undefined;$(function(){initJson=[{code:"page_sysid",key:"sysid",condition:"type",value:vType,linkage:[{code:"page_template",key:"template",condition:"sysid"}]},{code:"page_ctrlno",key:"ctrlno",condition:"libcode",value:vLibcode},{code:"page_z3950",key:"z3950",condition:"libcode",value:vLibcode},{code:"page_editmodel",key:"editmodel"},{code:"page_finsources",key:"finsources"},{code:"page_mediatype",key:"mediatype"},{code:"page_binding",key:"binding"},{code:"page_docsources",key:"docsources"},{code:"page_ncy",key:"ncy"},{code:"page_bookseller",key:"bookseller",condition:"libcode",value:vLibcode},{code:"page_location",key:"location",condition:"libcode",value:vLibcode},{code:"page_doctype",key:"doctype",condition:"libcode",value:vLibcode},{code:"libcodeSelect",key:"libcode",condition:"code",value:vLibcode},{code:"page_pertype",key:"pertype"},{code:"acqstatus",key:"acqstatus"},{code:"operid",key:"operid"},{code:"frequency",key:"frequency",fmt:"entity"},{code:"ordertype",key:"perordertype"},{code:"status",key:"percheckstatus"}];$("#acqDataGridList").datagrid("showColumn","status");_comGridObj.prototype.events()});var _comGridObj=function(){};_comGridObj.prototype.clear=function(){$(".checkdetail-boxs").html("");clearGridData("editBibGrid,acqDataGridList,bindDataGridList,holdDataGridList");$("#tabsGrid").tabs("select",0)};_comGridObj.prototype.events=function(){$("#acqDataGridList").datagrid({border:false,rowStyler:rowStylerIsUpdateByLibcode,onSelect:_perBindGridObj.prototype.select});$("#tabsGrid").tabs({onSelect:_tabsGridObj.prototype.select});$("#holdDataGridList").datagrid({border:false,rowStyler:rowStylerIsUpdateByLibcode});$("#editBibGrid").datagrid({border:false,title:""});$("#bindDataGridList").datagrid({border:false,rowStyler:rowStylerIsUpdateByLibcode,onSelect:_perBindGridObj.prototype.bntselect,onDblClickRow:_perBindGridObj.prototype.update});$(".easyui-panel").panel("resize")};var _tabsGridObj=function(){};_tabsGridObj.prototype.select=function(b,a){if(a==1){$("#deleteBindPer").show()}else{$("#deleteBindPer").hide()}};var _perBindGridObj=function(){};_perBindGridObj.prototype.select=function(a,b){_comGridObj.prototype.loadData(b.id,"bind",1);_comGridObj.prototype.loadData(b.id,"hold");_detailData.prototype.set(b.id)};_perBindGridObj.prototype.bntselect=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)}else{return openMessageDlg("不能修改非本馆数据")}};_perBindGridObj.prototype.trash=function(){var a=$("#bindDataGridList").datagrid("getSelected");if(isUpdateByLibcode(a.libcode)){if(!a){return openMessageDlg("请先选择一条记到信息,进行删除")}openConfirmDlg("您确定要删除记录号为["+a.id+"]的数据吗?",null,_perBindGridObj.prototype.trashResult,null)}else{return openMessageDlg("不能删除非本馆数据")}};_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)};