NewStudentEnterDoubt.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //刷新
  2. function reload() {
  3. $("#dgNewStudentEnterDoubtList").cmsXDataTable("load", $.getDataGridParams("dgNewStudentEnterDoubtList"));
  4. }
  5. //获取选中的数据
  6. function validChoose() {
  7. var d = [];
  8. $.each($("#dgNewStudentEnterDoubtList").cmsXDataTable("getSelections"), function (index) {
  9. d.push(this.NewStudentID);
  10. });
  11. return d;
  12. }
  13. //确定生成成功后不关闭弹出页面
  14. function formSuccessReloadNoClose(data) {
  15. if (data.IsSuccess == true) {
  16. reload();
  17. }
  18. $.messager.alert("系统提示", data.Message);
  19. }
  20. //审核(确定)
  21. function DoubtApproveConfirm() {
  22. var d = validChoose().join(',');
  23. if (d == "") {
  24. $.messager.alert("系统提示", "请选择您要审核的信息。");
  25. return;
  26. }
  27. $.messager.confirm("系统提示", "您确定要对选择的已标记名单进行审核通过?", function (r) {
  28. if (r) {
  29. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudentEnter/DoubtList', { newStudentIDs: d }, function (data) {
  30. if (data.IsSuccess = true) {
  31. $.messager.alert("系统提示", data.Message);
  32. $("#dgNewStudentEnterDoubtList").cmsXDataTable('load');
  33. }
  34. else {
  35. $.messager.alert("系统提示", data.Message);
  36. }
  37. });
  38. }
  39. });
  40. }
  41. //设置列颜色为红色
  42. function SetRedColumn(index, row, value) {
  43. return " <span style=\"color: red;\">" + value + "</span>";
  44. }
  45. //设置相应的行字体颜色为红色
  46. function SetRowGrid(rowIndex, rowData) {
  47. if (rowData.IsDoubt == true) {
  48. return "color: red;";
  49. } else {
  50. return "";
  51. }
  52. }
  53. //设置相应的行背景颜色
  54. function SetRowBackgroundGrid(rowIndex, rowData) {
  55. if (rowData.IsDoubt == true) {
  56. return "background-color: yellow;";
  57. } else {
  58. return "";
  59. }
  60. }
  61. //Excel导出
  62. function NewStudentEnter_DoubtExport() {
  63. //$(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/NewStudentEnter/Excel_NewStudentEnterDoubt");
  64. $("#formQuery").submit();
  65. }
  66. //联动查询
  67. function queryCampus(data) {
  68. var campusID = $("#CampusDropdown").combogridX("getValue");
  69. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  70. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  71. reload();
  72. }
  73. function queryCollege(data) {
  74. var campusID = $("#CampusDropdown").combogridX("getValue");
  75. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  76. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|";
  77. jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})";
  78. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  79. reload();
  80. }
  81. function queryGrade(data) {
  82. reload();
  83. }
  84. function queryStandard(data) {
  85. reload();
  86. }