var LODOP;$(function(){});function initPrinterCombox(a){setTimeout(function(){try{LODOP=getLodop();var c=LODOP.GET_PRINTER_COUNT();var d=[{code:"",name:"不选"}];for(var b=1;b<=c;b++){var g={};g.code=b;g.name=LODOP.GET_PRINTER_NAME(b);d.push(g)}$("#page_booklableprinter").combobox({data:d,valueField:"code",textField:"name",panelHeight:"auto"});$("#page_barcodeprinter").combobox({data:d,valueField:"code",textField:"name",panelHeight:"auto"});setValue("page_booklableprinter",a.booklableprinter);setValue("page_barcodeprinter",a.barcodeprinter)}catch(f){}},2500)}function initPrinterFmtCombox(){var a=base_path+"lib/design/page.do";var b={};b.code="E_BIBLABEL0";b.rows=100;b.page=1;$.post(a,b,function(c){if(c.status=="0"){initFormatDesignComboboxByCode(c)}},"json")}function initFormatDesignComboboxByCode(a){$("#page_booklablefmt").combobox({data:a.rows,valueField:"keycode",textField:"name",panelHeight:"auto"});$("#page_barcodefmt").combobox({data:a.rows,valueField:"keycode",textField:"name",panelHeight:"auto"});if(cataConfigData){setValue("page_booklablefmt",cataConfigData.booklablefmt);setValue("page_barcodefmt",cataConfigData.barcodefmt)}}function onSelectOrderDataGridList(a,b){if(tabGrid_title=="(审校)"){if(!isUpdateByLibcode(b.libcode)){$("#centerOrderCheckBibRecord").linkbutton({disabled:true})}else{$("#centerOrderCheckBibRecord").linkbutton({disabled:false})}}if(!isUpdateByLibcode(b.libcode)){$("#cancelOrderBibRecord").linkbutton({disabled:true});$("#deleteOrderBib").linkbutton({disabled:true})}else{$("#cancelOrderBibRecord").linkbutton({disabled:false});$("#deleteOrderBib").linkbutton({disabled:false})}}function updateCheckBib(c,b){if(!isUpdateByLibcode(b.libcode)){return openMessageDlg("不能修改非本馆数据")}else{var a=0;if(tabGrid_title=="(审校)"){a=1}checkBibRecord(b,a)}}function selectCheckBib(b,a){if(!isUpdateByLibcode(a.libcode)){$("#deleteCheckBib").linkbutton({disabled:true})}else{$("#deleteCheckBib").linkbutton({disabled:false})}}function checkSaveResult(d,a){bibGlobalController.prototype.loadGridData(a,"check");$("#checkbib_dlg").dialog("close");$("#tabsGrid").tabs("select",3);if($("#printerDataGridList").length>0){if(cataConfigData&&(cataConfigData.booklableprinter||cataConfigData.barcodeprinter)){$("#printer-confirm-dlg").dialog("open");$(".printer-confirm-body").html(d.message+",以下列表是您的验收记录!");var c=mystorage.get("barcodeItemList");if(c){$("#printerDataGridList").datagrid("loadData",c)}else{var b=mystorage.get("callNoItemList");if(b){$("#printerDataGridList").datagrid("loadData",b)}}}}else{return openMessageDlg(d.message)}}function printerPerviewBookLable(){var b=mystorage.get("callNoItemList");if(b){var c={};c.rows=b;var a=cataConfigData.booklablefmt;var d=cataConfigData.booklableprinter;if(a.length==0){return openMessageDlg("请在设置-采访参数-设置书标格式!")}printerDataByDesignkeycode(a,c,d,0)}}function printerBookLable(){var b=mystorage.get("callNoItemList");if(b){var c={};c.rows=b;var a=cataConfigData.booklablefmt;var d=cataConfigData.booklableprinter;if(a.length==0){return openMessageDlg("请在设置-采访参数-设置书标格式!")}mystorage.remove("callNoItemList");printerDataByDesignkeycode(a,c,d,1)}}function printerPerviewBookBarcode(){var c=mystorage.get("barcodeItemList");if(c){var d={};d.rows=c;var b=cataConfigData.barcodefmt;var a=cataConfigData.barcodeprinter;if(b.length==0){return openMessageDlg("请在设置-采访参数-设置条码格式!")}printerDataByDesignkeycode(b,d,a,0)}}function printerBookBarcode(){var d=mystorage.get("barcodeItemList");if(d){var e={};e.rows=d;var b=cataConfigData.barcodefmt;var a=cataConfigData.barcodeprinter;if(b.length==0){return openMessageDlg("请在设置-采访参数-设置条码格式!")}mystorage.remove("barcodeItemList");printerDataByDesignkeycode(b,e,a,1)}var c=mystorage.get("callNoItemList");if(c){$("#printerDataGridList").datagrid("loadData",c)}}function printerDataByDesignkeycode(b,e,a,d){var c=base_path+"lib/design/get.do";var f={};f.pk=b;$.post(c,f,function(g){if(g.status=="0"){setLabelDisplayArea(g,e,a,d)}else{alert(g.message)}},"json")}function deleteCheckBib(){var a=$("#checkDataGridList").datagrid("getSelected");if(isUpdateByLibcode(a.libcode)){if(!a){return openMessageDlg("请先选择一条验收信息,进行删除")}openConfirmDlg("您确定要删除记录号为["+a.id+"]的订购数据吗?",null,deleteCheckBibResult,null)}else{return openMessageDlg("不能删除非本馆数据")}}function deleteCheckBibResult(){var c=$("#checkDataGridList").datagrid("getSelected");var b={};b.pk=c.id;var a=base_path+"acq/check/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);bibGlobalController.prototype.loadGridData(c.bibid,"check")}else{openMessageDlg(d.message)}},"json")}function savePageConfig(){var c=getJsonData("page_","record");if(!c){openMessageDlg("记录异常");return}var b=JSON.parse(c.paramjson);if(b.holdlist){var a=JSON.parse(b.holdlist);var f=0;for(var e=0;e