var url = CMS_SystemConfig.VirtualDirectoryPath + "/StudentEvaluation/Edit?a=1"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }); //新增 function EvaluationStudent_Add() { showDialog(); } function reload() { $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgList").cmsXDataTable("getSelections"), function (index) { d.push(this.EntityID); }); return d; } //点击列表更新 function edit(rowindex, rowdata) { showDialog(rowdata.EntityID); } //修改按钮 function EvaluationStudent_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要修改的学生评价信息!"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } showDialog(d); } function showDialog(id) { var redirectTo = url; if (id) { redirectTo = redirectTo + '&id=' + id; } $.popupTopWindow('学生评价信息', redirectTo, 800, 500, null, null); } //删除 function EvaluationStudent_Delete() { var selected = $("#dgList").cmsXDataTable("getSelections"); if (selected.length == 0) { $.messager.alert("系统提示", "请选择您要删除的学生评价信息!"); return; } var ids = []; for (var i = 0; i < selected.length; i++) { // if (selected[i].EntityApprovalStatus != 0 && selected[i].EntityApprovalStatus != 100) { // $.messager.alert("系统提示", "只能删除未提交、已退回状态的异动申请信息!"); // return; // } ids.push(selected[i].EntityID); } $.messager.confirm("系统提示", "您确定要删除该学生评价信息?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentEvaluation/Delete', { ids: ids.join(',') }, function (data) { if (data == "删除成功") { $.messager.alert("系统提示", "删除成功!"); $("#dgList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } function EvaluationStudent_Export() { $("#formQuery").submit(); } function QueryCampusDropdownList(data) { $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + ""); reload(); } function QueryCollegeDropdownList(data) { reload(); }