You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MyClass.js 7.4 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. var refreshGirdData;
  2. var bootstrap = function ($, learun) {
  3. "use strict";
  4. var page = {
  5. init: function () {
  6. page.initGird();
  7. page.bind();
  8. },
  9. bind: function () {
  10. // 初始化左侧树形数据
  11. $('#dataTree').lrtree({
  12. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree',
  13. nodeClick: function (item) {
  14. page.search({ ClassNo: item.value });
  15. }
  16. });
  17. // 刷新
  18. $('#lr_refresh').on('click', function () {
  19. location.reload();
  20. });
  21. },
  22. // 初始化列表
  23. initGird: function () {
  24. $('#gridtable').lrAuthorizeJfGrid({
  25. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  26. headData: [
  27. { label: "学号", name: "StuNo", width: 100, align: "left" },
  28. { label: "学籍号", name: "StuCode", width: 100, align: "left" },
  29. { label: "姓名", name: "StuName", width: 100, align: "left" },
  30. {
  31. label: "性别", name: "GenderNo", width: 80, align: "left",
  32. formatter: function (cellvalue) {
  33. return cellvalue == true ? "男" : "女";
  34. }
  35. },
  36. { label: "出生日期", name: "Birthday", width: 100, align: "left" },
  37. { label: "身份证号", name: "IdentityCardNo", width: 100, align: "left" },
  38. {
  39. label: "民族", name: "NationalityNo", width: 100, align: "left",
  40. formatterAsync: function (callback, value, row, op, $cell) {
  41. learun.clientdata.getAsync('custmerData', {
  42. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality',
  43. key: value,
  44. keyId: 'nationalityno',
  45. callback: function (_data) {
  46. callback(_data['nationality']);
  47. }
  48. });
  49. }
  50. },
  51. {
  52. label: "系所", name: "DeptNo", width: 100, align: "left",
  53. formatterAsync: function (callback, value, row, op, $cell) {
  54. learun.clientdata.getAsync('custmerData', {
  55. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  56. key: value,
  57. keyId: 'deptno',
  58. callback: function (_data) {
  59. callback(_data['deptname']);
  60. }
  61. });
  62. }
  63. },
  64. {
  65. label: "专业", name: "MajorNo", width: 100, align: "left",
  66. formatterAsync: function (callback, value, row, op, $cell) {
  67. learun.clientdata.getAsync('custmerData', {
  68. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  69. key: value,
  70. keyId: 'majorno',
  71. callback: function (_data) {
  72. callback(_data['majorname']);
  73. }
  74. });
  75. }
  76. },
  77. {
  78. label: "班级", name: "ClassNo", width: 100, align: "left",
  79. formatterAsync: function (callback, value, row, op, $cell) {
  80. learun.clientdata.getAsync('custmerData', {
  81. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  82. key: value,
  83. keyId: 'classno',
  84. callback: function (_data) {
  85. callback(_data['classname']);
  86. }
  87. });
  88. }
  89. },
  90. { label: "年级", name: "Grade", width: 100, align: "left" },
  91. {
  92. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  93. learun.clientdata.getAsync('dataItem', {
  94. key: value,
  95. code: 'EduSystem',
  96. callback: function (_data) {
  97. callback(_data.text);
  98. }
  99. });
  100. }
  101. },
  102. {
  103. label: "学习形式", name: "StudyModality", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  104. learun.clientdata.getAsync('dataItem', {
  105. key: value,
  106. code: 'StudyModality',
  107. callback: function (_data) {
  108. callback(_data.text);
  109. }
  110. });
  111. }
  112. },
  113. { label: "报到日期", name: "RegisterDate", width: 100, align: "left" },
  114. { label: "入学年月", name: "EntranceDate", width: 100, align: "left" },
  115. {
  116. label: "异动状态", name: "AbmormityMoveMark", width: 80, align: "center",
  117. formatter: function (cellvalue) {
  118. return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  119. }
  120. },
  121. {
  122. label: "审核状态", name: "CheckMark", width: 80, align: "center",
  123. formatter: function (cellvalue) {
  124. return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
  125. }
  126. }
  127. ],
  128. mainId: 'StuId',
  129. isPage: true,
  130. isMultiselect: true,
  131. //onSelectRow: function (rowdata) {
  132. // if (rowdata.CheckMark == "1") {
  133. // $("#check").hide();
  134. // $("#uncheck").show();
  135. // $("#lr_edit").hide();
  136. // $("#lr_delete").hide();
  137. // } else {
  138. // $("#uncheck").hide();
  139. // $("#check").show();
  140. // $("#lr_edit").show();
  141. // $("#lr_delete").show();
  142. // }
  143. //}
  144. });
  145. //page.search();
  146. },
  147. search: function (param) {
  148. param = param || {};
  149. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  150. }
  151. };
  152. refreshGirdData = function () {
  153. page.search();
  154. };
  155. page.init();
  156. }