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.
 
 
 
 
 
 

181 lines
8.3 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-02-27 11:05
  5. * 描 述:课时费统计
  6. */
  7. var selectedRow;
  8. var refreshGirdData;
  9. var startTime;
  10. var endTime;
  11. var bootstrap = function ($, learun) {
  12. "use strict";
  13. var page = {
  14. init: function () {
  15. page.initGird();
  16. page.bind();
  17. },
  18. bind: function () {
  19. $('#weeks').lrselect({
  20. placeholder: "请选择本月周数",
  21. data: [{ text: "1周", value: "1" }, { text: "2周", value: "2" }, { text: "3周", value: "3" }, { text: "4周", value: "4" }, { text: "5周", value: "5" }],
  22. text: "text",
  23. value: "value",
  24. })
  25. $('#status').lrselect({
  26. placeholder: "是否外聘",
  27. data: [{ text: "是", value: "2" }, { text: "否", value: "0" }],
  28. text: "text",
  29. value: "value",
  30. })
  31. //系部
  32. //$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
  33. //部门
  34. $('#DeptNo').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
  35. $('#datesearch').lrdate({
  36. dfdata: [
  37. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  38. { 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') } },
  39. { 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') } },
  40. { 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') } }
  41. ],
  42. // 月
  43. mShow: false,
  44. premShow: false,
  45. // 季度
  46. jShow: false,
  47. prejShow: false,
  48. // 年
  49. ysShow: false,
  50. yxShow: false,
  51. preyShow: false,
  52. yShow: false,
  53. // 默认
  54. dfvalue: '0',
  55. selectfn: function (begin, end) {
  56. $('#datesearch').attr('starttime', begin)
  57. $('#datesearch').attr('endtime', end)
  58. startTime = begin;
  59. endTime = end;
  60. window.datesearchChange()
  61. }
  62. });
  63. // 查询
  64. $('#btn_Search').on('click', function () {
  65. var weeks = $('#weeks').lrselectGet();
  66. if (weeks == null || weeks == "" || weeks == undefined) {
  67. learun.alert.warning("请选择本月周数!");
  68. return false;
  69. }
  70. var status = $('#status').lrselectGet();
  71. var deptNo = $('#DeptNo').lrselectGet();
  72. page.search({ weeks: weeks, deptNo: deptNo, status: status });
  73. });
  74. // 刷新
  75. $('#lr_refresh').on('click', function () {
  76. location.reload();
  77. });
  78. // 打印
  79. $('#lr_print').on('click', function () {
  80. var weeks = $('#weeks').lrselectGet();
  81. if (weeks == null || weeks == "" || weeks == undefined) {
  82. learun.alert.warning("请选择本月周数!");
  83. return false;
  84. }
  85. learun.layerForm({
  86. id: 'PrintCourseStatistic',
  87. title: '打印',
  88. url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/PrintCourseStatistic?weeks=' + weeks + '&status=' + $('#status').lrselectGet() + '&deptNo=' + $('#DeptNo').lrselectGet() + '&StartTime=' + startTime + '&EndTime=' + endTime,
  89. width: 1200,
  90. height: 800,
  91. btn: null
  92. });
  93. });
  94. },
  95. initGird: function () {
  96. $('#gridtable').jfGrid({
  97. url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetcoursestatictisList',
  98. headData: [
  99. //{ label: '序号', name: 'ALTId', width: 200, align: "left" },
  100. { label: '姓名', name: 'empname', width: 100, align: "left" },
  101. {
  102. label: '教师职务', name: 'zhiwu', width: 100, align: "left",
  103. formatterAsync: function (callback, value, row, op, $cell) {
  104. learun.clientdata.getAsync('dataItem', {
  105. key: value,
  106. code: 'JobGrade',
  107. callback: function (_data) {
  108. callback(_data.text);
  109. }
  110. });
  111. }
  112. },
  113. {
  114. label: '教师职称', name: 'zhicheng', width: 100, align: "left",
  115. formatterAsync: function (callback, value, row, op, $cell) {
  116. learun.clientdata.getAsync('dataItem', {
  117. key: value,
  118. code: 'jszc',
  119. callback: function (_data) {
  120. callback(_data.text);
  121. }
  122. });
  123. }
  124. },
  125. {
  126. label: '部门', name: 'dept', width: 100, align: "left",
  127. formatterAsync: function (callback, value, row, op, $cell) {
  128. learun.clientdata.getAsync('custmerData', {
  129. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  130. key: value,
  131. keyId: 'id',
  132. callback: function (_data) {
  133. callback(_data['name']);
  134. }
  135. });
  136. }
  137. },
  138. { label: '周任务课时(节)', name: 'weekcourses', width: 200, align: "left" },
  139. { label: '实际月课时量(节)', name: 'monthactcourses', width: 200, align: "left" },
  140. {
  141. label: '折算后月课时量(节)', name: 'zhesuan_monthactcourses', width: 200, align: "left",
  142. formatter: function (cellvalue, row) {
  143. if (row.zhiwu == '1' || row.zhiwu == '2' || row.zhiwu == '3' || row.zhiwu == '4') {
  144. return "";
  145. } else {
  146. return cellvalue;
  147. }
  148. }
  149. },
  150. { label: '课时费标准(元/节)', name: 'feestandard', width: 200, align: "left" },
  151. {
  152. label: '实发课时费(元)', name: 'actfeestandard', width: 200, align: "left",
  153. formatter: function (cellvalue) {
  154. if (cellvalue) {
  155. return cellvalue < 0 ? "0" : "" + cellvalue + "";
  156. } else {
  157. return "0";
  158. }
  159. }
  160. },
  161. ],
  162. mainId: 'ALTId',
  163. isPage: true,
  164. sidx: 'empno'
  165. });
  166. },
  167. search: function (param) {
  168. param = param || {};
  169. param.StartTime = startTime;
  170. param.EndTime = endTime;
  171. param.noTime = $('#timeNoCludes').attr("timeNoCludes")
  172. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  173. }
  174. };
  175. refreshGirdData = function () {
  176. page.search();
  177. };
  178. page.init();
  179. }