EvaluationGradeControlEdit.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //加载
  2. $(function () {
  3. //非负浮点数(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/)
  4. var reg = /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/;
  5. var learnSystem = $("#LearnSystem").val();
  6. if (learnSystem == "" || learnSystem == null) {
  7. $("#LearnSystem").val("");
  8. }
  9. else {
  10. if (!reg.test(learnSystem)) {
  11. $("#LearnSystem").val("");
  12. }
  13. else {
  14. $("#LearnSystem").val(parseFloat(learnSystem).toFixed(1));
  15. }
  16. }
  17. });
  18. //联动
  19. function queryGrademajor(data) {
  20. var grademajorID = $("#GrademajorID").combogridX("getValue");
  21. if (grademajorID == "" || grademajorID == "-1" || grademajorID == null) {
  22. $("#GradeID").combogridX("setValue", "-1");
  23. $("#StandardID").combogridX("setValue", "-1");
  24. $("#StandardCode").val("");
  25. $("#EducationID").combogridX("setValue", "-1");
  26. $("#LearningformID").combogridX("setValue", "-1");
  27. $("#LearnSystem").val("");
  28. $("#CollegeID").combogridX("setValue", "-1");
  29. }
  30. else {
  31. $("#GradeID").combogridX("setValue", data.GradeID);
  32. $("#StandardID").combogridX("setValue", data.StandardID);
  33. $("#StandardCode").val(data.StandardCode);
  34. $("#EducationID").combogridX("setValue", data.EducationID);
  35. $("#LearningformID").combogridX("setValue", data.LearningformID);
  36. $("#LearnSystem").val(data.LearnSystem);
  37. $("#CollegeID").combogridX("setValue", data.CollegeID);
  38. }
  39. }
  40. //保存
  41. function EvaluationGradeControl_Save() {
  42. $(document.forms[0]).submit();
  43. }