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.
 
 
 
 
 
 

136 lines
5.7 KiB

  1. var refreshGirdData;
  2. var bootstrap = function ($, learun) {
  3. "use strict";
  4. var Class, ClassName;
  5. var page = {
  6. init: function () {
  7. Class = request('Class')
  8. $.ajax({
  9. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree',
  10. type: "get",
  11. dataType: "json",
  12. async: false,
  13. cache: false,
  14. success: function (res) {
  15. if (res.code == 200) {
  16. let obj = res.data.find(e => e.value == Class)
  17. ClassName = obj ? obj.text : ''
  18. $('.printTitle').text((ClassName || '') + '学生方向确认')
  19. }
  20. },
  21. });
  22. page.initGird();
  23. page.bind();
  24. },
  25. bind: function () {
  26. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  27. page.search(queryJson);
  28. }, 200, 400);
  29. $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' });
  30. $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' });
  31. // 刷新
  32. $('#lr_refresh').on('click', function () {
  33. location.reload();
  34. });
  35. // 打印
  36. $('#lr_print').on('click', function () {
  37. $('#printPage').jqprint();
  38. });
  39. },
  40. // 初始化列表
  41. initGird: function () {
  42. let option = {
  43. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  44. headData: [
  45. { label: "姓名", name: "StuName", width: 100, align: "center" },
  46. {
  47. label: "性别", name: "GenderNo", width: 40, align: "center",
  48. formatter: function (cellvalue) {
  49. return cellvalue == true ? "男" : "女";
  50. }
  51. },
  52. { label: "身份证号", name: "IdentityCardNo", width: 150, align: "center" },
  53. {
  54. label: "民族", name: "NationalityNo", width: 100, align: "center",
  55. formatterAsync: function (callback, value, row, op, $cell) {
  56. learun.clientdata.getAsync('dataItem', {
  57. key: value,
  58. code: 'National',
  59. callback: function (_data) {
  60. callback(_data.text);
  61. }
  62. });
  63. }
  64. },
  65. { label: "学籍号", name: "StuCode", width: 160, align: "center", },
  66. {
  67. label: '选择方向', name: '选择方向', align: "center", statistics: true, width: 460,
  68. children: [
  69. { label: "技能高考", name: "GK", width: 80, align: "center" },
  70. { label: "高职单招", name: "DZ", width: 80, align: "center" },
  71. { label: "3+2高职转段", name: "ZD", width: 100, align: "center" },
  72. { label: "就业", name: "JY", width: 70, align: "center" },
  73. { label: "签名", name: "QM", width: 80, align: "center" },
  74. ]
  75. },
  76. ],
  77. mainId: 'StuId',
  78. isPage: true,
  79. rows: 24,
  80. isShowNum: true,
  81. // 是否显示序号
  82. //isMultiselect: true,
  83. //onSelectRow: function (rowdata) {
  84. // if (rowdata.CheckMark == "1") {
  85. // $("#check").hide();
  86. // $("#uncheck").show();
  87. // $("#lr_edit").hide();
  88. // $("#lr_delete").hide();
  89. // } else {
  90. // $("#uncheck").hide();
  91. // $("#check").show();
  92. // $("#lr_edit").show();
  93. // $("#lr_delete").show();
  94. // }
  95. //}
  96. onRenderComplete: function (list) {
  97. //if (!list.length) {
  98. // $('.pageCard').hide()
  99. //}
  100. }
  101. }
  102. $('#gridtable').lrAuthorizeJfGridLei(option);
  103. $('#gridtable1').lrAuthorizeJfGridLei({
  104. ...option, onRenderComplete: function (list) {
  105. if (!list.length) { $('.pageCard1').hide() }
  106. }
  107. });
  108. $('#gridtable2').lrAuthorizeJfGridLei({
  109. ...option, onRenderComplete: function (list) {
  110. if (!list.length) { $('.pageCard2').hide() }
  111. }
  112. });
  113. $('#gridtable3').lrAuthorizeJfGridLei({
  114. ...option, onRenderComplete: function (list) {
  115. if (!list.length) { $('.pageCard3').hide() }
  116. }
  117. });
  118. page.search();
  119. },
  120. search: function (param) {
  121. param = param || {};
  122. param.ClassNo = Class;
  123. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 1 });
  124. $('#gridtable1').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 2 });
  125. $('#gridtable2').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 3 });
  126. $('#gridtable3').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 4 });
  127. }
  128. };
  129. refreshGirdData = function () {
  130. page.search();
  131. };
  132. page.init();
  133. }