|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2020-05-06 11:20
- * 描 述:在线报名
- */
- 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);
- $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
- $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/EducationalAdministration/SignUpAboutOnline/Form',
- width: 1000,
- height: 800,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
- if (CheckStatus == 1) {
- learun.alert.warning("当前记录已审核!");
- return false;
- }
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/EducationalAdministration/SignUpAboutOnline/Form?keyValue=' + keyValue,
- width: 1000,
- height: 800,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- // 删除
- $('#lr_delete').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
- if (CheckStatus == 1) {
- learun.alert.warning("当前记录已审核!");
- return false;
- }
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SignUpAboutOnline/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- // 审核
- $('#lr_check').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
- if (CheckStatus == 1) {
- learun.alert.warning("当前记录已审核!");
- return false;
- }
- learun.layerConfirm('是否确认审核该项!', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/SignUpAboutOnline/DoCheck', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- $('#lr_uncheck').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
- if (CheckStatus == 0) {
- learun.alert.warning("当前记录还未审核!");
- return false;
- }
- learun.layerConfirm('是否确认去审核该项!', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/SignUpAboutOnline/DoUnCheck', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/SignUpAboutOnline/GetPageList',
- headData: [
- {
- label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) {
- return cellvalue == 1 ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-warning\">未审核</span>";
- }
- },
- {
- label: "报名日期", name: "SignUpTime", width: 130, align: "left", formatter: function (cellvalue) {
- return cellvalue == "0001-01-01 00:00:00" ? "" : cellvalue.slice(0,10);
- }
- },
- { label: "姓名", name: "RealName", width: 100, align: "left" },
- {
- label: "性别", name: "Sex", 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: "NationalityNo", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'National',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "毕业学校", name: "GraduateSchool", width: 100, align: "left" },
- { label: "班级", name: "ClassNo", width: 100, align: "left" },
- { label: "中考成绩", name: "MidExamScore", width: 100, align: "left" },
- { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
- { label: "户口所在地", name: "OriginAddress", width: 100, align: "left" },
- { label: "身份证号", name: "IdCard", width: 150, align: "left" },
- { label: "家长电话", name: "Phone", width: 100, align: "left" },
- //{
- // label: "系部", name: "DeptNo", width: 100, align: "left",
- // formatterAsync: function (callback, value, row, op, $cell) {
- // learun.clientdata.getAsync('custmerData', {
- // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
- // key: value,
- // keyId: 'deptno',
- // callback: function (_data) {
- // callback(_data['deptname']);
- // }
- // });
- // }
- //},
- {
- label: "专业", name: "MajorNo", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
- key: value,
- keyId: 'majorno',
- callback: function (_data) {
- callback(_data['majorname']);
- }
- });
- }
- },
- //{
- // label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left",
- // formatterAsync: function (callback, value, row, op, $cell) {
- // learun.clientdata.getAsync('custmerData', {
- // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdPartyFace',
- // key: value,
- // keyId: 'partyfaceno',
- // callback: function (_data) {
- // callback(_data['partyface']);
- // }
- // });
- // }
- //},
- //{
- // label: "户口性质", name: "ResidenceNo", width: 100, align: "left",
- // formatterAsync: function (callback, value, row, op, $cell) {
- // learun.clientdata.getAsync('dataItem', {
- // key: value,
- // code: 'ResidenceNo',
- // callback: function (_data) {
- // callback(_data.text);
- // }
- // });
- // }
- //},
- {
- label: "是否住宿", name: "IsAccommodate", 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: "HeightWeight", width: 100, align: "left" },
- //{ label: "创建时间", name: "CreateTime", width: 130, align: "left" },
- { label: "备注", name: "Remark", width: 130, align: "left" },
- ],
- mainId: 'Id',
- isPage: true,
- sidx: 'CreateTime',
- sord: 'desc'
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|