var jsonFormatDesign={code:"I_HLDIMPORTDATA"};var holdId=0;var holdrow=undefined;var datafilename;$(function(){autoPanle();setInitPageElementData();$("#barcode").textbox("textbox").focus();$(".easyui-panel-resize").panel("resize");enterEvent("barcode",onHandlerRecord)});function autoPanle(){var a=$(window).height();var b=a-(126+340);$(".datagrid-div").css("height",b+"px");$("#holdDataGridList").datagrid("resize")}function setInitPageElementData(){var d=[{code:"tagdoctype",key:"doctype"},{code:"orglibcode",key:"curlibcode"}];commonSetParaInit(null,"record",null,d);var c={key:"libcode"};initPageDataSingleElement("taglibcode",c,null);var a={key:"curlocation"};initPageDataSingleElement("taglocation",a,null);var b=[{id:"taglocation",key:"curlocation",condition:"libcode",value:vLibcode},{id:"tagdoctype",key:"doctype",condition:"libcode",value:vLibcode}];initNextSelectCombobox("taglibcode",b)}function onHandlerRecord(){if(getValue("barcode").length==0){return openMessageDlg("条码号不能为空")}var a=getValue("barcode");if(a.length>=0){$(".bib-html-data").html("");deleteGridData("holdDataGridList");var b=base_path+"hld/holding/getCheckHoldBarcode.do";var c={};c.barcode=a;$.post(b,c,function(d){if(d.status=="0"){if(d.total>0){holdId=d.rows[0].id;holdrow=d.rows[0];bindDataGridListByBibId(d.rows[0].bibid,"hold");bindDataToBiBByBibId(d.rows[0].bibid);var e=["","","借出","预约/预借"];if(holdrow.status=="2"||holdrow.status=="3"){return openMessageDlg("条码处于["+e[parseInt(holdrow.status)]+"]状态,不能进行当前操作")}onHandlerMian(holdId)}else{return openMessageDlg("未找到合适的条码号")}}else{openMessageDlg(d.message)}},"json")}}function onHandlerMian(c){if(c>0){var a={};a.id=c;a.handletype="5";if(getValue("taglibcode").length>0){a.curlibcode=getValue("taglibcode")}if(getValue("taglocation").length>0){a.curlocation=getValue("taglocation")}if(getValue("tagdoctype").length>0){a.doctype=getValue("tagdoctype")}if(getValue("changelibcode")==0){a.libcode=getValue("taglibcode")}var b=base_path+"hld/holding/handleHolding.do";$.post(b,a,function(d){if(d.status=="0"){showHoldHandlerResult(d,a)}else{openMessageDlg(d.message)}},"json")}else{openMessageDlg("未找到馆藏记录号")}}function showHoldHandlerResult(d,a){var c="";var b="";var e=d.rows[0];c="馆际调拨";b=c+"成功"+getHoldOtherInfo(e,a);$(".hold-result-data").append("