/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 * 日 期:2021-02-21 10:07 * 描 述:会议管理 */ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var processId = ''; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); $('#MeetingPlace').lrselect({ allowSearch: true, url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/GetList', value: "ID", text: "Name" }); $('#CreateUser').lrUserSelect(0); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 查看 $('#lr_view').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'viewform', title: '查看会议工作', url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/FormView?keyValue=' + keyValue, width: 1000, height: 800, btn: null }); } }); // 会议签到情况 $('#lr_case').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'viewform', title: '签到情况', url: top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/Index?MeetID=' + keyValue, width: 1000, height: 800, btn: null }); } }); }, // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGridLei({ url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/GetPageList', headData: [ { label: "会议主题", name: "MeetingTitle", width: 150, align: "left" }, { label: "会议场地", name: "ConferenceRoomName", width: 100, align: "left" }, { label: "开始时间", name: "BeginTime", width: 120, align: "left" }, { label: "结束时间", name: "EndTime", width: 120, align: "left" }, { label: "会议记录者", name: "RecordPerson", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('user', { key: value, callback: function (_data) { callback(_data.name); } }); } }, { label: "联系人", name: "Linkman", width: 100, align: "left" }, { label: "联系电话", name: "LinkPhone", width: 100, align: "left" }, { label: "申请人", name: "CreateUser", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('user', { key: value, callback: function (_data) { callback(_data.name); } }); } }, { label: "申请时间", name: "CreateTime", width: 120, align: "left" }, { label: "会议状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { return cellvalue == "1" ? "已通过" : cellvalue == "2" ? "未通过" : cellvalue == "3" ? "审核中" : "未审核"; } }, { label: "审核人", name: "CheckUser", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('user', { key: value, callback: function (_data) { //callback(_data.name); return row.CheckStatus != "1" && row.CheckStatus != "2" ? "" : callback(_data.name); } }); } }, { label: "审核时间", name: "CheckTime", width: 120, align: "left", formatter: function (value, row) { return row.CheckStatus != "1" && row.CheckStatus != "2" ? "" : value; } }, ], mainId: 'Id', isPage: true, sidx: 'CreateTime desc' }); page.search(); }, search: function (param) { param = param || {}; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function (res, postData) { if (res && res.code && res.code == 200) { // 发起流程 var postData = { schemeCode: 'MeetingManagementApply',// 填写流程对应模板编号 processId: processId, level: '1', }; learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { learun.loading(false); }); } page.search(); }; page.init(); }