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.
 
 
 
 
 
 

143 lines
6.2 KiB

  1. var refreshGirdData;
  2. var bootstrap = function ($, learun) {
  3. "use strict";
  4. var Class, ClassName;
  5. var page = {
  6. init: function () {
  7. page.initGird();
  8. page.bind();
  9. },
  10. bind: function () {
  11. // 初始化左侧树形数据
  12. $('#dataTree').lrtree({
  13. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree',
  14. nodeClick: function (item) {
  15. Class = item.value;
  16. ClassName = item.text;
  17. page.search({ ClassNo: item.value });
  18. }
  19. });
  20. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  21. page.search(queryJson);
  22. }, 200, 400);
  23. $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' });
  24. $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' });
  25. // 刷新
  26. $('#lr_refresh').on('click', function () {
  27. location.reload();
  28. });
  29. // 打印
  30. $('#lr_print').on('click', function () {
  31. if (!Class) {
  32. learun.alert.warning("请选择左侧班级!");
  33. return
  34. }
  35. let params = {
  36. ClassName,
  37. Class,
  38. }
  39. learun.layerForm({
  40. id: 'QueryBasicInfo',
  41. title: '学生方向确认',
  42. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/DirectionPrint?' + $.param(params),
  43. width: 1102,
  44. height: 800,
  45. btn: null
  46. });
  47. //$('.printTitle').text((ClassName || '')+'学生方向确认')
  48. //$('.printTitle').css('display', 'block');
  49. //$('#gridtable').css('zoom', '94%')
  50. //let p5Width = $('.jfgrid-head-cell[path=5]').css('width')
  51. //$('.jfgrid-head-cell[path=5]').css('width', '480px')
  52. //let p10Width = $('.jfgrid-head-cell[path=10]').css('width')
  53. //$('.jfgrid-head-cell[path=10]').css('width', '82px')
  54. ////$('#gridtable').jqprintTable();
  55. //$('#printBox').jqprint();
  56. //$('.jfgrid-head-cell[path=5]').css('width', p5Width)
  57. //$('.jfgrid-head-cell[path=10]').css('width', p10Width)
  58. //$('#gridtable').css('zoom', '100%')
  59. //$('.printTitle').css('display', 'none');
  60. });
  61. },
  62. // 初始化列表
  63. initGird: function () {
  64. $('#gridtable').lrAuthorizeJfGridLei({
  65. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  66. headData: [
  67. { label: "姓名", name: "StuName", width: 100, align: "center" },
  68. {
  69. label: "性别", name: "GenderNo", width: 40, align: "center",
  70. formatter: function (cellvalue) {
  71. return cellvalue == true ? "男" : "女";
  72. }
  73. },
  74. { label: "身份证号", name: "IdentityCardNo", width: 150, align: "center" },
  75. {
  76. label: "民族", name: "NationalityNo", width: 100, align: "center",
  77. formatterAsync: function (callback, value, row, op, $cell) {
  78. learun.clientdata.getAsync('dataItem', {
  79. key: value,
  80. code: 'National',
  81. callback: function (_data) {
  82. callback(_data.text);
  83. }
  84. });
  85. }
  86. },
  87. { label: "学籍号", name: "StuCode", width: 160, align: "center" , },
  88. {
  89. label: '选择方向', name: '选择方向', align: "center", statistics: true, width: 460,
  90. children: [
  91. { label: "技能高考", name: "GK", width: 100, align: "center" },
  92. { label: "高职单招", name: "DZ", width: 100, align: "center" },
  93. { label: "3+2高职转段", name: "ZD", width: 100, align: "center" },
  94. { label: "就业", name: "JY", width: 80, align: "center"},
  95. { label: "签名", name: "QM", width: 80, align: "center" },
  96. ]
  97. },
  98. ],
  99. mainId: 'StuId',
  100. isPage: true,
  101. rows: 100,
  102. isShowNum: true,
  103. // 是否显示序号
  104. //isMultiselect: true,
  105. //onSelectRow: function (rowdata) {
  106. // if (rowdata.CheckMark == "1") {
  107. // $("#check").hide();
  108. // $("#uncheck").show();
  109. // $("#lr_edit").hide();
  110. // $("#lr_delete").hide();
  111. // } else {
  112. // $("#uncheck").hide();
  113. // $("#check").show();
  114. // $("#lr_edit").show();
  115. // $("#lr_delete").show();
  116. // }
  117. //}
  118. });
  119. page.search();
  120. },
  121. search: function (param) {
  122. if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {//登录用户是system时,列表展示所有学生;其他用户登录时,必须选择左侧班级才能查看学生;
  123. if (Class == "" || Class == undefined || Class == null) {
  124. learun.alert.warning("请选择左侧班级!");
  125. return false;
  126. }
  127. }
  128. param = param || {};
  129. param.ClassNo = Class;
  130. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: request('page') || 1});
  131. }
  132. };
  133. refreshGirdData = function () {
  134. page.search();
  135. };
  136. page.init();
  137. }