123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- //刷新
- function reload() {
- $("#dgGrademajorNoAddList").cmsXDataTable("load", $.getDataGridParams("dgGrademajorNoAddList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgGrademajorNoAddList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.GrademajorID);
- });
- return d;
- }
- //获取选中的数据All
- function validChooseAll() {
- var d = [];
- $.each($("#dgGrademajorNoAddList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //确定生成成功后不关闭弹出页面
- function formSuccessReloadNoClose(data) {
- if (data.IsSuccess == true) {
- reload();
- }
- $.messager.alert("系统提示", data.Message);
- }
- //确定
- function EvaluationGradeControlBatchAdd_Confirm() {
- var schoolyearID = $("#SchoolyearID").combobox("getValue");
- if (schoolyearID == "" || schoolyearID == "-1" || schoolyearID == null) {
- $.messager.alert("系统提示", "请选择学年学期。");
- return;
- }
- var number = $("#Number").val();
- if (number == "" || number == null) {
- $.messager.alert("系统提示", "可评次数不能为空。");
- return;
- }
- var startDate = $("#StartTime").val();
- var endDate = $("#EndTime").val();
- if (startDate == "" || startDate == null) {
- $.messager.alert("系统提示", "开始时间不能为空。");
- return;
- }
- if (endDate == "" || endDate == null) {
- $.messager.alert("系统提示", "结束时间不能为空。");
- return;
- }
- var sd = new Date(startDate.replace(/\-/g, "\/"));
- var ed = new Date(endDate.replace(/\-/g, "\/"));
- if (startDate != "" && endDate != "" && sd >= ed) {
- $.messager.alert("系统提示", "结束时间不能小于开始时间。");
- return;
- }
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要新增的年级专业信息。");
- return;
- }
- $("#grademajorIDList").val(JSON.stringify(d));
- $(document.forms[0]).submit();
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //联动查询
- 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 queryStandard(data) {
- queryClass();
- }
- function queryClass() {
- var jsonString = "";
- var parameterString = "";
- var campusID = $("#CampusDropdown").combogridX("getValue");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- var standardID = $("#DictionaryStandard").combogridX("getValue");
- var educationID = $("#DictionaryEducation").combogridX("getValue");
- var learningformID = $("#DictionaryLearningform").combogridX("getValue");
- if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
- if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#DictionaryStandard").combogridX("reload", eval(jsonString));
- }
- else {
- $("#DictionaryStandard").combogridX("reload");
- }
- reload();
- }
|