StudentPrintTimes.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. var mnu = "";
  2. //加载
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. })
  6. //获取选中的数据
  7. function validChoose() {
  8. var d = [];
  9. $.each($("#dgStudentPrintTimesList").cmsXDataTable("getSelections"), function (index) {
  10. d.push(this.UserID);
  11. });
  12. return d;
  13. }
  14. function StudentPrintTimes_Excel() {
  15. $(document.forms[0]).submit();
  16. }
  17. function StudentPrintTimes_BatchUpdate() {
  18. $("#BatchModifydiv").css("display", "inline-block");
  19. }
  20. function StudentPrintTimes_BatchUpdateSubmit() {
  21. var d = validChoose();
  22. if (d.length == 0) {
  23. $.messager.alert("系统信息", "请选择您要批量修改的信息。");
  24. return;
  25. }
  26. $.messager.confirm("系统提示", "您确定要批量修改选择的信息吗?", function (r) {
  27. if (r) {
  28. var formValue = $("#Times_NumberBox").val();
  29. if (formValue == "") {
  30. $.messager.alert("系统信息", "已打印次数不能为空。");
  31. return;
  32. } else if (isNaN(formValue)) {
  33. $.messager.alert("系统信息", "已打印次数请填写数字。");
  34. return;
  35. }
  36. var url = $("#formBatchModify").attr("action");
  37. $.postWithLoading(url, { userIDs: d.join(','), times: formValue }, EMISFunction.FormSuccess, 'json');
  38. $("#BatchModifydiv").css("display", "none");
  39. }
  40. });
  41. }
  42. function StudentPrintTimes_BatchUpdateClose() {
  43. $("#BatchModifydiv").css("display", "none");
  44. }
  45. function reload() {
  46. $("#dgStudentPrintTimesList").cmsXDataTable("load", $.getDataGridParams("dgStudentPrintTimesList"));
  47. }
  48. function queryStandard() {
  49. try {
  50. var collegeID = $("#cgbCollege").combogridX("getValue");
  51. var yearID = $("#ddlYear").combobox("getValue");
  52. var jsonString = "({'QueryParamsDatas':'";
  53. if (collegeID != "" && collegeID != nonSelect) {
  54. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  55. }
  56. if (yearID != nonSelect) {
  57. jsonString += "DictionaryGrade|*|" + yearID + "|@|";
  58. }
  59. jsonString += "'})";
  60. $("#cbgStandard").combogridX("reload", eval(jsonString));
  61. } catch (e) {
  62. }
  63. }
  64. function queryClass() {
  65. try {
  66. var collegeID = $("#cgbCollege").combogridX("getValue");
  67. var yearID = $("#ddlYear").combobox("getValue");
  68. var standardID = $("#cbgStandard").combogridX("getValue");
  69. var jsonString = "({'QueryParamsDatas':'";
  70. if (collegeID != "" && collegeID != nonSelect) {
  71. jsonString += "CollegeDropdown|*|" + collegeID + "|@|";
  72. }
  73. if (yearID != nonSelect) {
  74. jsonString += "DictionaryGrade|*|" + yearID + "|@|";
  75. }
  76. if (standardID != "" && standardID != nonSelect) {
  77. jsonString += "DictionaryStandard|*|" + standardID + "|@|";
  78. }
  79. jsonString += "'})";
  80. $("#cbgClassmajor").combogridX("reload", eval(jsonString));
  81. } catch (e) {
  82. }
  83. }