$(function(){});function selectOrderBib(b,a){if(!isUpdateByLibcode(a.libcode)){$("#cancelOrderBibRecord").linkbutton({disabled:true});$("#deleteOrderBib").linkbutton({disabled:true})}else{$("#cancelOrderBibRecord").linkbutton({disabled:false});$("#deleteOrderBib").linkbutton({disabled:false})}}function updateOrderBib(c,b){if(!isUpdateByLibcode(b.libcode)){return openMessageDlg("不能修改非本馆数据")}else{var a=0;if(tabGrid_title=="(审校)"){a=1}orderBibRecord(b,a)}}function ordreSaveResult(b,a){openMessageDlg(b.message,5000);bibGlobalController.prototype.loadGridData(a,"order");$("#orderbib_dlg").dialog("close");$("#tabsGrid").tabs("select",2)}function cancelOrderBibRecord(){var a=$("#orderDataGridList").datagrid("getSelected");if(isUpdateByLibcode(a.libcode)){if(!a){return openMessageDlg("请先选择一条订购信息,进行退订处理")}if(a.ordstatus=="1"){return openMessageDlg("已经处于退订状态,无需重复退订!")}openConfirmDlg("您确定要对记录号为["+a.id+"]的数据进行退订处理吗?",null,cancelOrderBibRecordResult,null)}else{return openMessageDlg("不能删除非本馆数据")}}function cancelOrderBibRecordResult(){var c=$("#orderDataGridList").datagrid("getSelected");var b={};b.id=c.id;var a=base_path+"acq/order/cancelOrder.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);bibGlobalController.prototype.loadGridData(c.bibid,"order")}else{openMessageDlg(d.message)}},"json")}function deleteOrderBib(){var a=$("#orderDataGridList").datagrid("getSelected");if(isUpdateByLibcode(a.libcode)){if(!a){return openMessageDlg("请先选择一条订购信息,进行删除")}openConfirmDlg("您确定要删除记录号为["+a.id+"]的订购数据吗?",null,deleteOrderBibResult,null)}else{return openMessageDlg("不能删除非本馆数据")}}function deleteOrderBibResult(){var c=$("#orderDataGridList").datagrid("getSelected");var b={};b.pk=c.id;var a=base_path+"acq/order/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);bibGlobalController.prototype.loadGridData(c.bibid,"order")}else{openMessageDlg(d.message)}},"json")};