|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2020-03-23 11:25
- * 描 述:培训申请管理
- */
- 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/BC_TrainingApplication/Form',
- width: 600,
- height: 400,
- 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/BC_TrainingApplication/Form?keyValue=' + keyValue,
- width: 600,
- height: 400,
- 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/BC_TrainingApplication/DeleteForm', { keyValue: keyValue}, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- // 打印
- $('#lr_print').on('click', function () {
- $('#gridtable').jqprintTable();
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/PersonnelManagement/BC_TrainingApplication/GetPageList',
- headData: [
- { label: "培训项目", name: "Name", width: 100, align: "left"},
- { label: "培训内容", name: "Content", width: 100, align: "left"},
- { label: "申请人", name: "Creater", width: 100, align: "left"},
- { label: "申请时间", name: "CreateTime", width: 100, align: "left"},
- { label: "备注", name: "Remark", width: 100, align: "left"},
- ],
- mainId:'ID',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|