|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2020-02-03 14:37
- * 描 述:疫情记录
- */
- 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);
- $('#Type').lrDataItemSelect({ code: 'EUserType' });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituation/Form',
- width: 1000,
- height: 650,
- 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/EpidemicSituation/Form?keyValue=' + keyValue,
- width: 1000,
- height: 650,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- // 详情
- $('#lr_detail').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ID');
- if (learun.checkrow(keyValue)) {
- learun.layerFormForPercent({
- id: 'form',
- title: '详情',
- url: top.$.rootUrl + '/PersonnelManagement/ContactsDetails/Index?keyValue=' + keyValue,
- width: '90%',
- height: '80%',
- btn: null,
- 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/EpidemicSituation/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituation/GetPageList',
- headData: [
- { label: "填表人员", name: "Creater", width: 100, align: "left" },
- { label: "填报日期", name: "CreaterTime", width: 100, align: "left" },
- {
- label: "单位名称", name: "UnitName", width: 100, 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: "Type", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'EUserType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- 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: "BackUser", width: 100, align: "left" },
- {
- label: "与填报人关系", name: "RelationShip", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'ERelationship',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- 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: "IDCard", width: 100, align: "left" },
- { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
- { label: "联系方式", name: "Mobile", width: 100, align: "left" },
- {
- label: "前往省份", name: "Provice", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE',
- key: value,
- keyId: 'pcode',
- callback: function (_data) {
- callback(_data['pname']);
- }
- });
- }
- },
- { label: "前往详细地址", name: "Objective", width: 100, align: "left" },
- {
- label: "外出原因", name: "OutReason", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'OutReason',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "外出时间", name: "OutTime", width: 100, align: "left" },
- { label: "返回时间", name: "BackHomeTime", width: 100, align: "left" },
- {
- label: "交通工具", name: "Vehicle", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'Vehicle',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "交通工具号码", name: "VehicleNum", width: 100, align: "left" },
- { label: "返回抵达目的地", name: "BackAddress", 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();
- }
|