Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

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