//加载 $(function () { //非负浮点数(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/) var reg = /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/; var learnSystem = $("#LearnSystem").val(); if (learnSystem == "" || learnSystem == null) { $("#LearnSystem").val(""); } else { if (!reg.test(learnSystem)) { $("#LearnSystem").val(""); } else { $("#LearnSystem").val(parseFloat(learnSystem).toFixed(1)); } } }); //保存 function Classmajor_Save() { $(document.forms[0]).submit(); } //点击收缩(年级专业信息) function swapGrademajor() { if ($("#grademajorExpander").attr("expanded") == "1") { $("#grademajorExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#grademajorExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#grademajorExpander").attr("expanded", "0"); } else { $("#grademajorExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#grademajorExpander").closest("tr") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none"); $("#grademajorExpander").attr("expanded", "1"); } } //联动查询 function queryCollege(data) { var campusID = $("#CampusID").combogridX("getValue"); var collegeID = $("#CollegeID").combogridX("getValue"); if (collegeID == "" || collegeID == "-1" || collegeID == null) { //$("#GradeID").combogridX("setValue", "-1"); //combobox //$("#StandardID").combogridX("setValue", "-1"); $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); $("#GrademajorID").combogridX("setValue", "-1"); } else { //$("#GradeID").combogridX("setValue", "-1"); //$("#StandardID").combogridX("setValue", "-1"); $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); $("#GrademajorID").combogridX("setValue", "-1"); } var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|"; jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})"; $("#CollegeID").combogridX("reload", eval(jsonString)); $("#StandardID").combogridX("reload", eval(jsonString)); queryClass(); } function queryGrade(data) { var gradeID = $("#GradeID").combogridX("getValue"); if (gradeID == "" || gradeID == "-1" || gradeID == null) { //$("#StandardID").combogridX("setValue", "-1"); $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); $("#GrademajorID").combogridX("setValue", "-1"); } else { //$("#StandardID").combogridX("setValue", "-1"); $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); $("#GrademajorID").combogridX("setValue", "-1"); } queryClass(); } function queryStandard(data) { var standardID = $("#StandardID").combogridX("getValue"); if (standardID == "" || standardID == "-1" || standardID == null) { $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); $("#GrademajorID").combogridX("setValue", "-1"); } else { $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); $("#GrademajorID").combogridX("setValue", "-1"); } queryClass(); } function queryGrademajor(data) { var grademajorID = $("#GrademajorID").combogridX("getValue"); if (grademajorID == "" || grademajorID == "-1" || grademajorID == null) { $("#CollegeID").combogridX("setValue", "-1"); $("#GradeID").combogridX("setValue", "-1"); $("#StandardID").combogridX("setValue", "-1"); $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); } else { $("#CollegeID").combogridX("setValue", data.CollegeID); $("#GradeID").combogridX("setValue", data.GradeID); $("#StandardID").combogridX("setValue", data.StandardID); $("#EducationID").combogridX("setValue", data.EducationID); $("#LearningformID").combogridX("setValue", data.LearningformID); $("#LearnSystem").val(data.LearnSystem); } queryClass(); } function queryClass() { var jsonString = ""; var parameterString = ""; var collegeID = $("#CollegeID").combogridX("getValue"); var gradeID = $("#GradeID").combogridX("getValue"); var standardID = $("#StandardID").combogridX("getValue"); var educationID = $("#EducationID").combogridX("getValue"); var learningformID = $("#LearningformID").combogridX("getValue"); 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 (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#StandardID").combogridX("reload", eval(jsonString)); $("#GrademajorID").combogridX("reload", eval(jsonString)); } else { $("#StandardID").combogridX("reload"); $("#GrademajorID").combogridX("reload"); } }