$(function(){autoPanle();$(".easyui-panel-resize").panel("resize");setInitPageElementData();$("#barcode").textbox("textbox").focus();enterEvent("barcode",searchHoldRecord)});function setInitPageElementData(){var a=[{code:"logtaglib",key:"curlibcode"},{code:"logtagloc",key:"curlocation"}];commonSetParaInit(null,"record",null,a)}function autoPanle(){var a=$(window).height();var b=a-(126+340);$(".datagrid-div").css("height",b+"px");$("#LogisticsDataGridList").datagrid("resize")}function searchHoldRecord(){var a=base_path+"hld/holding/getHoldingWithBib.do";var b={};if(getValue("barcode").length==0){return openMessageDlg("条码号不能为空")}b.barcode=getValue("barcode");$.post(a,b,function(c){if(c.status=="0"){var d=c.rows[0];setBibHtmlShow(d);getLogisticsPage(d.id)}else{openMessageDlg(c.message)}},"json")}function onSendHandler(){var a=$("#LogisticsDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("请先选择一条运送记录,进行操作!")}$.messager.confirm("提示消息","您确定要执行确实收货操作吗?",function(c){if(c){var b=base_path+"cir/logistics/update.do";var d={};d.id=a.id;d.type="1";$.post(b,d,function(e){if(e.status=="0"){getLogisticsPage(a.hldid)}else{openMessageDlg(e.message)}},"json")}})}function getLogisticsPage(c){deleteGridData("LogisticsDataGridList");var a=base_path+"cir/logistics/page.do";var b={};b.hldid=c;$("#LogisticsDataGridList").datagrid({url:a,queryParams:b,onLoadSuccess:function(d){},method:"post"})}function onLogisticsDelete(){var a=$("#LogisticsDataGridList").datagrid("getSelected");if(!a){return openMessageDlg("请先选择一条运送记录,进行操作!")}$.messager.confirm("提示消息","您确定要执行当前操作吗?",function(c){if(c){var b=base_path+"cir/logistics/delete.do";var d={};d.pk=a.id;$.post(b,d,function(e){if(e.status=="0"){getLogisticsPage(a.resid)}else{openMessageDlg(e.message)}},"json")}})}function setBibHtmlShow(d){var c="";var b=[{code:"title",name:"题名"},{code:"author",name:"作者"},{code:"barcode",name:"条码号"},{code:"curlibcode",name:"当前所在馆"},{code:"curlocation",name:"当前所在点"},{code:"isbn",name:"ISBN"},{code:"price",name:"价格"},{code:"classno",name:"分类号"},{code:"subject",name:"主题词"},{code:"publish",name:"出版社"},{code:"publishaddress",name:"出版地"},{code:"publishdate",name:"出版年"},{code:"callno",name:"索书号"},{code:"content",name:"内容简介"}];for(var a=0;a"+b[a].name+":"+(d[b[a].code]==null?"":d[b[a].code])+""}else{if(b[a].code=="curlibcode"){setValue("logcurlib",d[b[a].code]);c+="
"+b[a].name+":"+onShowLibName(d[b[a].code])+"
"}else{if(b[a].code=="curlocation"){setValue("logcurloc",d[b[a].code]);c+="
"+b[a].name+":"+onShowLocationName(d[b[a].code])+"
"}else{c+="
"+b[a].name+":"+(d[b[a].code]==null?"":d[b[a].code])+"
"}}}}$(".bib-html-data").html(c)};