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.
 
 
 
 
 
 

109 lines
4.7 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-03-04 16:01
  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. $('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' });
  20. $('#PositionId').lrselect({
  21. allowSearch: true,
  22. url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList',
  23. value: "Id",
  24. text: "Name"
  25. });
  26. // 刷新
  27. $('#lr_refresh').on('click', function () {
  28. location.reload();
  29. });
  30. // 查看
  31. $('#lr_view').on('click', function () {
  32. var keyValue = $('#gridtable').jfGridValue('Id');
  33. if (learun.checkrow(keyValue)) {
  34. learun.layerForm({
  35. id: 'formview',
  36. title: '查看',
  37. url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/FormView?keyValue=' + keyValue,
  38. width: 600,
  39. height: 400,
  40. btn: null
  41. });
  42. }
  43. });
  44. //  审核
  45. $('#lr_check').on('click', function () {
  46. var keyValue = $('#gridtable').jfGridValue('Id');
  47. if (learun.checkrow(keyValue)) {
  48. learun.layerConfirm('是否确认审核通过该项!', function (res) {
  49. if (res) {
  50. learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: "1" }, function () {
  51. refreshGirdData();
  52. });
  53. }
  54. });
  55. }
  56. });
  57. //  去审核
  58. $('#lr_uncheck').on('click', function () {
  59. var keyValue = $('#gridtable').jfGridValue('Id');
  60. if (learun.checkrow(keyValue)) {
  61. learun.layerConfirm('是否确认审核不通过该项!', function (res) {
  62. if (res) {
  63. learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: "2" }, function () {
  64. refreshGirdData();
  65. });
  66. }
  67. });
  68. }
  69. });
  70. },
  71. // 初始化列表
  72. initGird: function () {
  73. $('#gridtable').lrAuthorizeJfGrid({
  74. url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/GetPageList',
  75. headData: [
  76. { label: "学生姓名", name: "StuName", width: 100, align: "left" },
  77. { label: "学生学号", name: "StuNo", width: 100, align: "left" },
  78. { label: "所属专业", name: "MajorName", width: 100, align: "left" },
  79. { label: "所属班级", name: "ClassName", width: 100, align: "left" },
  80. { label: "岗位名称", name: "Name", width: 100, align: "left" },
  81. { label: "薪资(元/月)", name: "Salary", width: 100, align: "left" },
  82. { label: "学期", name: "Semester", width: 100, align: "left" },
  83. { label: "申请时间", name: "ApplyTime", width: 130, align: "left" },
  84. {
  85. label: "申请状态", name: "CheckStatus", width: 100, align: "left",
  86. formatter: function (cellvalue) {
  87. return cellvalue == 1 ? "通过" : cellvalue == 2 ? "未通过" : "待审核";
  88. }
  89. },
  90. { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
  91. ],
  92. mainId: 'Id',
  93. isPage: true,
  94. sidx: 'CreateTime desc'
  95. });
  96. page.search();
  97. },
  98. search: function (param) {
  99. param = param || {};
  100. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  101. }
  102. };
  103. refreshGirdData = function () {
  104. page.search();
  105. };
  106. page.init();
  107. }