|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-12-31 10:38
- * 描 述:党籍管理
- */
- var refreshGirdData;
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- page.initGird();
- page.bind();
- },
- bind: function () {
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/PersonnelManagement/PMMembership/Form',
- width: 800,
- height: 600,
- 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/PMMembership/Form?keyValue=' + keyValue,
- width: 800,
- height: 600,
- 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/PMMembership/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/PersonnelManagement/PMMembership/GetPageList',
- headData: [
- { label: "姓名", name: "Name", width: 100, align: "left" },
- {
- label: "性别", name: "Gender", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'usersex',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "民族", name: "Nation", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality',
- key: value,
- keyId: 'nationalityno',
- callback: function (_data) {
- callback(_data['nationality']);
- }
- });
- }
- },
- { label: "出生年月", name: "Birthday", width: 100, align: "left" },
- { label: "身份证号", name: "IDCard", width: 150, align: "left" },
- { label: "入党时间", name: "AccessionDate", width: 100, align: "left" },
- {
- label: "是否在职", name: "IsInJob", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'YesOrNoInt',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "参加工作时间", name: "JobDate", width: 100, align: "left" },
- {
- label: "学历", name: "Education", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree',
- key: value,
- keyId: 'culturedegreeno',
- callback: function (_data) {
- callback(_data['culturedegree']);
- }
- });
- }
- },
- { label: "人员类别", name: "Category", width: 100, align: "left" },
- { label: "所在党支部", name: "PartyBranch", width: 100, align: "left" },
- { label: "正式党员日期", name: "FormalDate", width: 100, align: "left" },
- { label: "工作岗位", name: "Post", width: 100, align: "left" },
- { label: "联系电话", name: "Mobile", width: 100, align: "left" },
- { label: "家庭住址", name: "Address", width: 100, align: "left" },
- { label: "培养人", name: "TrainPerson", width: 100, align: "left" },
- {
- label: "审核状态", name: "CheckStatus", width: 100, align: "left",
- formatter: function (cellvalue) {
- return cellvalue == true ? "是" : "否";
- }
- },
- ],
- mainId: 'ID',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|