var initflag;var initJson;var onSelectBibRepeatIndex;var onSelectBibRepeatRows;vPageNameFlag="数据查重";$(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,orderbib_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:"operid",key:"operid"},];$("#allcheck").click(function(){if(this.checked){$("input[name='checkbibtype']:checkbox").each(function(){$(this).prop("checked",true)})}else{$("input[name='checkbibtype']:checkbox").each(function(){$(this).prop("checked",false)})}});$("#acqDataGridList").datagrid("showColumn","status");_comGridObj.prototype.events()});var _comGridObj=function(){};_comGridObj.prototype.clear=function(){clearGridData("editBibGrid,acqDataGridList,orderDataGridList,holdDataGridList");$("#tabsGrid").tabs("select",0)};_comGridObj.prototype.events=function(){$("#acqDataGridList").datagrid({rowStyler:rowStylerIsUpdateByLibcode,onSelect:_acqGridObj.prototype.select});$("#tabsGrid").tabs({onSelect:_tabsGridObj.prototype.select});$("#holdDataGridList").datagrid({rowStyler:rowStylerIsUpdateByLibcode});$("#bibRepeatCountDataGridList").datagrid({onSelect:onSelectBibRepeatCountDataGridList})};var _acqGridObj=function(){};_acqGridObj.prototype.select=function(a,b){if(!isUpdateByLibcode(b.libcode)){_linkbuttonObj.prototype.status(true)}else{_linkbuttonObj.prototype.status(false)}_comGridObj.prototype.loadData(b.id,"hold");_detailData.prototype.set(b.id)};var _tabsGridObj=function(){};_tabsGridObj.prototype.select=function(b,a){};_tabsGridObj.prototype.setTitle=function(a,b,c){};function onSelectBibRepeatCountDataGridList(e,c){onSelectBibRepeatIndex=e;onSelectBibRepeatRows=c;var d={};var a=base_path+"lib/biblios/page.do";var b=0;$("input[name='checkbibtype']:checkbox:checked").each(function(f,g){d["limit["+f+"].condition"]=g.id;d["limit["+f+"].value"]=c[g.id];b++});if(getValue("page_sysid").length>0){b++;d["limit["+b+"].condition"]="sysid";d["limit["+b+"].value"]=getValue("page_sysid")}if(getValue("libcodeSelect").length>0){b++;d["limit["+b+"].condition"]="libcode";d["limit["+b+"].value"]=getValue("libcodeSelect")}$("#acqDataGridList").datagrid({url:a,queryParams:d,onLoadSuccess:function(f){if(f.total>0){$("#acqDataGridList").datagrid("selectRow",0)}},method:"post"})}function serachRepeatBib(){var b=getParamByPageInput();if(b!=null){clearGridData("editBibGrid,bibRepeatCountDataGridList,acqDataGridList,orderDataGridList,holdDataGridList");var a=base_path+"lib/biblios/selectByRepeatFields.do";$("#bibRepeatCountDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){if(c.total>0){$("#bibRepeatCountDataGridList").datagrid("selectRow",0)}},method:"post"})}}function setNoRepeatBibRecord(){var b=$("#acqDataGridList").datagrid("getSelected");if(!b){return openMessageDlg("请先选择一条重复数据信息,设为不重复")}var a=$("#acqDataGridList").datagrid("getRowIndex",b);$("#acqDataGridList").datagrid("deleteRow",a);$("#acqDataGridList").datagrid("selectRow",0)}function comBineBibRecord(){var b=$("#acqDataGridList").datagrid("getSelected");if(!b){return openMessageDlg("请先选择一条重复数据信息,进行数据合并")}var a=$("#acqDataGridList").datagrid("getRows");$.messager.confirm("提示消息","您确定要重复数据,进行合并处理吗?",function(c){if(c){comBineBibRecordHandler(b,a)}})}function comBineBibRecordHandler(f,a){var b=base_path+"lib/biblios/combineBib.do?";var e={};e.id=f.id;var d="";for(var c=0;c0){b++;c["limit["+b+"].condition"]="sysid";c["limit["+b+"].value"]=getValue("page_sysid")}if(getValue("libcodeSelect").length>0){b++;c["limit["+b+"].condition"]="libcode";c["limit["+b+"].value"]=getValue("libcodeSelect")}}return c};