$(function(){setGridHeight(80);$("#datagrid-single").datagrid({rowStyler:rowCirOverdueStyler});enterEvent("keyword",loadGridData)});function rowCirOverdueStyler(a,b){if(b.status=="1"){return"color:#FF00FF;"}if(b.status=="2"){return"color:#33FF66;"}if(b.status=="3"){return"color:red;"}}function updateRecord(b){var a=$("#datagrid-single").datagrid("getSelected");if(!a){openMessageDlg("请选择一条数据,进行操作!");return}if(a.status=="3"&&(b=="4"||b=="2"||b=="3")){openMessageDlg("此记录以为领取状态,其他操作无效!");return}var c=base_path+"par/getgift/update.do";a.status=b;$.post(c,a,function(d){openMessageDlg(d.message);if(d.status=="0"){loadGridData(d)}},"json")}function loadGridData(c){var a=base_path+"par/getgift/pageUnion.do";var b=0;var e=$("#datagrid-single").datagrid("getSelected");if(e){b=$("#datagrid-single").datagrid("getRowIndex",e)}var d={};if(getValue("keyword")){d["limit[1].condition"]=getValue("index");d["limit[1].typeHandler"]="1";d["limit[1].value"]=getValue("keyword")}if(getValue("status")){d["limit[2].condition"]="par_cir_getgift.status";d["limit[2].value"]=getValue("status")}$("#datagrid-single").datagrid({url:a,queryParams:d,onLoadSuccess:function(f){$("#datagrid-single").datagrid("selectRow",b)},method:"post"})}function setGridHeight(b){var a=$(window).height();var c=a-b;$(".datagrid-div").css("height",c+"px");$("#datagrid-single").datagrid("resize");$(".easyui-panel").panel("resize")};