$(function(){$("#orderDataGridList").datagrid({rowStyler:rowStylerIsUpdateByLibcode,onDblClickRow:updateOrderBib,onSelect:selectOrderBib})});function updateOrderBib(b,a){if(!isUpdateByLibcode(a.libcode)){return openMessageDlg("不能修改非本馆数据")}else{orderPerRecord(a,a.ordertype)}}function selectOrderBib(b,a){if(!isUpdateByLibcode(a.libcode)){$("#deleteOrderBib").linkbutton({disabled:true});$("#orderPerRecord1").linkbutton({disabled:true});$("#orderPerRecord2").linkbutton({disabled:true})}else{$("#deleteOrderBib").linkbutton({disabled:false});$("#orderPerRecord1").linkbutton({disabled:false});$("#orderPerRecord2").linkbutton({disabled:false})}}function orderPerSaveResult(b,a){openMessageDlg(b.message,5000);_comGridObj.prototype.loadData(a,"order",1);$("#suborderper_dlg").dialog("close");$("#tabsGrid").tabs("select",1)}function deleteSubOrderBib(){var a=$("#orderDataGridList").datagrid("getSelected");if(isUpdateByLibcode(a.libcode)){if(!a){return openMessageDlg("请先选择一条订购信息,进行删除")}openConfirmDlg("您确定要删除记录号为["+a.id+"]的订购数据吗?",null,deleteSubOrderBibResult,null)}else{return openMessageDlg("不能删除非本馆数据")}}function deleteSubOrderBibResult(){var c=$("#orderDataGridList").datagrid("getSelected");var b={};b.pk=c.id;var a=base_path+"per/order/delete.do";$.post(a,b,function(d){if(d.status=="0"){openMessageDlg(d.message,5000);_comGridObj.prototype.loadData(c.bibid,"order",1)}else{openMessageDlg(d.message)}},"json")};