var path = '<%=request.getContextPath()%>/baseReorganizeController/deleteBaseReorganize';
var rows = $('#dg').datagrid('getChecked');
if (rows.length>0){
$.messager.confirm('消息','确定要删除基础整备信息么?',function(r){
if (r){
var ids = '';
for(var i =0 ;i<rows.length;i++){
ids += rows[i].id + ',' ;
}
ids = ids.substring(0 , ids.length-1);
$.post(path,{ids:ids},function(result){
if (result.success){
$.messager.alert('消息','操作成功!');
$('#dg').datagrid('reload'); // reload the user data
} else {
$.messager.alert('消息','操作失败!');
}
},'json');
}
});
}else{
$.messager.alert('消息','至少选择一条记录!');
}