$(function(){setGridHeight()});function searchRecord(){var a=base_path+"sys/faq/list.do";var b={};if(getValue("regdatebegdate")>0){b["limit[0].condition"]="faqdate";b["limit[0].typeHandler"]="7";b["limit[0].value"]=getValue("regdatebegdate").replace(new RegExp("-","g"),"")}if(getValue("regdateenddate")>0){b["limit[1].condition"]="faqdate";b["limit[1].typeHandler"]="5";b["limit[1].value"]=getValue("regdateenddate").replace(new RegExp("-","g"),"")}b.orderBy=" opac_faq.id desc ";$("#datagrid-single").datagrid({url:a,queryParams:b,onLoadSuccess:function(c){},method:"post"})}function replyRecord(){var a=$("#datagrid-single").datagrid("getSelected");if(a){setValue("reply","");$("#win").dialog("open")}else{openMessageDlg("请选择一条记录进行操作!")}}function saveRecord(){var c=$("#datagrid-single").datagrid("getSelected");var a=base_path+"sys/faq/update.do";var b={};b.id=c.id;b.reply=getValue("reply");b.replydate=getCurDateYMD();b.status="1";$.post(a,b,function(d){if(d.status=="0"){searchRecord()}else{openMessageDlg(d.message)}},"json")}function closeWin(){$("#win").dialog("close")}function deleteRecord(){var a=$("#datagrid-single").datagrid("getSelected");if(a){$.messager.confirm("提示消息","你确定要对选中的记录进行删除操作吗?",function(c){if(c){var b=base_path+"sys/faq/delete.do";var d={};d.id=a.id;$.post(b,d,function(e){if(e.status=="0"){searchRecord()}else{openMessageDlg(e.message)}},"json")}})}else{openMessageDlg("请选择一条记录进行操作!")}};