123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudentSettingDetail/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgEvaluationStudentSettingDetailList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationStudentSettingDetailList"));
- }
- //获取选中的数据All
- function validChooseAll() {
- var d = [];
- $.each($("#dgEvaluationStudentSettingDetailList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgEvaluationStudentSettingDetailList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.UserID);
- });
- return d;
- }
- //删除(暂时无效)
- function EvaluationStudentSettingDetail_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- var id = validChooseAll();
- if ($.grep(id, function (v, i) { return v.OpenState == true; }).length > 0) {
- $.messager.alert("系统提示", "只能对未开放状态的信息进行删除。");
- return;
- }
- if ($.grep(id, function (v, i) { return v.IsEvaluation == true; }).length > 0) {
- $.messager.alert("系统提示", "只能对未评状态的信息进行删除。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudentSettingDetail/Delete', { evaluationStudentSettingIDs: d, userIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgEvaluationStudentSettingDetailList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //设置相应的行颜色为红色
- function SetRedGrid(rowIndex, rowData) {
- if (rowData.OpenState != true) {
- return "color: red;";
- }
- else {
- return "";
- }
- }
- //导出Excel
- function EvaluationStudentSettingDetail_Export() {
- $("#formQuery").submit();
- }
- //联动查询
- function queryCampus(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- reload();
- }
- function queryCollege(data) {
- reload();
- }
- function queryDepartment(data) {
- var departmentID = $("#DepartmentDropdown").combogridX("getValue"); //combobox
- var jsonString = "({'QueryParamsDatas':'DepartmentDropdown|*|" + departmentID + "|@|'})";
- $("#StaffComboGrid").combogridX("reload", eval(jsonString));
- reload();
- }
|