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.
 
 
 
 
 
 

120 lines
5.1 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_add').on('click', function () {
  32. learun.layerForm({
  33. id: 'form',
  34. title: '新增',
  35. url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/Form',
  36. width: 600,
  37. height: 400,
  38. callBack: function (id) {
  39. return top[id].acceptClick(refreshGirdData);
  40. }
  41. });
  42. });
  43. // 编辑
  44. $('#lr_edit').on('click', function () {
  45. var keyValue = $('#gridtable').jfGridValue('Id');
  46. if (learun.checkrow(keyValue)) {
  47. var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
  48. if (CheckStatus == 1 || CheckStatus == 2) {
  49. learun.alert.warning("当前项目已审核!");
  50. return false;
  51. }
  52. learun.layerForm({
  53. id: 'form',
  54. title: '编辑',
  55. url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/Form?keyValue=' + keyValue,
  56. width: 600,
  57. height: 400,
  58. callBack: function (id) {
  59. return top[id].acceptClick(refreshGirdData);
  60. }
  61. });
  62. }
  63. });
  64. // 删除
  65. $('#lr_delete').on('click', function () {
  66. var keyValue = $('#gridtable').jfGridValue('Id');
  67. if (learun.checkrow(keyValue)) {
  68. var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
  69. if (CheckStatus == 1 || CheckStatus == 2) {
  70. learun.alert.warning("当前项目已审核!");
  71. return false;
  72. }
  73. learun.layerConfirm('是否确认删除该项!', function (res) {
  74. if (res) {
  75. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DeleteForm', { keyValue: keyValue }, function () {
  76. refreshGirdData();
  77. });
  78. }
  79. });
  80. }
  81. });
  82. },
  83. // 初始化列表
  84. initGird: function () {
  85. $('#gridtable').lrAuthorizeJfGrid({
  86. url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/GetPageList',
  87. headData: [
  88. { label: "学生姓名", name: "StuName", width: 100, align: "left" },
  89. { label: "学生学号", name: "StuNo", width: 100, align: "left" },
  90. { label: "所属专业", name: "MajorName", width: 100, align: "left" },
  91. { label: "所属班级", name: "ClassName", width: 100, align: "left" },
  92. { label: "岗位名称", name: "Name", width: 100, align: "left" },
  93. { label: "薪资(元/月)", name: "Salary", width: 100, align: "left" },
  94. { label: "学期", name: "Semester", width: 100, align: "left" },
  95. { label: "申请时间", name: "ApplyTime", width: 130, align: "left" },
  96. {
  97. label: "申请状态", name: "CheckStatus", width: 100, align: "left",
  98. formatter: function (cellvalue) {
  99. return cellvalue == 1 ? "通过" : cellvalue == 2 ? "未通过" : "待审核";
  100. }
  101. },
  102. ],
  103. mainId: 'Id',
  104. isPage: true,
  105. sidx: 'CreateTime desc'
  106. });
  107. page.search();
  108. },
  109. search: function (param) {
  110. param = param || {};
  111. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  112. }
  113. };
  114. refreshGirdData = function () {
  115. page.search();
  116. };
  117. page.init();
  118. }