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.
 
 
 
 
 
 

141 lines
6.7 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-05-24 15:40
  5. * 描 述:学生考勤记录
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var startTime;
  11. var endTime;
  12. var page = {
  13. init: function () {
  14. page.initGird();
  15. page.bind();
  16. },
  17. bind: function () {
  18. page.search();
  19. //// 时间搜索框
  20. //$('#datesearch').lrdate({
  21. // dfdata: [
  22. // { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  23. // { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  24. // { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  25. // { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
  26. // ],
  27. // // 月
  28. // mShow: false,
  29. // premShow: false,
  30. // // 季度
  31. // jShow: false,
  32. // prejShow: false,
  33. // // 年
  34. // ysShow: false,
  35. // yxShow: false,
  36. // preyShow: false,
  37. // yShow: false,
  38. // // 默认
  39. // dfvalue: '1',
  40. // selectfn: function (begin, end) {
  41. // startTime = begin;
  42. // endTime = end;
  43. // page.search();
  44. // }
  45. //});
  46. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  47. page.search(queryJson);
  48. }, 220, 400);
  49. // 刷新
  50. $('#lr_refresh').on('click', function () {
  51. location.reload();
  52. });
  53. // 新增
  54. $('#lr_add').on('click', function () {
  55. learun.layerForm({
  56. id: 'form',
  57. title: '新增',
  58. url: top.$.rootUrl + '/EducationalAdministration/StuAttendance/Form',
  59. width: 600,
  60. height: 400,
  61. callBack: function (id) {
  62. return top[id].acceptClick(refreshGirdData);
  63. }
  64. });
  65. });
  66. // 编辑
  67. $('#lr_edit').on('click', function () {
  68. var keyValue = $('#gridtable').jfGridValue('ID');
  69. if (learun.checkrow(keyValue)) {
  70. learun.layerForm({
  71. id: 'form',
  72. title: '编辑',
  73. url: top.$.rootUrl + '/EducationalAdministration/StuAttendance/Form?keyValue=' + keyValue,
  74. width: 600,
  75. height: 400,
  76. callBack: function (id) {
  77. return top[id].acceptClick(refreshGirdData);
  78. }
  79. });
  80. }
  81. });
  82. // 删除
  83. $('#lr_delete').on('click', function () {
  84. var keyValue = $('#gridtable').jfGridValue('ID');
  85. if (learun.checkrow(keyValue)) {
  86. learun.layerConfirm('是否确认删除该项!', function (res) {
  87. if (res) {
  88. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuAttendance/DeleteForm', { keyValue: keyValue }, function () {
  89. refreshGirdData();
  90. });
  91. }
  92. });
  93. }
  94. });
  95. },
  96. // 初始化列表
  97. initGird: function () {
  98. $('#gridtable').lrAuthorizeJfGrid({
  99. url: top.$.rootUrl + '/EducationalAdministration/StuAttendance/GetPageList',
  100. headData: [
  101. { label: "学年度", name: "AcademicYearNo", width: 100, align: "left" },
  102. { label: "学期", name: "Semester", width: 100, align: "left" },
  103. { label: "学号", name: "StuNo", width: 100, align: "left" },
  104. { label: "姓名", name: "StuName", width: 100, align: "left" },
  105. { label: "年级", name: "Grade", width: 100, align: "left" },
  106. { label: "系所码", name: "DeptNo", width: 100, align: "left" },
  107. { label: "系名", name: "DeptName", width: 100, align: "left" },
  108. { label: "专业码", name: "MajorNo", width: 100, align: "left" },
  109. { label: "专业名", name: "MajorName", width: 100, align: "left" },
  110. { label: "所在行政班号 ", name: "ClassNo", width: 100, align: "left" },
  111. { label: "班级名称", name: "ClassName", width: 100, align: "left" },
  112. { label: "课程号", name: "LessonNo", width: 100, align: "left" },
  113. { label: "课程名称", name: "LessonName", width: 100, align: "left" },
  114. { label: "课程类别码", name: "LessonSortNo", width: 100, align: "left" },
  115. { label: "课程类别", name: "LessonSortName", width: 100, align: "left" },
  116. { label: "上课日期", name: "LessonDate", width: 100, align: "left" },
  117. { label: "上课时间", name: "LessonTime", width: 100, align: "left" },
  118. { label: "是否出勤", name: "AttendOrNo", width: 100, align: "left" },
  119. { label: "出勤类型", name: "Sort", width: 100, align: "left" },
  120. { label: "分数", name: "AttenScore", width: 100, align: "left" },
  121. { label: "情况", name: "AttenCondition", width: 100, align: "left" },
  122. { label: "教师号", name: "EmpNo", width: 100, align: "left" },
  123. ],
  124. mainId: 'ID',
  125. isPage: true
  126. });
  127. },
  128. search: function (param) {
  129. param = param || {};
  130. param.StartTime = startTime;
  131. param.EndTime = endTime;
  132. param.EmpNo = learun.clientdata.get(['userinfo']).account;
  133. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  134. }
  135. };
  136. refreshGirdData = function () {
  137. page.search();
  138. };
  139. page.init();
  140. }