|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2020-02-03 14:44
- * 描 述:疫情详细信息
- */
- var refreshGirdData;
- var EID = request('keyValue');
- 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: 'formDetail',
- title: '新增',
- url: top.$.rootUrl + '/PersonnelManagement/ContactsDetails/Form?EID=' + EID,
- width: 600,
- height: 500,
- 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: 'formDetail',
- title: '编辑',
- url: top.$.rootUrl + '/PersonnelManagement/ContactsDetails/Form?keyValue=' + keyValue,
- width: 600,
- height: 500,
- 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/ContactsDetails/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/PersonnelManagement/ContactsDetails/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: "Mobile", width: 100, align: "left" },
- { label: "身份证号", name: "IDCard", width: 100, align: "left" },
- {
- label: "隔离方式", name: "QTType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'QuarantineType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "隔离地点", name: "QTAddress", width: 100, align: "left" },
- { label: "隔离时间", name: "QTTime", width: 100, align: "left" },
- { label: "解除隔离时间", name: "QTContactTime", width: 100, align: "left" },
- {
- label: "是否发热", name: "Fever", 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);
- }
- });
- }
- },
- ],
- mainId: 'ID',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.EID = EID;
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|