|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2020-02-10 10:51
- * 描 述:教职工招聘计划
- */
- 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);
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/PersonnelManagement/TeacherRecruitPlan/Form',
- width: 800,
- height: 700,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/PersonnelManagement/TeacherRecruitPlan/Form?keyValue=' + keyValue,
- width: 800,
- height: 700,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- // 删除
- $('#lr_delete').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherRecruitPlan/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').jfGrid({
- url: top.$.rootUrl + '/PersonnelManagement/TeacherRecruitPlan/GetPageList',
- headData: [
- {
- label: "招聘单位", name: "Commpany", width: 140, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
- key: value,
- keyId: 'f_companyid',
- callback: function (_data) {
- callback(_data['f_fullname']);
- }
- });
- }
- },
- {
- label: "主管部门", name: "Department", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
- key: value,
- keyId: 'id',
- callback: function (_data) {
- callback(_data['name']);
- }
- });
- }
- },
- { label: "岗位名称", name: "TitleOfTechPost", width: 100, align: "left" },
- {
- label: "岗位类别", name: "EmpSortNo", width: 80, align: "left",
- formatter: function (cellvalue) {
- if (cellvalue == 1) {
- return "教师岗";
- } else {
- return "管理岗";
- }
- }
- },
- { label: "编制数", name: "StaffSize", width: 50, align: "left" },
- { label: "招聘人数", name: "RecruitNum", width: 60, align: "left" },
- { label: "实有人数", name: "ActualSize", width: 60, align: "left" },
- { label: "年龄", name: "RecruitAge", width: 100, align: "left" },
- {
- label: "学历", name: "RecordInSchool", width: 80, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'RecordInSchool',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "专业", name: "RecruitMajor", width: 200, align: "left" },
- {
- label: "学位", name: "InitialDegree", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'DegreeInSchool',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'BCdPartyFace',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "资格要求", name: "Qualification", width: 200, align: "left" },
- { label: "专业类别", name: "MajorCategory", width: 200, align: "left" },
- { label: "考试形式", name: "TestType", width: 200, align: "left" },
- { label: "工作地点", name: "JobAddress", width: 200, align: "left" },
- { label: "备注", name: "Remark", width: 300, align: "left" },
- ],
- mainId: 'Id',
- isPage: true,
- sidx: 'RecruitTime',
- sord: 'desc'
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|