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.
 
 
 
 
 
 

123 lines
5.7 KiB

  1. var refreshGirdData;
  2. var ClassNo = request("ClassNo");
  3. var bootstrap = function ($, learun) {
  4. "use strict";
  5. var page = {
  6. init: function () {
  7. page.initGird();
  8. page.bind();
  9. },
  10. bind: function () {
  11. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  12. page.search(queryJson);
  13. }, 220, 400);
  14. // 刷新
  15. $('#lr_refresh').on('click',
  16. function () {
  17. location.reload();
  18. });
  19. var iframeIndex = top.layer.getFrameIndex(window.name);
  20. $('#lr_export').on('click', function () {
  21. //item = $btn[0].dfop;
  22. learun.layerForm({
  23. id: "ExcelExportForm",
  24. title: '导出Excel数据',
  25. url: top.$.rootUrl + '/Utility/ExcelExportForm?gridId=gridtableStu&filename=' + encodeURI(encodeURI('大厂新生导出')) + '&iframeIndex=' + iframeIndex,
  26. width: 500,
  27. height: 380,
  28. callBack: function (id) {
  29. return top[id].acceptClick();
  30. },
  31. btn: ['导出Excel', '关闭']
  32. });
  33. });
  34. },
  35. // 初始化列表
  36. initGird: function () {
  37. $('#gridtableStu').jfGrid({
  38. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetPageList',
  39. headData: [
  40. {
  41. label: '报名日期', name: 'SignUpTime', width: 150, align: "left", formatter: function (value) {
  42. return /\d{4}-\d{1,2}-\d{1,2}/g.exec(value);
  43. }
  44. },
  45. { label: '姓名', name: 'StuName', width: 100, align: "left" },
  46. {
  47. label: '性别', name: 'GenderNo', width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  48. learun.clientdata.getAsync('dataItem', {
  49. key: value,
  50. code: 'usersex',
  51. callback: function (_data) {
  52. callback(_data.text);
  53. }
  54. });
  55. }
  56. },
  57. {
  58. label: '民族', name: 'NationalityNo', width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  59. learun.clientdata.getAsync('custmerData', {
  60. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality',
  61. key: value,
  62. keyId: 'nationalityno',
  63. callback: function (_data) {
  64. callback(_data['nationality']);
  65. }
  66. });
  67. }
  68. },
  69. { label: '毕业学校', name: 'HighSchoolName', width: 150, align: "left" },
  70. { label: '中学班级', name: 'OldClassName', width: 100, align: "left" },
  71. { label: '中考成绩', name: 'ComprehensiveScore', width: 150, align: "left" },
  72. { label: '家庭住址', name: 'FamilyAddress', width: 150, align: "left" },
  73. { label: '户口所在地', name: 'OriginAddress', width: 150, align: "left" },
  74. { label: '身份证号', name: 'IdentityCardNo', width: 150, align: "left" },
  75. { label: '家长电话', name: 'telephone', width: 150, align: "left" },
  76. {
  77. label: '选报专业', name: 'MajorNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  78. learun.clientdata.getAsync('custmerData', {
  79. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  80. key: value,
  81. keyId: 'majorno',
  82. callback: function (_data) {
  83. callback(_data['majorname']);
  84. }
  85. });
  86. }
  87. },
  88. { label: '学制', name: 'EducationalSystem', width: 100, align: "left" },
  89. {
  90. label: "是否住宿", name: "IsAccommodate", width: 100, align: "left",
  91. formatterAsync: function (callback, value, row, op, $cell) {
  92. learun.clientdata.getAsync('dataItem', {
  93. key: value,
  94. code: 'YesOrNoInt',
  95. callback: function (_data) {
  96. callback(_data.text);
  97. }
  98. });
  99. }
  100. },
  101. { label: "身高/体重", name: "HeightWeight", width: 100, align: "left" },
  102. ],
  103. mainId: 'ID',
  104. isPage: true,
  105. sidx: 'StuNo',
  106. sord: 'desc'
  107. });
  108. page.search();
  109. },
  110. search: function (param) {
  111. param = param || {};
  112. param.ClassNo = ClassNo;
  113. $('#gridtableStu').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  114. }
  115. };
  116. refreshGirdData = function () {
  117. page.search();
  118. };
  119. page.init();
  120. }