var url = CMS_SystemConfig.VirtualDirectoryPath + "/CheckingApprove/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //刷新 function reload() { $("#dgStudentContrastList").cmsXDataTable("load", $.getDataGridParams("dgStudentContrastList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgStudentContrastList").cmsXDataTable("getSelections"), function (index) { d.push(this.StudentContrastID); }); return d; } //审核 function CheckingApprove_Approve() { var studentContrastIDs = validChoose(); if (studentContrastIDs.length == 0) { $.messager.alert("系统提示", "请选择您要审核的信息。"); return; } if (studentContrastIDs.length > 1) { //批量审核 var approveID = studentContrastIDs[0]; $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=CF_StudentContrast&FormID=' + approveID, 400, 300, CheckingApprove_ApproveConfirm); } else { var studentContrastID = studentContrastIDs; //单个审核 var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/CheckingApprove/Approve?MNU=" + mnu + "&studentContrastID=" + studentContrastID; $.popupTopWindow('校对审核', redirectTo, 750, 550, null, null); } } //确定(审核) function CheckingApprove_ApproveConfirm(action) { if (!action) { return; } if (action.ActionID == "") { return; } var approveIDs = validChoose().join(','); $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/CheckingApprove/ApproveConfirm", { studentContrastIDs: approveIDs, actionID: action.Action, comment: action.Comment }, function (data) { if (data.IsSuccess) { reload(); } $.messager.alert("系统提示", data.Message); }, 'json'); } //删除 function CheckingApprove_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/CheckingApprove/Delete', { studentContrastIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", data.Message); $("#dgStudentContrastList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } //校对明细 function editCheckingDetail(rowindex, rowdata) { redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/CheckingApprove/CheckingDetailList?studentContrastID=" + rowdata.StudentContrastID + "&MNU=" + mnu; $.popupTopWindow('校对明细', redirectTo, 950, 540, null, null); } //设置列颜色为红色 function SetRedColumn(index, row, value) { return " " + value + ""; } //Excel导出 function CheckingApprove_Export() { $("#formQuery").submit(); } //联动查询 function queryCampus(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})"; $("#CollegeDropdown").combogridX("reload", eval(jsonString)); queryClass(); } function queryCollege(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|"; jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})"; $("#CollegeDropdown").combogridX("reload", eval(jsonString)); $("#DictionaryStandard").combogridX("reload", eval(jsonString)); queryClass(); } function queryGrade(data) { queryClass(); } function queryStandard(data) { queryClass(); } function queryLearnSystem(data) { queryClass(); } function queryClass() { var jsonString = ""; var parameterString = ""; var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var gradeID = $("#DictionaryGrade").combogridX("getValue"); var standardID = $("#DictionaryStandard").combogridX("getValue"); var educationID = $("#DictionaryEducation").combogridX("getValue"); var learningformID = $("#DictionaryLearningform").combogridX("getValue"); var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue"); if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@|"; if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@|"; if (learnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + learnSystem + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#DictionaryStandard").combogridX("reload", eval(jsonString)); } else { $("#DictionaryStandard").combogridX("reload"); } reload(); }