$(function(){var c=[{code:"sysid",key:"sysid",condition:"type",value:"0"},{code:"libcode",key:"libcode",condition:"code",value:vLibcode},];$("#checkrepeatbibindex").combobox({onChange:function(e,d){if(e){if(e=="lib_holdings.callno"){setValue("searchtype","0")}else{if(e=="title"||e=="author"||e=="seriesname"){setValue("searchtype","12")}else{setValue("searchtype","1")}}}}});$("#checkrepeatDataGridList").datagrid({onSelect:onSelectCheckRepeatDataGridList});_myPage.prototype.initData(c);initCheckRepeatBibindexCommbox();var a=$(window).height();var b=a-380;$(".my-check-dup").css("height",b+"px");$(".easyui-panel").panel("resize");$(".easyui-tabs").tabs("resize")});function updateTabsGridTitByIndex(d,b,e,a){var f=e+"列表"+addStyleHtml(a);var c=$("#"+d).tabs("getTab",b);$("#"+d).tabs("update",{tab:c,options:{title:f}})}function onSelectCheckRepeatDataGridList(a,b){if(b.id){showDataGridDetailById(b.id,"checkrepeatEditGrid");holdRepeatDataGridListByBibId(b.id);orderRepeatDataGridListByBibId(b.id)}}function showDataGridDetailById(a,c){var b=base_path+"lib/biblios/getMarcRecordForEdit.do";var d={};d.id=a;$.post(b,d,function(f){if(f.status=="0"){var e=f.rows;$("#"+c+"").datagrid("loadData",e)}else{openMessageDlg(f.message)}},"json")}function orderRepeatDataGridListByBibId(a){if(a>0){var b=base_path+"acq/order/page.do";var c={};c.bibid=a;c.rows=10;c.page=1;$("#orderRepeatDataGridList").datagrid({url:b,queryParams:c,onLoadSuccess:function(d){updateTabsGridTitByIndex("tabsGrid",1,"订购",d.total)},method:"post"})}else{deleteGridData("orderRepeatDataGridList")}}function holdRepeatDataGridListByBibId(a){if(a>0){var b=base_path+"hld/holding/page.do";var c={};c.bibid=a;c.rows=10;c.page=1;$("#holdRepeatDataGridList").datagrid({url:b,queryParams:c,onLoadSuccess:function(d){updateTabsGridTitByIndex("tabsGrid",2,"馆藏",d.total)},method:"post"})}else{deleteGridData("holdRepeatDataGridList")}}function checkRepeatBibCondtion(){var b=base_path+"lib/biblios/page.do";var e={};e.rows=10;e.page=1;var a=0;if(getValue("checkrepeatbibkey").length==0){return openMessageDlg("检索值不能为空")}clearGridData("checkrepeatEditGrid,checkrepeatDataGridList");e["limit["+a+"].condition"]=getValue("checkrepeatbibindex");e["limit["+a+"].typeHandler"]=getValue("searchtype");e["limit["+a+"].value"]=getValue("checkrepeatbibkey");a++;var c=getValue("libcode");if(c){e["limit["+a+"].condition"]="lib_holdings.libcode";e["limit["+a+"].typeHandler"]="0";e["limit["+a+"].value"]=c;a++}var d=getValue("sysid");if(d){e["limit["+a+"].condition"]="lib_bibliography.sysid";e["limit["+a+"].typeHandler"]="0";e["limit["+a+"].value"]=d;a++}if(getValue("sortfld").length>0){e.orderBy=" "+getValue("sortfld")+" "+getValue("sorttype");if(getValue("sortfld")=="lib_holdings.callno"){e.orderBy=" F_CALLNO("+getValue("sortfld")+") "+getValue("sorttype")}}$("#checkrepeatDataGridList").datagrid({url:b,queryParams:e,onLoadSuccess:function(f){$("#checkrepeatDataGridList").datagrid("selectRow",0);$(".easyui-tabs").tabs("resize");updataGridBibFlag(f,"checkrepeatDataGridList")},method:"post"})}function initCheckRepeatBibindexCommbox(){var b={key:"bibindex"};var a=base_path+"par/common/getInitData.do";$.post(a,b,function(c){$("#checkrepeatbibindex").combobox({data:c.rows,valueField:"code",textField:"name",loadFilter:function(d){var e={};e={};e.code="CALLNO";e.name="索书号";d.splice(0,0,e);e={};e.code="BARCODE";e.name="条码号";d.splice(0,0,e);return d},onLoadSuccess:function(){$(this).combobox("select","ISBN")}})},"json")};