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.
 
 
 
 
 
 

254 lines
14 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-11-07 11:54
  5. * 描 述:工作绩效
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 220, 400);
  19. //年份
  20. $('#IssueYear').lrselect({
  21. allowSearch: true,
  22. url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear',
  23. value: 'value',
  24. text: 'text'
  25. });
  26. $('#IssueMonth').lrDataItemSelect({ code: 'MPMonth' });
  27. $('#PeopleType').lrselect({
  28. placeholder: "请选择人员类别",
  29. allowSearch: true,
  30. url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/PeopleType',
  31. value: 'PeopleType',
  32. text: 'PeopleType'
  33. });
  34. $('#PostType').lrselect({
  35. placeholder: "请选择岗位等级",
  36. allowSearch: true,
  37. url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/PostType',
  38. value: 'PostType',
  39. text: 'PostType'
  40. });
  41. $('#PayGrade').lrselect({
  42. placeholder: "请选择薪级",
  43. allowSearch: true,
  44. url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/PayGrade',
  45. value: 'PayGrade',
  46. text: 'PayGrade'
  47. });
  48. // 刷新
  49. $('#lr_refresh').on('click', function () {
  50. location.reload();
  51. });
  52. // 新增
  53. $('#lr_add').on('click', function () {
  54. learun.layerForm({
  55. id: 'form',
  56. title: '新增',
  57. url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/Form',
  58. width: 800,
  59. height: 800,
  60. callBack: function (id) {
  61. return top[id].acceptClick(refreshGirdData);
  62. }
  63. });
  64. });
  65. // 编辑
  66. $('#lr_edit').on('click', function () {
  67. var keyValue = $('#gridtable').jfGridValue('Id');
  68. if (learun.checkrow(keyValue)) {
  69. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  70. if (CheckMark.indexOf('1') != -1) {
  71. learun.alert.warning("选中记录中包含已审核项目!");
  72. return;
  73. }
  74. learun.layerForm({
  75. id: 'form',
  76. title: '编辑',
  77. url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/Form?keyValue=' + keyValue,
  78. width: 800,
  79. height: 800,
  80. callBack: function (id) {
  81. return top[id].acceptClick(refreshGirdData);
  82. }
  83. });
  84. }
  85. });
  86. // 删除
  87. $('#lr_delete').on('click', function () {
  88. var keyValue = $('#gridtable').jfGridValue('Id');
  89. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  90. if (learun.checkrow(keyValue)) {
  91. if (CheckMark.indexOf('1') != -1) {
  92. learun.alert.warning("选中记录中包含已审核项目!");
  93. return;
  94. }
  95. learun.layerConfirm('是否确认删除该项!', function (res) {
  96. if (res) {
  97. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/JobPerformance/DeleteForm', { keyValue: keyValue }, function () {
  98. refreshGirdData();
  99. });
  100. }
  101. });
  102. }
  103. });
  104. //审核
  105. $('#lr_check').on('click', function () {
  106. var keyValue = $('#gridtable').jfGridValue('Id');
  107. if (learun.checkrow(keyValue)) {
  108. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  109. if (CheckMark.indexOf('1') != -1) {
  110. learun.alert.warning("选中记录中包含已审核项目!");
  111. return;
  112. }
  113. learun.layerConfirm('是否确认审核该项?', function (res) {
  114. if (res) {
  115. learun.postForm(top.$.rootUrl + '/EducationalAdministration/JobPerformance/CheckForm', { keyValue: keyValue, Status: '1' }, function () {
  116. refreshGirdData();
  117. });
  118. }
  119. });
  120. }
  121. });
  122. //去审
  123. $('#lr_uncheck').on('click', function () {
  124. var keyValue = $('#gridtable').jfGridValue('Id');
  125. if (learun.checkrow(keyValue)) {
  126. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  127. var CheckMarkArr = CheckMark.split(',');
  128. if ($.inArray('0', CheckMarkArr) != -1 || $.inArray('', CheckMarkArr) != -1) {
  129. learun.alert.warning("选中记录中包含未审核项目!");
  130. return;
  131. }
  132. learun.layerConfirm('是否确认取消审核该项?', function (res) {
  133. if (res) {
  134. learun.postForm(top.$.rootUrl + '/EducationalAdministration/JobPerformance/CheckForm', { keyValue: keyValue, Status: '2' }, function () {
  135. refreshGirdData();
  136. });
  137. }
  138. });
  139. }
  140. });
  141. //审核全部
  142. $('#lr_checkall').on('click', function () {
  143. learun.layerConfirm('是否确认全部审核?', function (res) {
  144. if (res) {
  145. learun.postForm(top.$.rootUrl + '/EducationalAdministration/JobPerformance/CheckForm', { keyValue: null, Status: '0' }, function () {
  146. refreshGirdData();
  147. });
  148. }
  149. });
  150. });
  151. ///上传
  152. $('#lr_import').on('click',
  153. function () {
  154. learun.layerForm({
  155. id: 'form',
  156. title: '导入',
  157. url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/ImportForm',
  158. width: 600,
  159. height: 400,
  160. btn: null,
  161. callBack: function (id) {
  162. return top[id].acceptClick(refreshGirdData);
  163. }
  164. });
  165. });
  166. },
  167. initGird: function () {
  168. $('#gridtable').jfGrid({
  169. url: top.$.rootUrl + '/EducationalAdministration/JobPerformance/GetPageList',
  170. headData: [
  171. {
  172. label: "审核状态", name: "F_EnabledMark", width: 70, align: "center", frozen: true,
  173. formatter: function (cellvalue) {
  174. return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
  175. }
  176. },
  177. { label: '发放年份', name: 'IssueYear', width: 70, align: "left", frozen: true, },
  178. { label: '发放月份', name: 'IssueMonth', width: 70, align: "left", frozen: true, },
  179. //{ label: '序号', name: 'No', width: 70, align: "left" },
  180. {
  181. label: '处室', name: 'Department', width: 70, align: "left", frozen: true,
  182. //formatterAsync: function (callback, value, row, op, $cell) {
  183. // learun.clientdata.getAsync('custmerData', {
  184. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  185. // key: value,
  186. // keyId: 'id',
  187. // callback: function (_data) {
  188. // callback(_data['name']);
  189. // }
  190. // });
  191. //}
  192. },
  193. { label: '姓名', name: 'EmpName', width: 70, align: "left", frozen: true, },
  194. { label: '岗位名称', name: 'Post', width: 130, align: "left", frozen: true, },
  195. { label: '行政管理岗位', name: 'AdminPosition', width: 100, align: "left", statistics: true },
  196. { label: '团总支书记', name: 'LeagueSecretary', width: 100, align: "left", statistics: true },
  197. { label: '中心负责人', name: 'CenterPeople', width: 100, align: "left", statistics: true },
  198. { label: '教辅、工勤岗位', name: 'TeachingPosition', width: 100, align: "left", statistics: true },
  199. { label: '班主任', name: 'Director', width: 90, align: "left", statistics: true },
  200. { label: '名师工作室', name: 'TeacherWorkRoom', width: 100, align: "left", statistics: true },
  201. { label: '专业负责人、教研/备课组长', name: 'MajorPeople', width: 160, align: "left", statistics: true },
  202. { label: '办公组长', name: 'WorkLeader', width: 90, align: "left", statistics: true },
  203. { label: '实训室类管理员', name: 'TrainAdmin', width: 100, align: "left", statistics: true },
  204. { label: '纪委/支部/工会委员、兼职督学', name: 'CommitteeMember', width: 180, align: "left", statistics: true },
  205. { label: '正课节数', name: 'LessonNum', width: 70, align: "left", statistics: true },
  206. { label: '正课课时分', name: 'LessonHour', width: 70, align: "left", statistics: true },
  207. { label: '早自习节数', name: 'MorningStudyNum', width: 70, align: "left", statistics: true },
  208. { label: '早自习课时分', name: 'MorningStudyHour', width: 80, align: "left", statistics: true },
  209. { label: '晚自习节数', name: 'NightStudyNum', width: 70, align: "left", statistics: true },
  210. { label: '晚自习课时分', name: 'NightStudyHour', width: 80, align: "left", statistics: true },
  211. { label: '两操节数', name: 'TwoExerciseNum', width: 70, align: "left", statistics: true },
  212. { label: '两操课时分', name: 'TwoExerciseHour', width: 70, align: "left", statistics: true },
  213. { label: '临时代班天数', name: 'TempWorkDay', width: 80, align: "left", statistics: true },
  214. { label: '临时代班岗位分', name: 'TempWorkScore', width: 100, align: "left", statistics: true },
  215. { label: '缺班天数', name: 'OffWorkDay', width: 70, align: "left", statistics: true },
  216. { label: '临时缺班扣减岗位分', name: 'OffWorkMinusScore', width: 140, align: "left", statistics: true },
  217. { label: '值日天数', name: 'OnDutyDay', width: 70, align: "left", statistics: true },
  218. { label: '值日岗位分', name: 'OnDutyScore', width: 70, align: "left", statistics: true },
  219. { label: '应出勤天数 ', name: 'ShouldWorkDay', width: 70, align: "left", statistics: true },
  220. { label: '出勤基础分 ', name: 'WorkBasicScore', width: 70, align: "left", statistics: true },
  221. { label: '出勤缺卡次数', name: 'WorkOffCount', width: 80, align: "left", statistics: true },
  222. { label: '出勤考核扣减分', name: 'WorkMinusScore', width: 100, align: "left", statistics: true },
  223. { label: '大型活动考核扣减分', name: 'BigActivityMinusScore', width: 120, align: "left", statistics: true },
  224. { label: '旷工天数', name: 'AbsenteeismDay', width: 90, align: "left", statistics: true },
  225. { label: '旷工扣减分', name: 'AbsenteeismMinusScore', width: 90, align: "left", statistics: true },
  226. { label: '出勤(病事公产活动等)考核情况说明', name: 'WorkRemark', width: 200, align: "left", statistics: true },
  227. { label: '常规工作考核基础分', name: 'RoutineBasicScore', width: 120, align: "left", statistics: true },
  228. { label: '常规工作考核扣减分', name: 'RoutineMinusScore', width: 120, align: "left", statistics: true },
  229. { label: '常规工作考核情况详细说明', name: 'RoutineRemark', width: 160, align: "left", statistics: true },
  230. { label: '月绩效考核分合计', name: 'PerformanceTotalScore', width: 110, align: "left", statistics: true },
  231. { label: '假期工作绩效', name: 'HolidayJobPerformance', width: 90, align: "center", statistics: true },
  232. ],
  233. mainId: 'Id',
  234. isPage: true,
  235. rows: 300,
  236. sidx: 'IssueYear desc, IssueMonth desc, CreateTime desc ',
  237. isMultiselect: true
  238. });
  239. page.search();
  240. },
  241. search: function (param) {
  242. param = param || {};
  243. param.Sqlparam = "";
  244. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  245. }
  246. };
  247. refreshGirdData = function () {
  248. $('#gridtable').jfGridSet('reload');
  249. };
  250. page.init();
  251. }