CustomStandardSettingEdit.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 CustomStandardSetting_Save() {
  20. $(document.forms[0]).submit();
  21. }
  22. //联动
  23. function querySpecialty(data) {
  24. var specialtyID = $("#SpecialtyID").combogridX("getValue");
  25. if (specialtyID == "" || specialtyID == "-1" || specialtyID == null) {
  26. $("#StandardCode").val("");
  27. //$("#EducationID").combobox("setValue", "-1");
  28. $("#EducationID").combogridX("setValue", "-1");
  29. $("#LearningformID").combogridX("setValue", "-1");
  30. $("#LearnSystem").val("");
  31. $("#ScienceclassID").combogridX("setValue", "-1");
  32. }
  33. else {
  34. $("#StandardCode").val(data.Code);
  35. $("#EducationID").combogridX("setValue", data.EducationID);
  36. $("#LearningformID").combogridX("setValue", data.LearningformID);
  37. $("#LearnSystem").val(data.LearnSystem);
  38. $("#ScienceclassID").combogridX("setValue", data.ScienceclassID);
  39. }
  40. }