GraduateCardApply.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardApply/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgGraduateCardApplyList").cmsXDataTable("load", $.getDataGridParams("dgGraduateCardApplyList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgGraduateCardApplyList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.GraduateCardApplyID);
  16. });
  17. return d;
  18. }
  19. //名单生成
  20. function GraduateCardApply_Create() {
  21. $.messager.confirm("系统提示", "您确定要生成当前毕业学期(" + gradSchoolYearCode + ")的毕业去向申请信息?", function (r) {
  22. if (r) {
  23. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardApply/GraduateCardApplyCreate", $.getDataGridParams("dgGraduateCardApplyList"), function (data) {
  24. if (data.IsSuccess) {
  25. $.messager.alert("系统提示", data.Message);
  26. $("#dgGraduateCardApplyList").cmsXDataTable('load');
  27. } else {
  28. $.messager.alert("系统提示", data.Message);
  29. }
  30. });
  31. }
  32. });
  33. }
  34. //新增
  35. function GraduateCardApply_Add() {
  36. //var d = validChoose();
  37. //if (d.length > 0) {
  38. // $.popupTopWindow('去向申请复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/GraduateCardApply/CopyAdd?graduateCardApplyID=' + d[0] + '&MNU=' + mnu, 680, 385, null, null);
  39. //} else {
  40. // var redirectTo = url + "?MNU=" + mnu;
  41. // $.popupTopWindow('去向申请新增', redirectTo, 680, 385, null, null);
  42. //}
  43. //采用以下方式进行新增
  44. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardApply/GraduateCardApplyBatchAdd" + "?MNU=" + mnu;
  45. $.popupTopWindow('去向申请新增', redirectTo, 860, 530, reload, null);
  46. }
  47. //修改
  48. function GraduateCardApply_Edit() {
  49. var d = validChoose();
  50. if (d.length == 0) {
  51. $.messager.alert("系统信息", "请选择您要修改的信息。");
  52. return;
  53. }
  54. if (d.length > 1) {
  55. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  56. return;
  57. }
  58. var redirectTo = url + "?graduateCardApplyID=" + d + "&MNU=" + mnu;
  59. $.popupTopWindow('去向申请修改', redirectTo, 680, 385, null, null);
  60. }
  61. //删除
  62. function GraduateCardApply_Delete() {
  63. var d = validChoose().join(',');
  64. if (d == "") {
  65. $.messager.alert("系统提示", "请选择您要删除的信息。");
  66. return;
  67. }
  68. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  69. if (r) {
  70. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/GraduateCardApply/Delete', { graduateCardApplyIDs: d }, function (data) {
  71. if (data.IsSuccess) {
  72. $.messager.alert("系统提示", data.Message);
  73. $("#dgGraduateCardApplyList").cmsXDataTable('load');
  74. } else {
  75. $.messager.alert("系统提示", data.Message);
  76. }
  77. });
  78. }
  79. });
  80. }
  81. //学生最终成绩明细
  82. function editFinallyScore(rowindex, rowdata) {
  83. redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/GraduateCardApply/FinallyScoreList?graduateCardApplyID=" + rowdata.GraduateCardApplyID + "&MNU=" + mnu;
  84. $.popupTopWindow('学生最终成绩明细', redirectTo, 1200, 540, null, null);
  85. }
  86. //提交(毕业申请提交)
  87. function GraduationApply_Submit() {
  88. var d = validChoose();
  89. if (d == "") {
  90. $.messager.alert("系统提示", "请选择您要提交的信息。");
  91. return;
  92. }
  93. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/GraduationApply/GraduationConditionPackageSubmit" + "?MNU=" + mnu;
  94. $.popupTopWindow('毕业申请提交', redirectTo, 500, 280, null, d);
  95. }
  96. //结业
  97. function GraduationApply_Completion() {
  98. var d = validChoose().join(',');
  99. if (d == "") {
  100. $.messager.alert("系统提示", "请选择您要处理的信息。");
  101. return;
  102. }
  103. $.messager.confirm("系统提示", "您确定要对选择的信息进行结业处理?", function (r) {
  104. if (r) {
  105. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/GraduationApply/Completion', { graduationApplyIDs: d }, function (data) {
  106. if (data.IsSuccess) {
  107. $.messager.alert("系统提示", data.Message);
  108. $("#dgGraduationApplyList").cmsXDataTable('load');
  109. } else {
  110. $.messager.alert("系统提示", data.Message);
  111. }
  112. });
  113. }
  114. });
  115. }
  116. //设置列颜色为红色
  117. function SetRedColumn(index, row, value) {
  118. return " <span style=\"color: red;\">" + value + "</span>";
  119. }
  120. //Excel导出
  121. function GraduateCardApply_Export() {
  122. $("#formQuery").submit();
  123. }
  124. //联动查询
  125. function queryCampus(data) {
  126. var campusID = $("#CampusDropdown").combogridX("getValue");
  127. if (campusID != nonSelect) {
  128. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  129. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  130. }
  131. queryClass();
  132. }
  133. function queryCollege(data) {
  134. var campusID = $("#CampusDropdown").combogridX("getValue");
  135. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  136. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  137. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  138. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  139. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  140. queryClass();
  141. }
  142. function querySchoolyear(data) {
  143. queryClass();
  144. }
  145. function queryStandard(data) {
  146. queryClass();
  147. }
  148. function queryClass() {
  149. var jsonString = "";
  150. var parameterString = "";
  151. var campusID = $("#CampusDropdown").combogridX("getValue");
  152. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  153. var schoolYearID = $("#DictionarySchoolyear").combobox("getValue");
  154. var standardID = $("#DictionaryStandard").combogridX("getValue");
  155. var educationID = $("#DictionaryEducation").combogridX("getValue");
  156. var learningFormID = $("#DictionaryLearningform").combogridX("getValue");
  157. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  158. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  159. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  160. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  161. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  162. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  163. if (parameterString != "") {
  164. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  165. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  166. }
  167. else {
  168. $("#DictionaryStandard").combogridX("reload");
  169. }
  170. reload();
  171. }