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.

4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-03-30 14:11
  5. * 描 述:工作简历
  6. */
  7. var refreshGirdData;
  8. var empId = request('empId');
  9. var status = false;
  10. var bootstrap = function ($, learun) {
  11. "use strict";
  12. var page = {
  13. init: function () {
  14. page.refreshStatus();
  15. page.initGird();
  16. page.bind();
  17. },
  18. refreshStatus: function () {
  19. //获取主表状态
  20. learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/EmpInfo/GetFormData?keyValue=' + empId, function (res) {
  21. if (res.code == 200) {
  22. if (res.data.EmpInfo != null) {
  23. status = res.data.EmpInfo.ResumeStatus;
  24. }
  25. }
  26. });
  27. },
  28. bind: function () {
  29. // 刷新
  30. $('#lr_refresh').on('click', function () {
  31. location.reload();
  32. });
  33. // 新增
  34. $('#lr_add').on('click', function () {
  35. if (status == 'true') {
  36. learun.alert.warning('已提交,不能再修改!');
  37. return;
  38. }
  39. learun.layerForm({
  40. id: 'formInPM_Resume',
  41. title: '新增',
  42. url: top.$.rootUrl + '/EducationalAdministration/PM_Resume/Form?empId=' + empId,
  43. width: 600,
  44. height: 400,
  45. callBack: function (id) {
  46. return top[id].acceptClick(refreshGirdData);
  47. }
  48. });
  49. });
  50. // 编辑
  51. $('#lr_edit').on('click', function () {
  52. if (status == 'true') {
  53. learun.alert.warning('已提交,不能再修改!');
  54. return;
  55. }
  56. var keyValue = $('#gridtable').jfGridValue('ID');
  57. if (learun.checkrow(keyValue)) {
  58. learun.layerForm({
  59. id: 'formInPM_Resume',
  60. title: '编辑',
  61. url: top.$.rootUrl + '/EducationalAdministration/PM_Resume/Form?keyValue=' + keyValue + '&empId=' + empId,
  62. width: 600,
  63. height: 400,
  64. callBack: function (id) {
  65. return top[id].acceptClick(refreshGirdData);
  66. }
  67. });
  68. }
  69. });
  70. // 删除
  71. $('#lr_delete').on('click', function () {
  72. if (status == 'true') {
  73. learun.alert.warning('已提交,不能再修改!');
  74. return;
  75. }
  76. var keyValue = $('#gridtable').jfGridValue('ID');
  77. if (learun.checkrow(keyValue)) {
  78. learun.layerConfirm('是否确认删除该项!', function (res) {
  79. if (res) {
  80. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/PM_Resume/DeleteForm', { keyValue: keyValue }, function () {
  81. refreshGirdData();
  82. });
  83. }
  84. });
  85. }
  86. });
  87. // 提交
  88. $('#lr_check').on('click', function () {
  89. if (status == 'true') {
  90. learun.alert.warning('已提交,不能再修改!');
  91. return;
  92. }
  93. learun.layerConfirm('是否确认提交!', function (res) {
  94. if (res) {
  95. learun.postForm( top.$.rootUrl + '/EducationalAdministration/PM_Resume/Submit', { empId: empId, status: true }, function (info) {
  96. refreshGirdData();
  97. });
  98. }
  99. });
  100. });
  101. // 取消提交
  102. $('#lr_uncheck').on('click', function () {
  103. learun.layerConfirm('是否取消提交!', function (res) {
  104. if (res) {
  105. learun.postForm( top.$.rootUrl + '/EducationalAdministration/PM_Resume/Submit', { empId: empId, status: false }, function () {
  106. refreshGirdData();
  107. });
  108. }
  109. });
  110. });
  111. },
  112. // 初始化列表
  113. initGird: function () {
  114. $('#gridtable').jfGrid({
  115. url: top.$.rootUrl + '/EducationalAdministration/PM_Resume/GetPageList',
  116. headData: [
  117. { label: "开始时间", name: "RSTime", width: 130, align: "left" },
  118. { label: "结束时间", name: "RTime", width: 130, align: "left" },
  119. { label: "工作单位", name: "UnitName", width: 100, align: "left" },
  120. { label: "证明人", name: "Witness", width: 100, align: "left" },
  121. {
  122. label: "部门", name: "DepartmentID", width: 100, align: "left",
  123. formatterAsync: function (callback, value, row, op, $cell) {
  124. learun.clientdata.getAsync('custmerData', {
  125. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  126. key: value,
  127. keyId: 'id',
  128. callback: function (_data) {
  129. callback(_data['name']);
  130. }
  131. });
  132. }
  133. },
  134. { label: "岗位", name: "PostID", width: 100, align: "left" },
  135. { label: "工作描述", name: "Describe", width: 100, align: "left" },
  136. { label: "是否同步", name: "IsSync", width: 100, align: "left", formatter: function (cellvalue) { return cellvalue == true ? "是" : "否" } },
  137. {
  138. label: "提交状态", name: "SubmitStatus", width: 100, align: "left",
  139. formatter: function (cellvalue) {
  140. return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  141. }
  142. },
  143. ],
  144. mainId: 'ID',
  145. isPage: true,
  146. sidx:'UpdateTime desc'
  147. });
  148. page.search();
  149. },
  150. search: function (param) {
  151. param = param || {};
  152. param.EmpId = empId;
  153. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  154. }
  155. };
  156. refreshGirdData = function () {
  157. page.search();
  158. page.refreshStatus();
  159. };
  160. page.init();
  161. }