PersonalScoreAdd.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/PersonalScore/NewList";
  2. var mnu = "";
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function PersonScore_Save() {
  7. var userID = $.SystemGeneral.getUrlParam("UserID");
  8. var windowID = $.SystemGeneral.getUrlParam("WindowID");
  9. var coursematerialID = $("#CoursematerialID").combogridX("getValue");
  10. var examsCategoryID = $("#ExamsCategoryID").combobox("getValue");
  11. var startTermID = $("#StarttermID").combobox("getValue");
  12. var changedUserID = $("#UserID").combogridX("getValue");
  13. top.$("#" + windowID).data("resultData", changedUserID);
  14. //$("#changedUserID", window.parent.document).attr("value", changedUserID);
  15. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentScore/ValidateDuplicate', {
  16. submitedScoreID: $.SystemGeneral.getUrlParam("SubmitedScoreID"),
  17. userID: userID,
  18. coursematerialID: coursematerialID,
  19. examsCategoryID: examsCategoryID,
  20. startTermID: startTermID
  21. }, function (data) {
  22. if (data.IsSuccess) {
  23. $(document.forms[0]).submit();
  24. } else {
  25. $.messager.confirm('提示', data.Message, function (r) {
  26. if (r) {
  27. $(document.forms[0]).submit();
  28. }
  29. });
  30. }
  31. });
  32. }
  33. function GetClassName(){
  34. var userID = $("#UserID").combogridX("getValue");
  35. var className = "";
  36. var url = CMS_SystemConfig.VirtualDirectoryPath + '/PersonalScore/GetClassNameByUserID';
  37. if (userID != null && userID != "") {
  38. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/PersonalScore/GetClassNameByUserID', {
  39. userID: userID,
  40. }, function (data) {
  41. //alert(data.Message);
  42. document.getElementById("ClassName").value = data.Message;
  43. //$("#ClassName").attr("value", data.Message);
  44. });
  45. // $.ajax({
  46. // type: "POST",
  47. // url: url,
  48. // contentType: "application/json;charset=utf-8",
  49. // data: { userID: userID },
  50. // dataType: "json",
  51. // async: false,
  52. // success: function (data) {
  53. // debugger;
  54. // if (data.IsSuccess) {
  55. // className = data.Message;
  56. // }
  57. // }
  58. // })
  59. }
  60. }
  61. function StudentScore_Save() {
  62. var userID = $("#UserID").combogridX("getValue");
  63. var coursematerialID = $("#CoursematerialID").combogridX("getValue");
  64. var examsCategoryID = $("#ExamsCategoryID").combobox("getValue");
  65. var startTermID = $("#StarttermID").combobox("getValue");
  66. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentScore/ValidateDuplicate', {
  67. submitedScoreID: $.SystemGeneral.getUrlParam("submitedScoreID"),
  68. userID: userID,
  69. coursematerialID: coursematerialID,
  70. examsCategoryID: examsCategoryID,
  71. startTermID: startTermID
  72. }, function (data) {
  73. if (data.IsSuccess) {
  74. $(document.forms[0]).submit();
  75. } else {
  76. $.messager.confirm('提示', data.Message, function (r) {
  77. if (r) {
  78. $(document.forms[0]).submit();
  79. }
  80. });
  81. }
  82. });
  83. }
  84. function selectSchoolyearNum() {
  85. var schoolyearNum = $("#SchoolyearNumID").combobox("getValue");
  86. var startTermObj = $("#StarttermID");
  87. var startTerm = startTermObj.combobox("getValue");
  88. if (startTerm > (schoolyearNum * 2) || startTerm < ((schoolyearNum - 1) * 2)) {
  89. startTermObj.combobox("setValue", (schoolyearNum * 2) - 1);
  90. }
  91. }
  92. function selectStartTerm() {
  93. var schoolyearNumObj = $("#SchoolyearNumID");
  94. var startTermObj = $("#StarttermID");
  95. var startTerm = startTermObj.combobox("getValue");
  96. schoolyearNumObj.combobox("setValue", Math.ceil(parseFloat(startTerm) / parseFloat(2)));
  97. }