|
- /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
- * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
- * 创建人:超级管理员
- * 日 期:2021-12-16 10:14
- * 描 述:长阳迎新
- */
- var refreshGirdData;
- var bootstrap = function ($, learun) {
- "use strict";
- var strsql = '';
- var page = {
- init: function () {
- page.initGird();
- page.bind();
- },
- bind: function () {
- $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
- page.search(queryJson);
- }, 220, 400);
- $('#Sex').lrDataItemSelect({ code: 'usersex' });
- $('#StuScore').lrDataItemSelect({
- code: 'EnrollScore',
- select: function (item) {
- if (item != undefined) {
- switch (item.id) {
- case item.id:
- strsql = " and t.StuScore " + item.id + "";
- break;
- default:
- break;
- }
- }
- }
- });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 录取
- $('#lr_enroll').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ID');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认录取选中项!', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/EnrollForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- // 取消录取
- $('#lr_cancel').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ID');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认取消录取选中项!', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/CancelForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetPageList',
- headData: [
- {
- label: "是否录取", name: "IsEnroll", width: 80, align: "left",
- formatter: function (cellvalue) {
- return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
- "<span class=\"label label-danger\">否</span>";
- }
- },
- {
- label: "录取意向(本校)", name: "IsCYSchool", width: 100, align: "left",
- formatter: function (cellvalue) {
- return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
- "<span class=\"label label-danger\">否</span>";
- }
- },
- { label: "中考总分", name: "StuScore", width: 100, align: "left" },
- { label: "学生姓名", name: "StuName", width: 100, align: "left" },
- {
- label: "性别", name: "Sex", width: 80, 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: "CardNo", width: 150, align: "left" },
- { label: "县区名称", name: "Address", width: 150, align: "left" },
- { label: "初中毕业学校", name: "BySchool", width: 150, align: "left" },
- { label: "初中学号", name: "H_SchoolNo", width: 150, align: "left" },
- { label: "中考报名号", name: "ApplyNo", width: 150, align: "left" },
- { label: "第一志愿", name: "FirstVolunteer", width: 120, align: "left" },
- { label: "第二志愿", name: "SecondVolunteer", width: 120, align: "left" },
- { label: "第三志愿", name: "ThirdVolunteer", width: 120, align: "left" },
- { label: "第四志愿", name: "FouthVolunteer", width: 120, align: "left" },
- { label: "第五志愿", name: "FifthVolunteer", width: 120, align: "left" },
- { label: "第六志愿", name: "SixthVolunteer", width: 120, align: "left" },
- { label: "第七志愿", name: "SeventhVolunteer", width: 120, align: "left" },
- { label: "第八志愿", name: "EighthVolunteer", width: 120, align: "left" },
- { label: "第九志愿", name: "NinthVolunteer", width: 120, align: "left" },
- { label: "备注", name: "Demo", width: 100, align: "left" },
- ],
- mainId: 'ID',
- isPage: true,
- isMultiselect: true
-
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.SqlParameter = strsql + " and MajorOne is null and IsCYSchool = 'True' ";
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- $('#gridtable').jfGridSet('reload');
- };
- page.init();
- }
|