123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/GraduationCourse/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgGraduationCourseList").cmsXDataTable("load", $.getDataGridParams("dgGraduationCourseList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgGraduationCourseList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.GraduationCourseID);
- });
- return d;
- }
- //计划生成
- function GraduationCourse_Create() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/GraduationCourse/PlanCreate" + "?MNU=" + mnu;
- $.popupTopWindow('计划生成', redirectTo, 850, 550, reload, null);
- }
- //新增
- function GraduationCourse_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('毕业课程复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/GraduationCourse/CopyAdd?GraduationCourseID=' + d[0] + '&MNU=' + mnu, 650, 245, null, null);
- } else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('毕业课程新增', redirectTo, 650, 245, null, null);
- }
- }
- //修改
- function GraduationCourse_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?GraduationCourseID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('毕业课程修改', redirectTo, 650, 245, null, null);
- }
- //删除
- function GraduationCourse_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/GraduationCourse/Delete', { graduationCourseIDs: d }, function (data) {
- if (data == "删除成功。") {
- $.messager.alert("系统提示", data);
- $("#dgGraduationCourseList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //Excel导出
- function GraduationCourse_Export() {
- $("#formQuery").submit();
- }
- //联动查询
- function queryStandard(data) {
- 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));
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- queryClass();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combogridX("getValue");
- var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue");
- var standardID = $("#StandardDictionaryDropDown").combogridX("getValue");
- var learningFormID = $("#DictionaryLearningform").combogridX("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString));
- } else {
- $("#StandardDictionaryDropDown").combogridX("reload");
- }
- reload();
- }
|