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.
 
 
 
 
 
 

144 lines
6.8 KiB

  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: "MajorNo", width: 100, align: "left",
  53. formatterAsync: function (callback, value, row, op, $cell) {
  54. learun.clientdata.getAsync('custmerData', {
  55. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  56. key: value,
  57. keyId: 'majorno',
  58. callback: function (_data) {
  59. callback(_data['majorname']);
  60. }
  61. });
  62. }
  63. },
  64. {
  65. label: "班级", name: "ClassNo", width: 100, align: "left",
  66. formatterAsync: function (callback, value, row, op, $cell) {
  67. learun.clientdata.getAsync('custmerData', {
  68. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  69. key: value,
  70. keyId: 'classno',
  71. callback: function (_data) {
  72. callback(_data['classname']);
  73. }
  74. });
  75. }
  76. },
  77. { label: "年级", name: "Grade", width: 100, align: "left" },
  78. {
  79. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  80. learun.clientdata.getAsync('dataItem', {
  81. key: value,
  82. code: 'EduSystem',
  83. callback: function (_data) {
  84. callback(_data.text);
  85. }
  86. });
  87. }
  88. },
  89. {
  90. label: "学习形式", name: "StudyModality", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  91. learun.clientdata.getAsync('dataItem', {
  92. key: value,
  93. code: 'StudyModality',
  94. callback: function (_data) {
  95. callback(_data.text);
  96. }
  97. });
  98. }
  99. },
  100. { label: "报到日期", name: "RegisterDate", width: 100, align: "left" },
  101. { label: "入学年月", name: "EntranceDate", width: 100, align: "left" },
  102. {
  103. label: "异动状态", name: "AbmormityMoveMark", width: 80, align: "center",
  104. formatter: function (cellvalue) {
  105. return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  106. }
  107. },
  108. {
  109. label: "审核状态", name: "CheckMark", width: 80, align: "center",
  110. formatter: function (cellvalue) {
  111. return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
  112. }
  113. }
  114. ],
  115. mainId: 'StuId',
  116. isPage: true,
  117. isMultiselect: true,
  118. //onSelectRow: function (rowdata) {
  119. // if (rowdata.CheckMark == "1") {
  120. // $("#check").hide();
  121. // $("#uncheck").show();
  122. // $("#lr_edit").hide();
  123. // $("#lr_delete").hide();
  124. // } else {
  125. // $("#uncheck").hide();
  126. // $("#check").show();
  127. // $("#lr_edit").show();
  128. // $("#lr_delete").show();
  129. // }
  130. //}
  131. });
  132. //page.search();
  133. },
  134. search: function (param) {
  135. param = param || {};
  136. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  137. }
  138. };
  139. refreshGirdData = function () {
  140. page.search();
  141. };
  142. page.init();
  143. }