TeachersConfirmOrder.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/TeachersConfirmOrder/BatchSetPreAddedValue";
  2. var DetailUrl = CMS_SystemConfig.VirtualDirectoryPath + "/TeachersConfirmOrder/Detail";
  3. var mnu = "";
  4. //加载
  5. $(function () {
  6. mnu = $.SystemGeneral.getUrlParam("MNU");
  7. })
  8. function reload() {
  9. $("#dgTeachersConfirmOrderList").cmsXDataTable("load", $.getDataGridParams("dgTeachersConfirmOrderList"));
  10. }
  11. //预加分
  12. function TeachersConfirmOrder_Add() {
  13. var d = validChoose().join(',');
  14. var tmps = validChooseTmp().join(',');
  15. var years = validChooseYear().join(',');
  16. var c = validChooseobj();
  17. var orderJsonStr = JSON.stringify(c);
  18. if (d.length == "") {
  19. $.messager.alert("系统提示", "请选择您预设置的信息!");
  20. return;
  21. }
  22. $.popupTopWindow('预加设置信息', CMS_SystemConfig.VirtualDirectoryPath + '/TeachersConfirmOrder/BatchSetPreAddedValue?MNU=' + mnu, 380, 150, null, orderJsonStr);
  23. }
  24. function Announcement_RoleAdd_Confirm(resultData) {
  25. var c = validChooseobj();
  26. var orderJsonStr = JSON.stringify(c);
  27. if (resultData != undefined) {
  28. var d = resultData[0];
  29. var de = resultData[1];
  30. var d1 = validChoose().join(",");
  31. var schoolyearID = resultData[2];
  32. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/TeachersConfirmOrder/BatchSetPreAddedValue', { orderJsonStr: orderJsonStr }, function (data) {
  33. if (data == "操作成功") {
  34. $.messager.alert("系统提示", "操作成功!");
  35. $("#dgTeachersConfirmOrderList").cmsXDataTable('load');
  36. } else {
  37. $.messager.alert("系统提示", data);
  38. }
  39. });
  40. }
  41. }
  42. //点击征订明细记录
  43. function TeachersOrderDetail(rowindex, rowdata) {
  44. var redirectTo = DetailUrl + '?TeachersOrderID=' + rowdata.TeachersOrderID + '&teachingMaterialPoolID=' + rowdata.TeachingMaterialPoolID + '&schoolYearID=' + rowdata.SchoolyearID + '&MNU=' + mnu;
  45. $.popupTopWindow('征订清单明细', redirectTo, 800, 600, null, null);
  46. }
  47. //获取选中的数据
  48. function validChoose() {
  49. var d = [];
  50. $.each($("#dgTeachersConfirmOrderList").cmsXDataTable("getSelections"), function (index) {
  51. d.push(this.TeachersOrderID);
  52. });
  53. return d;
  54. }
  55. //获取选中的数据年度
  56. function validChooseYear() {
  57. var d = [];
  58. $.each($("#dgTeachersConfirmOrderList").cmsXDataTable("getSelections"), function (index) {
  59. d.push(this.SchoolyearID);
  60. });
  61. return d;
  62. }
  63. //获取选中的数据总库
  64. function validChooseTmp() {
  65. var d = [];
  66. $.each($("#dgTeachersConfirmOrderList").cmsXDataTable("getSelections"), function (index) {
  67. d.push(this.TeachingMaterialPoolID);
  68. });
  69. return d;
  70. }
  71. //获取选中的数据
  72. function validChooseobj() {
  73. var d = [];
  74. $.each($("#dgTeachersConfirmOrderList").cmsXDataTable("getSelections"), function (index) {
  75. d.push(this);
  76. });
  77. return d;
  78. }
  79. function TeachersConfirmOrder_Export() {
  80. $("#formQuery").submit();
  81. }
  82. function TeachersConfirmOrder_Excel()
  83. {
  84. $("#formQuery").submit();
  85. }
  86. function TeachersOrder_Export() {
  87. $("#formQuery").submit();
  88. }
  89. function QueryPublishDropdownList(data) {
  90. reload();
  91. }
  92. function QueryCourseDropdownList(data) {
  93. reload();
  94. }
  95. function QuerySchoolYearDropdownList(data) {
  96. reload();
  97. }
  98. function QueryCollegeDropdownList(data) {
  99. reload();
  100. }
  101. function QueryStatusDropdownList(data) {
  102. reload();
  103. }
  104. function QueryTeachingMaterialDropdownList(data)
  105. {
  106. reload();
  107. }