//加载 $(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)); } } var score = $("#Score").val(); if (score == "" || score == null) { $("#Score").val(""); } else { if (!reg.test(score)) { $("#Score").val(""); } else { $("#Score").val(parseFloat(score).toFixed(1)); } } $("#specialtyExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#specialtyExpander").attr("expanded", "1"); $("#profileExpander").closest("tr") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "none"); $("#profileExpander").attr("expanded", "1"); $("#contactExpander").closest("tr") .next().css("display", "") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none"); $("#contactExpander").attr("expanded", "1"); $("#accountExpander").closest("tr") .next().css("display", ""); $("#accountExpander").attr("expanded", "1"); $("#recruitExpander").closest("tr") .next().css("display", "") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none"); $("#recruitExpander").attr("expanded", "1"); $("#otherExpander").closest("tr") .next().css("display", "") .next().css("display", ""); $("#otherExpander").attr("expanded", "1"); }); //点击收缩(专业班级信息) function swapSpecialty() { if ($("#specialtyExpander").attr("expanded") == "1") { $("#specialtyExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#specialtyExpander").closest("tr") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", ""); $("#specialtyExpander").attr("expanded", "0"); } else { $("#specialtyExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#specialtyExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#specialtyExpander").attr("expanded", "1"); } } //点击收缩(学生扩展信息) function swapProfile() { if ($("#profileExpander").attr("expanded") == "1") { $("#profileExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#profileExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#profileExpander").attr("expanded", "0"); } else { $("#profileExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#profileExpander").closest("tr") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "none"); $("#profileExpander").attr("expanded", "1"); } } //点击收缩(学生联系信息) function swapContact() { if ($("#contactExpander").attr("expanded") == "1") { $("#contactExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#contactExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#contactExpander").attr("expanded", "0"); } else { $("#contactExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#contactExpander").closest("tr") .next().css("display", "") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none"); $("#contactExpander").attr("expanded", "1"); } } //点击收缩(学生缴费信息) function swapAccount() { if ($("#accountExpander").attr("expanded") == "1") { $("#accountExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#accountExpander").closest("tr") .next().css("display", ""); $("#accountExpander").attr("expanded", "0"); } else { $("#accountExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#accountExpander").closest("tr") .next().css("display", ""); $("#accountExpander").attr("expanded", "1"); } } //点击收缩(高考招生信息) function swapRecruit() { if ($("#recruitExpander").attr("expanded") == "1") { $("#recruitExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#recruitExpander").closest("tr") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", "") .next().css("display", ""); $("#recruitExpander").attr("expanded", "0"); } else { $("#recruitExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#recruitExpander").closest("tr") .next().css("display", "") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none") .next().css("display", "none"); $("#recruitExpander").attr("expanded", "1"); } } //点击收缩(其它信息) function swapOther() { if ($("#otherExpander").attr("expanded") == "1") { $("#otherExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0"); $("#otherExpander").closest("tr") .next().css("display", "none") .next().css("display", ""); $("#otherExpander").attr("expanded", "0"); } else { $("#otherExpander").css("background", "url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0"); $("#otherExpander").closest("tr") .next().css("display", "") .next().css("display", ""); $("#otherExpander").attr("expanded", "1"); } } //保存 function Student_Save() { var certificatesType = $("#CertificatesType").combogridX("getValue"); var iDNumber = $.trim($("#IDNumber").val()); if (iDNumber != "") { if (certificatesType == "" || certificatesType == "-1" || certificatesType == null) { $.messager.alert("系统提示", "请选择对应的证件类型。"); return; } } $(document.forms[0]).submit(); } //删除照片(单个删除) function delPhoto() { var userID = $("#UserID").val(); $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Student/DeletePhoto', { userID: userID }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", data.Message); $("#imgPhoto").attr('src', ''); } else { $.messager.alert("系统提示", data.Message); } }); } //联动 function queryClassmajor(data) { var classmajorID = $("#ClassmajorID").combogridX("getValue"); if (classmajorID == "" || classmajorID == "-1" || classmajorID == null) { $("#GradeID").combogridX("setValue", "-1"); $("#StandardID").combogridX("setValue", "-1"); $("#StandardCode").val(""); $("#EducationID").combogridX("setValue", "-1"); $("#LearningformID").combogridX("setValue", "-1"); $("#LearnSystem").val(""); $("#CollegeID").combogridX("setValue", "-1"); $("#PlanningGraduateDate").val(""); $("#GraduateDate").val(""); } else { $("#GradeID").combogridX("setValue", data.GradeID); $("#StandardID").combogridX("setValue", data.StandardID); $("#StandardCode").val(data.StandardCode); $("#EducationID").combogridX("setValue", data.EducationID); $("#LearningformID").combogridX("setValue", data.LearningformID); $("#LearnSystem").val(data.LearnSystem); $("#CollegeID").combogridX("setValue", data.CollegeID); $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Student/GetPlanningGraduateDate', { grademajorID: data.GrademajorID }, function (data) { if (data != null) { $("#PlanningGraduateDate").val(data); } else { $("#PlanningGraduateDate").val(""); } }); $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Student/GetGraduateDate', { grademajorID: data.GrademajorID }, function (data) { if (data != null) { $("#GraduateDate").val(data); } else { $("#GraduateDate").val(""); } }); } }