//加载 $(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 beforeLearnSystem = $("#BeforeLearnSystem").val(); if (beforeLearnSystem == "" || beforeLearnSystem == null) { $("#BeforeLearnSystem").val(""); } else { if (!reg.test(beforeLearnSystem)) { $("#BeforeLearnSystem").val(""); } else { $("#BeforeLearnSystem").val(parseFloat(beforeLearnSystem).toFixed(1)); } } var afterLearnSystem = $("#AfterLearnSystem").val(); if (afterLearnSystem == "" || afterLearnSystem == null) { $("#AfterLearnSystem").val(""); } else { if (!reg.test(afterLearnSystem)) { $("#AfterLearnSystem").val(""); } else { $("#AfterLearnSystem").val(parseFloat(afterLearnSystem).toFixed(1)); } } $("#beforeExpander").closest("tr") .next().css("display", "none") .next().css("display", "") .next().css("display", "none") .next().css("display", "") .next().css("display", ""); $("#beforeExpander").attr("expanded", "0"); $("#afterExpander").closest("tr") .next().css("display", "none") .next().css("display", "") .next().css("display", "none") .next().css("display", "") .next().css("display", ""); $("#afterExpander").attr("expanded", "0"); }); //点击收缩(异动前信息) function swapBefore() { if ($("#beforeExpander").attr("expanded") == "1") { $("#beforeExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#beforeExpander").closest("tr") .next().css("display", "none") .next().css("display", "") .next().css("display", "none") .next().css("display", "") .next().css("display", ""); $("#beforeExpander").attr("expanded", "0"); } else { $("#beforeExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#beforeExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#beforeExpander").attr("expanded", "1"); } } //点击收缩(异动后信息) function swapAfter() { if ($("#afterExpander").attr("expanded") == "1") { $("#afterExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#afterExpander").closest("tr") .next().css("display", "none") .next().css("display", "") .next().css("display", "none") .next().css("display", "") .next().css("display", ""); $("#afterExpander").attr("expanded", "0"); } else { $("#afterExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#afterExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#afterExpander").attr("expanded", "1"); } } //学生信息 function queryStudent(data) { var userID = $("#UserID").combogridX("getValue"); if (userID == "" || userID == "-1" || userID == null) { $("#Name").val(""); $("#SexID").combogridX("setValue", "-1"); $("#BeforeCollegeID").combogridX("setValue", "-1"); $("#BeforeGradeID").combogridX("setValue", "-1"); $("#BeforeStandardID").combogridX("setValue", "-1"); $("#BeforeStandardCode").val(""); $("#BeforeEducationID").combogridX("setValue", "-1"); $("#BeforeLearningformID").combogridX("setValue", "-1"); $("#BeforeLearnSystem").val(""); $("#BeforeClassmajorID").combogridX("setValue", "-1"); $("#BeforeInSchoolStatusID").combogridX("setValue", "-1"); $("#BeforeStudentStatus").combogridX("setValue", "-1"); $("#AfterCollegeID").combogridX("setValue", "-1"); $("#AfterGradeID").combogridX("setValue", "-1"); $("#AfterStandardID").combogridX("setValue", "-1"); $("#AfterStandardCode").val(""); $("#AfterEducationID").combogridX("setValue", "-1"); $("#AfterLearningformID").combogridX("setValue", "-1"); $("#AfterLearnSystem").val(""); $("#AfterClassmajorID").combogridX("setValue", "-1"); $("#AfterInSchoolStatusID").combogridX("setValue", "-1"); $("#AfterStudentStatus").combogridX("setValue", "-1"); } else { $("#Name").val(data.Name); $("#SexID").combogridX("setValue", data.SexID); $("#BeforeCollegeID").combogridX("setValue", data.CollegeID); $("#BeforeGradeID").combogridX("setValue", data.GradeID); $("#BeforeStandardID").combogridX("setValue", data.StandardID); $("#BeforeStandardCode").val(data.StandardCode); $("#BeforeEducationID").combogridX("setValue", data.EducationID); $("#BeforeLearningformID").combogridX("setValue", data.LearningformID); $("#BeforeLearnSystem").val(data.LearnSystem); $("#BeforeClassmajorID").combogridX("setValue", data.ClassmajorID); $("#BeforeInSchoolStatusID").combogridX("setValue", data.InSchoolStatusID); $("#BeforeStudentStatus").combogridX("setValue", data.StudentStatus); $("#AfterCollegeID").combogridX("setValue", data.CollegeID); $("#AfterGradeID").combogridX("setValue", data.GradeID); $("#AfterStandardID").combogridX("setValue", data.StandardID); $("#AfterStandardCode").val(data.StandardCode); $("#AfterEducationID").combogridX("setValue", data.EducationID); $("#AfterLearningformID").combogridX("setValue", data.LearningformID); $("#AfterLearnSystem").val(data.LearnSystem); $("#AfterClassmajorID").combogridX("setValue", data.ClassmajorID); $("#AfterInSchoolStatusID").combogridX("setValue", data.InSchoolStatusID); $("#AfterStudentStatus").combogridX("setValue", data.StudentStatus); } } //院系所(异动后) function queryAfterCollege(data) { var afterCollegeID = $("#AfterCollegeID").combogridX("getValue"); if (afterCollegeID == "" || afterCollegeID == "-1" || afterCollegeID == null) { $("#AfterClassmajorID").combogridX("setValue", "-1"); } else { $("#AfterClassmajorID").combogridX("setValue", "-1"); } queryAfterClass(); } //专业名称(异动后) function queryAfterStandard(data) { var afterStandardID = $("#AfterStandardID").combogridX("getValue"); if (afterStandardID == "" || afterStandardID == "-1" || afterStandardID == null) { $("#AfterStandardCode").val(""); $("#AfterClassmajorID").combogridX("setValue", "-1"); } else { $("#AfterStandardCode").val(data.Code); $("#AfterClassmajorID").combogridX("setValue", "-1"); } queryAfterClass(); } //班级名称(异动后) function queryAfterClassmajor(data) { queryAfterClass() var afterClassmajorID = $("#AfterClassmajorID").combogridX("getValue"); if (afterClassmajorID == "" || afterClassmajorID == "-1" || afterClassmajorID == null) { $("#AfterCollegeID").combogridX("setValue", "-1"); $("#AfterStandardID").combogridX("setValue", "-1"); $("#AfterStandardCode").val(""); $("#AfterClassmajorID").combogridX("setValue", "-1"); } else { $("#AfterCollegeID").combogridX("setValue", data.CollegeID); $("#AfterGradeID").combogridX("setValue", data.SchoolyearID); $("#AfterStandardID").combogridX("setValue", data.StandardID); $("#AfterStandardCode").val(data.StandardCode); $("#AfterEducationID").combogridX("setValue", data.EducationID); $("#AfterLearningformID").combogridX("setValue", data.LearningformID); $("#AfterLearnSystem").val(data.LearnSystem); $("#AfterClassmajorID").combogridX("setValue", data.ClassmajorID); } } //联动查询 function queryAfterClass() { var jsonString = ""; var parameterString = ""; var afterCollegeID = $("#AfterCollegeID").combogridX("getValue"); var afterGradeID = $("#AfterGradeID").combogridX("getValue"); var afterStandardID = $("#AfterStandardID").combogridX("getValue"); var afterEducationID = $("#AfterEducationID").combogridX("getValue"); var afterLearningformID = $("#AfterLearningformID").combogridX("getValue"); if (afterCollegeID != nonSelect) parameterString += "CollegeDropdown|*|" + afterCollegeID + "|@|"; if (afterGradeID != nonSelect) parameterString += "DictionaryGrade|*|" + afterGradeID + "|@|"; if (afterStandardID != nonSelect) parameterString += "DictionaryStandard|*|" + afterStandardID + "|@|"; if (afterEducationID != nonSelect) parameterString += "DictionaryEducation|*|" + afterEducationID + "|@|"; if (afterLearningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + afterLearningformID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#AfterClassmajorID").combogridX("reload", eval(jsonString)); } else { $("#AfterClassmajorID").combogridX("reload"); } } //设置列颜色为红色 function SetRedColumn(index, row, value) { return " " + value + ""; } //提交(审核) function ChangeApprove_Submit() { var actionValue = $("#ddlAction").combobox("getValue"); if (actionValue == "-1" || actionValue == "") { $.messager.alert("系统提示", "必须选择一个动作才能提交。"); return; } $(document.forms[0]).submit(); }