var _initdata;var _configData;var _bibRow;$(function(){_callno=mystorage.get("check_repeat_callno");enterEvent("checkrepeatbibkey",checkRepeatBibCondtion);getMyStorageItemData(_type);initJson=[{code:"sysid",key:"sysid",condition:"type",value:_type},{code:"libcode",key:"libcode",condition:"code",value:vLibcode},];initJson.forEach(function(b,c,d){if(_initdata.rows[0][b.key]){_myPage.prototype.setData(_initdata.rows[0][b.key],b)}});$("#checkrepeatDataGridList").datagrid({onSelect:onSelectCheckRepeatDataGridList});$(".easyui-panel").panel("resize");$(".easyui-tabs").tabs("resize");setValue("libcode",vLibcode);if(_configData){var a=JSON.parse(_configData.rows[0].paramjson);setValue("sysid",a.sysid)}$("#checkrepeatbibindex").combobox({onChange:function(c,b){if(c){if(c=="lib_holdings.callno"){setValue("checkrepeatbibkey",_callno);setValue("searchtype","0")}else{if(c=="title"||c=="author"||c=="seriesname"){setValue("searchtype","12");setValue("checkrepeatbibkey",_bibRow[c])}else{setValue("checkrepeatbibkey",_bibRow[c]);setValue("searchtype","1")}}}}});if(parseInt(_id)>0){checkRepeatBibCondtion(_id,_type,_callno)}});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(){if(_callno&&_callno!="null"){$(this).combobox("select","CALLNO")}else{$(this).combobox("select","ISBN")}}})},"json")}function getBibDataById(c){if(c){var b={id:c};var a=base_path+"lib/biblios/get.do";$.post(a,b,function(d){_bibRow=d.rows[0]},"json")}}function colseParentDlg(){parent.colseIframeDlg("checkrepeatbib_dlg",null,null)}function onOpenCheckRepeatBibDlg(){$("#checkrepeatbibkey").textbox("textbox").focus()}function onSelectCheckRepeatEditGridByOnSelect(b,f){var e=[{field:"010",code:"a",index:"ISBN"},{field:"001",index:"CTRLNO"},{field:"200",code:"a",index:"TITLE"},{field:"225",code:"a",index:"SERIESNAME"},{field:"701",code:"a",index:"AUTHOR"},{field:"702",code:"a",index:"AUTHOR"},{field:"690",code:"a",index:"CLASSNO"},{field:"606",code:"a",index:"SUBJECT"},{field:"690",code:"f",index:"CALLNO"}];var a=f.data;if(a.length>0){for(var d=0;d0){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){},method:"post"})}else{deleteGridData("orderRepeatDataGridList")}}function checkRepeatBibCondtion(b,i,c,d){$("#checkrepeatEditGrid").datagrid("loadData",[]);$("#checkrepeatDataGridList").datagrid("loadData",[]);$("#holdRepeatDataGridList").datagrid("loadData",[]);$("#orderRepeatDataGridList").datagrid("loadData",[]);getBibDataById(b);getMyStorageItemData(_type);var a=base_path+"lib/biblios/page.do";a=base_path+"hld/holding/listHoldingWithBib.do";var e={};e.rows=10;e.page=1;var f=0;if(b>0){e["limit["+f+"].condition"]="lib_bibliography.id";e["limit["+f+"].value"]=b;f++;if(c&&c!="null"){setValue("checkrepeatbibindex","lib_holdings.callno");setValue("checkrepeatbibkey",c);e["limit["+f+"].condition"]=getValue("checkrepeatbibindex");e["limit["+f+"].typeHandler"]=getValue("searchtype");e["limit["+f+"].value"]=getValue("checkrepeatbibkey");f++}}else{if(c=="null"){return}if(getValue("checkrepeatbibkey").length>0){e["limit["+f+"].condition"]=getValue("checkrepeatbibindex");e["limit["+f+"].typeHandler"]=getValue("searchtype");e["limit["+f+"].value"]=getValue("checkrepeatbibkey");f++}}var g=getValue("libcode");if(g){e["limit["+f+"].condition"]="lib_holdings.libcode";e["limit["+f+"].typeHandler"]="0";e["limit["+f+"].value"]=g;f++}var h=getValue("sysid");if(h){e["limit["+f+"].condition"]="lib_bibliography.sysid";e["limit["+f+"].typeHandler"]="0";e["limit["+f+"].value"]=h;f++}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:a,queryParams:e,onLoadSuccess:function(j){},method:"post"})}function getMyStorageItemData(a){_configData=mystorage.get("per_config");_initdata=mystorage.get("per_init_data");if(a!="1"){_configData=mystorage.get("cat_config");_initdata=mystorage.get("cat_init_data")}}function copyFLdToEditScreen(){var a=$("#checkrepeatEditGrid").datagrid("getSelections");if(a){parent.copyFLdToLeftScreen(a)}else{return openMessageDlg("请选择要复制的字段")}};