StudentScoreConvertByApplyEdit.js 3.7 KB

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