ScoreConvertByReplaceEdit.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. function ScoreConvertByReplace_Save() {
  2. $(document.forms[0]).submit();
  3. }
  4. function queryStandard() {
  5. try {
  6. var collegeID = $("#CollegeID").combogridX("getValue");
  7. var yearID = $("#YearID").combobox("getValue");
  8. var jsonString = "({'QueryParamsDatas':'";
  9. if (collegeID != "" && collegeID != nonSelect) {
  10. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  11. }
  12. if (yearID != nonSelect) {
  13. jsonString += "DictionaryGrade|*|" + yearID + "|@|";
  14. }
  15. jsonString += "'})";
  16. $("#StandardID").combogridX("reload", eval(jsonString));
  17. } catch (e) {
  18. }
  19. }
  20. function queryClass() {
  21. try {
  22. var collegeID = $("#CollegeID").combogridX("getValue");
  23. var yearID = $("#YearID").combobox("getValue");
  24. var standardID = $("#StandardID").combogridX("getValue");
  25. var jsonString = "({'QueryParamsDatas':'";
  26. if (collegeID != "" && collegeID != nonSelect) {
  27. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  28. }
  29. if (yearID != nonSelect) {
  30. jsonString += "DictionaryGrade|*|" + yearID + "|@|";
  31. }
  32. if (standardID != "" && standardID != nonSelect) {
  33. jsonString += "DictionaryStandard|*|" + standardID + "|@|";
  34. }
  35. jsonString += "'})";
  36. $("#ClassmajorID").combogridX("reload", eval(jsonString));
  37. } catch (e) {
  38. }
  39. }
  40. function queryUser() {
  41. try {
  42. var collegeID = $("#CollegeID").combogridX("getValue");
  43. var yearID = $("#YearID").combobox("getValue");
  44. var standardID = $("#StandardID").combogridX("getValue");
  45. var classmajorID = $("#ClassmajorID").combogridX("getValue");
  46. var jsonString = "({'QueryParamsDatas':'";
  47. if (collegeID != "" && collegeID != nonSelect) {
  48. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  49. }
  50. if (yearID != nonSelect) {
  51. jsonString += "SchoolyearDictionaryDropDown|*|" + yearID + "|@|";
  52. }
  53. if (standardID != "" && standardID != nonSelect) {
  54. jsonString += "StandardDictionaryDropDown|*|" + standardID + "|@|";
  55. }
  56. if (classmajorID != "" && classmajorID != nonSelect) {
  57. jsonString += "ClassmajorDropdown|*|" + classmajorID + "|@|";
  58. }
  59. jsonString += "'})";
  60. $("#UserID").combogridX("reload", eval(jsonString));
  61. } catch (e) {
  62. }
  63. }
  64. function queryCourse() {
  65. try {
  66. var userID = $("#UserID").combogridX("getValue");
  67. var jsonString = "({'QueryParamsDatas':'";
  68. if (userID != "" && userID != nonSelect) {
  69. jsonString += "cbgUserID|*|" + userID + "|@|";
  70. } else {
  71. return;
  72. }
  73. jsonString += "'})";
  74. $("#SourceCoursematerialID").combogridX("reload", eval(jsonString));
  75. $("#TargetCoursematerialID").combogridX("reload", eval(jsonString));
  76. } catch (e) {
  77. }
  78. }
  79. function querySourceScore() {
  80. try {
  81. var userID = $("#UserID").combogridX("getValue");
  82. var sourceCoursematerialID = $("#SourceCoursematerialID").combogridX("getValue");
  83. $.post(CMS_SystemConfig.VirtualDirectoryPath + "/ScoreConvert/SourceCoursematerialView", { userID: userID, coursematerialID: sourceCoursematerialID },
  84. function (data) {
  85. if (data.IsSuccess) {
  86. $("#SourceTotalHours").val(data.Data.TotalHours);
  87. $("#txtTotalScore").val(data.Data.TotalScore);
  88. $("#TotalScore").val(data.Data.TotalScore);
  89. } else {
  90. $.messager.alert("系统信息", data.Message);
  91. }
  92. })
  93. } catch (e) {
  94. }
  95. }
  96. function queryTargetScore() {
  97. try {
  98. var userID = $("#UserID").combogridX("getValue");
  99. var targetCoursematerial = $("#TargetCoursematerialID").combogridX("getSelectedRow");
  100. $("#TargetTotalHours").val(targetCoursematerial.Totalhours);
  101. } catch (e) {
  102. }
  103. }
  104. $.parser.onComplete = function () {
  105. $("#CollegeID").combogridX("reload", CMS_SystemConfig.VirtualDirectoryPath + '/College/List');
  106. queryStandard();
  107. };
  108. $(function () {
  109. });