//加载 $(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) { //$("#SchoolyearID").combobox("setValue", "-1"); //$("#StandardID").combogridX("setValue", "-1"); $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); $("#GrademajorID").combogridX("setValue", "-1"); } else { //$("#SchoolyearID").combobox("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 querySchoolyear(data) { var schoolYearID = $("#SchoolyearID").combobox("getValue"); if (schoolYearID == "" || schoolYearID == "-1" || schoolYearID == 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"); $("#SchoolyearID").combobox("setValue", "-1"); $("#StandardID").combogridX("setValue", "-1"); $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); } else { $("#CollegeID").combogridX("setValue", data.CollegeID); $("#SchoolyearID").combobox("setValue", data.SchoolyearID); $("#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 schoolYearID = $("#SchoolyearID").combobox("getValue"); var standardID = $("#StandardID").combogridX("getValue"); var educationID = $("#EducationID").combogridX("getValue"); var learningFormID = $("#LearningformID").combogridX("getValue"); if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (schoolYearID != nonSelect) parameterString += "DictionarySchoolyear|*|" + schoolYearID + "|@|"; 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"); } }