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.
 
 
 
 
 
 

172 lines
7.8 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-02-10 10:51
  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. $('#lr_refresh').on('click', function () {
  21. location.reload();
  22. });
  23. // 新增
  24. $('#lr_add').on('click', function () {
  25. learun.layerForm({
  26. id: 'form',
  27. title: '新增',
  28. url: top.$.rootUrl + '/PersonnelManagement/TeacherRecruitPlan/Form',
  29. width: 800,
  30. height: 700,
  31. callBack: function (id) {
  32. return top[id].acceptClick(refreshGirdData);
  33. }
  34. });
  35. });
  36. // 编辑
  37. $('#lr_edit').on('click', function () {
  38. var keyValue = $('#gridtable').jfGridValue('Id');
  39. if (learun.checkrow(keyValue)) {
  40. learun.layerForm({
  41. id: 'form',
  42. title: '编辑',
  43. url: top.$.rootUrl + '/PersonnelManagement/TeacherRecruitPlan/Form?keyValue=' + keyValue,
  44. width: 800,
  45. height: 700,
  46. callBack: function (id) {
  47. return top[id].acceptClick(refreshGirdData);
  48. }
  49. });
  50. }
  51. });
  52. // 删除
  53. $('#lr_delete').on('click', function () {
  54. var keyValue = $('#gridtable').jfGridValue('Id');
  55. if (learun.checkrow(keyValue)) {
  56. learun.layerConfirm('是否确认删除该项!', function (res) {
  57. if (res) {
  58. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherRecruitPlan/DeleteForm', { keyValue: keyValue }, function () {
  59. refreshGirdData();
  60. });
  61. }
  62. });
  63. }
  64. });
  65. },
  66. // 初始化列表
  67. initGird: function () {
  68. $('#gridtable').jfGrid({
  69. url: top.$.rootUrl + '/PersonnelManagement/TeacherRecruitPlan/GetPageList',
  70. headData: [
  71. {
  72. label: "招聘单位", name: "Commpany", width: 140, align: "left",
  73. formatterAsync: function (callback, value, row, op, $cell) {
  74. learun.clientdata.getAsync('custmerData', {
  75. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
  76. key: value,
  77. keyId: 'f_companyid',
  78. callback: function (_data) {
  79. callback(_data['f_fullname']);
  80. }
  81. });
  82. }
  83. },
  84. {
  85. label: "主管部门", name: "Department", width: 100, align: "left",
  86. formatterAsync: function (callback, value, row, op, $cell) {
  87. learun.clientdata.getAsync('custmerData', {
  88. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  89. key: value,
  90. keyId: 'id',
  91. callback: function (_data) {
  92. callback(_data['name']);
  93. }
  94. });
  95. }
  96. },
  97. { label: "岗位名称", name: "TitleOfTechPost", width: 100, align: "left" },
  98. {
  99. label: "岗位类别", name: "EmpSortNo", width: 80, align: "left",
  100. formatter: function (cellvalue) {
  101. if (cellvalue == 1) {
  102. return "教师岗";
  103. } else {
  104. return "管理岗";
  105. }
  106. }
  107. },
  108. { label: "编制数", name: "StaffSize", width: 50, align: "left" },
  109. { label: "招聘人数", name: "RecruitNum", width: 60, align: "left" },
  110. { label: "实有人数", name: "ActualSize", width: 60, align: "left" },
  111. { label: "年龄", name: "RecruitAge", width: 100, align: "left" },
  112. {
  113. label: "学历", name: "RecordInSchool", width: 80, align: "left",
  114. formatterAsync: function (callback, value, row, op, $cell) {
  115. learun.clientdata.getAsync('dataItem', {
  116. key: value,
  117. code: 'RecordInSchool',
  118. callback: function (_data) {
  119. callback(_data.text);
  120. }
  121. });
  122. }
  123. },
  124. { label: "专业", name: "RecruitMajor", width: 200, align: "left" },
  125. {
  126. label: "学位", name: "InitialDegree", width: 100, align: "left",
  127. formatterAsync: function (callback, value, row, op, $cell) {
  128. learun.clientdata.getAsync('dataItem', {
  129. key: value,
  130. code: 'DegreeInSchool',
  131. callback: function (_data) {
  132. callback(_data.text);
  133. }
  134. });
  135. }
  136. },
  137. {
  138. label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left",
  139. formatterAsync: function (callback, value, row, op, $cell) {
  140. learun.clientdata.getAsync('dataItem', {
  141. key: value,
  142. code: 'BCdPartyFace',
  143. callback: function (_data) {
  144. callback(_data.text);
  145. }
  146. });
  147. }
  148. },
  149. { label: "资格要求", name: "Qualification", width: 200, align: "left" },
  150. { label: "专业类别", name: "MajorCategory", width: 200, align: "left" },
  151. { label: "考试形式", name: "TestType", width: 200, align: "left" },
  152. { label: "工作地点", name: "JobAddress", width: 200, align: "left" },
  153. { label: "备注", name: "Remark", width: 300, align: "left" },
  154. ],
  155. mainId: 'Id',
  156. isPage: true,
  157. sidx: 'RecruitTime',
  158. sord: 'desc'
  159. });
  160. page.search();
  161. },
  162. search: function (param) {
  163. param = param || {};
  164. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  165. }
  166. };
  167. refreshGirdData = function () {
  168. page.search();
  169. };
  170. page.init();
  171. }