|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2020-03-04 16:01
- * 描 述:岗位申请
- */
- var refreshGirdData;
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- page.initGird();
- page.bind();
- },
- bind: function () {
- $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
- page.search(queryJson);
- }, 220, 400);
- $('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' });
- $('#PositionId').lrselect({
- allowSearch: true,
- url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList',
- value: "Id",
- text: "Name"
- });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
-
- // 查看
- $('#lr_view').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'formview',
- title: '查看',
- url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/FormView?keyValue=' + keyValue,
- width: 600,
- height: 400,
- btn: null
- });
- }
- });
- // 审核
- $('#lr_check').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认审核通过该项!', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: "1" }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- // 去审核
- $('#lr_uncheck').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认审核不通过该项!', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: "2" }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/GetPageList',
- headData: [
- { label: "学生姓名", name: "StuName", width: 100, align: "left" },
- { label: "学生学号", name: "StuNo", width: 100, align: "left" },
- { label: "所属专业", name: "MajorName", width: 100, align: "left" },
- { label: "所属班级", name: "ClassName", width: 100, align: "left" },
- { label: "岗位名称", name: "Name", width: 100, align: "left" },
- { label: "薪资(元/月)", name: "Salary", width: 100, align: "left" },
- { label: "学期", name: "Semester", width: 100, align: "left" },
- { label: "申请时间", name: "ApplyTime", width: 130, align: "left" },
- {
- label: "申请状态", name: "CheckStatus", width: 100, align: "left",
- formatter: function (cellvalue) {
- return cellvalue == 1 ? "通过" : cellvalue == 2 ? "未通过" : "待审核";
- }
- },
- { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
- ],
- mainId: 'Id',
- isPage: true,
- sidx: 'CreateTime desc'
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|