123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- //加载
- $(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");
- $("#otherExpander").closest("tr")
- .next().css("display", "none")
- .next().css("display", "")
- .next().css("display", "none")
- .next().css("display", "none")
- .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", "")
- .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 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", "")
- .next().css("display", "")
- .next().css("display", "")
- .next().css("display", "")
- .next().css("display", "")
- .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", "none")
- .next().css("display", "")
- .next().css("display", "none")
- .next().css("display", "none")
- .next().css("display", "")
- .next().css("display", "");
- $("#otherExpander").attr("expanded", "1");
- }
- }
- //联动
- function querySpecialty(data) {
- var specialtyID = $("#SpecialtyID").combogridX("getValue");
- if (specialtyID == "" || specialtyID == "-1" || specialtyID == null) {
- $("#Code").val("");
- $("#EducationID").combogridX("setValue", "-1");
- $("#LearningformID").combogridX("setValue", "-1");
- $("#LearnSystem").val("");
- }
- else {
- $("#Code").val(data.Code);
- $("#EducationID").combogridX("setValue", data.EducationID);
- $("#LearningformID").combogridX("setValue", data.LearningformID);
- $("#LearnSystem").val(data.LearnSystem);
- }
- }
|