ScoreConvertByApplyEdit.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. function ScoreConvertByApply_Save() {
  7. $(document.forms[0]).submit();
  8. }
  9. function queryCourse() {
  10. try {
  11. var userID = $("#UserID").combogridX("getValue");
  12. var jsonString = "({'QueryParamsDatas':'";
  13. if (userID != "" && userID != nonSelect) {
  14. jsonString += "cbgUserID|*|" + userID + "|@|";
  15. }
  16. jsonString += "'})";
  17. //$("#SourceCoursematerialID").combogridX("reload", eval(jsonString));
  18. $("#CoursematerialID").combogridX("reload", eval(jsonString));
  19. } catch (e) {
  20. }
  21. }
  22. function queryStandard() {
  23. try {
  24. var collegeID = $("#CollegeID").combogridX("getValue");
  25. var yearID = $("#YearID").combobox("getValue");
  26. var jsonString = "({'QueryParamsDatas':'";
  27. if (collegeID != "" && collegeID != nonSelect) {
  28. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  29. }
  30. if (yearID != nonSelect) {
  31. jsonString += "DictionaryGrade|*|" + yearID + "|@|";
  32. }
  33. jsonString += "'})";
  34. $("#StandardID").combogridX("reload", eval(jsonString));
  35. } catch (e) {
  36. }
  37. }
  38. function queryClass() {
  39. try {
  40. var collegeID = $("#CollegeID").combogridX("getValue");
  41. var yearID = $("#YearID").combobox("getValue");
  42. var standardID = $("#StandardID").combogridX("getValue");
  43. var jsonString = "({'QueryParamsDatas':'";
  44. if (collegeID != "" && collegeID != nonSelect) {
  45. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  46. }
  47. if (yearID != nonSelect) {
  48. jsonString += "DictionaryGrade|*|" + yearID + "|@|";
  49. }
  50. if (standardID != "" && standardID != nonSelect) {
  51. jsonString += "DictionaryStandard|*|" + standardID + "|@|";
  52. }
  53. jsonString += "'})";
  54. $("#ClassmajorID").combogridX("reload", eval(jsonString));
  55. } catch (e) {
  56. }
  57. }
  58. function queryUser() {
  59. try {
  60. var collegeID = $("#CollegeID").combogridX("getValue");
  61. var yearID = $("#YearID").combobox("getValue");
  62. var standardID = $("#StandardID").combogridX("getValue");
  63. var classmajorID = $("#ClassmajorID").combogridX("getValue");
  64. var jsonString = "({'QueryParamsDatas':'";
  65. if (collegeID != "" && collegeID != nonSelect) {
  66. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  67. }
  68. if (yearID != nonSelect) {
  69. jsonString += "SchoolyearDictionaryDropDown|*|" + yearID + "|@|";
  70. }
  71. if (standardID != "" && standardID != nonSelect) {
  72. jsonString += "StandardDictionaryDropDown|*|" + standardID + "|@|";
  73. }
  74. if (classmajorID != "" && classmajorID != nonSelect) {
  75. jsonString += "ClassmajorDropdown|*|" + classmajorID + "|@|";
  76. }
  77. jsonString += "'})";
  78. $("#UserID").combogridX("reload", eval(jsonString));
  79. } catch (e) {
  80. }
  81. }
  82. //function querySourceScore() {
  83. // try {
  84. // var userID = $("#UserID").combogridX("getValue");
  85. // var sourceCoursematerialID = $("#SourceCoursematerialID").combogridX("getValue");
  86. // $.post(CMS_SystemConfig.VirtualDirectoryPath + "/ScoreConvert/SourceCoursematerialView", { userID: userID, coursematerialID: sourceCoursematerialID },
  87. // function (data) {
  88. // if (data.IsSuccess) {
  89. // $("#SourceTotalHours").val(Data.TotalHours);
  90. // $("#txtTotalScore").val(Data.TotalScore);
  91. // $("#TotalScore").val(Data.TotalScore);
  92. // } else {
  93. // $.messager.alert("系统信息", data.Message);
  94. // }
  95. // })
  96. // } catch (e) {
  97. // }
  98. //}
  99. function queryScore() {
  100. try {
  101. var userID = $("#UserID").combogridX("getValue");
  102. var coursematerial = $("#CoursematerialID").combogridX("getSelectedRow");
  103. $("#TotalHours").val(coursematerial.Totalhours);
  104. } catch (e) {
  105. }
  106. }
  107. function ScoreConvertByApply_Upload() {
  108. var scoreConvertByApplyID = $("#ScoreConvertByApplyID").val();
  109. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ScoreConvert/Upload?scoreConvertByApplyID=" + scoreConvertByApplyID + "&MNU=" + mnu;
  110. $.popupTopWindow('附件上传', redirectTo, 700, 400, setAttachment);
  111. }
  112. function setAttachment() {
  113. $.ajaxSetup({
  114. async: false
  115. });
  116. var fileList;
  117. var scoreConvertByApplyID = $("#ScoreConvertByApplyID").val();
  118. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ScoreConvert/GetFileListByConvertID', { scoreConvertByApplyID: scoreConvertByApplyID }, function (data) {
  119. fileList = data;
  120. });
  121. var count = fileList.length;
  122. var nameStr = "";
  123. var detailID;
  124. for (var i = 0; i < count; i++) {
  125. detailID = fileList[i].FormID;
  126. var name = fileList[i].FileName;
  127. nameStr = nameStr + "、" + name;
  128. }
  129. if (detailID != null) {
  130. $("#IsChangeAttachment").val(1);
  131. }
  132. nameStr = nameStr.substr(1, (nameStr.length - 1));
  133. $("#UploadAttachmentName").val(nameStr);
  134. }