|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-07-17 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);
- }, 400, 440, true,
- function () {
- var cardobj = idcardreader.readcard("lr_btn_readcard");
- if (cardobj.resultFlag == 0) {
- learun.alert.success("身份证信息读取成功");
- $("#StuName").val(cardobj.resultContent.partyName);
- $("#IDCard").val(cardobj.resultContent.certNumber);
- } else {
- learun.alert.error('读取错误!未检测到身份证或设备连接错误,请调整身份证位置并重新读取,多次未读取到身份证信息则可能是身份证芯片已损坏!');
- }
- });
-
- $('#DeptNo').lrselect({
- allowSearch: true,
- value: "deptno",
- text: "deptname",
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
- select: function (item) {
- if (item) {
- $('#MajorNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
- param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
- });
- } else {
- $('#MajorNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
- param: { strWhere: "1=1 AND CheckMark=1" }
- });
- }
-
- }
- });
- $('#MajorNo').lrselect({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
- value: "majorno",
- text: "majorname",
- param: { strWhere: "1=1 AND CheckMark=1" },
- select: function (item) {
- if (item) {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
- });
- } else {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1" }
- });
- }
- }
- });
- $('#Year').lrselect({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
- value: "year",
- text: "year",
- })
- $('#ClassNo').lrselect({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1" },
- value: "classno",
- text: "classname"
- });
- $('#Admissions').lrDataItemSelect({ code: 'enrollType' });
- //刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 修改招生类别
- $('#lr_enrollplan').on('click', function () {
- var data = $('#gridtable').jfGridGet('rowdata');
- if (data.length > 0) {
- var str = '';
- $.each(data, function (i, item) {
- str += item.StuId + ',';
- });
- learun.layerForm({
- id: 'form',
- title: '修改招生类别',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/EnrollTypeForm?str=' + str,
- width: 260,
- height: 260,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
-
- }
-
-
- });
-
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/Form',
- width: 800,
- height: 600,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/Form?keyValue=' + keyValue,
- width: 800,
- height: 600,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- $('#lr_view').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '查看',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
- width: 800,
- height: 600,
- btn: null
- });
- }
- });
- // 删除
- $('#lr_delete').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
-
- // 同步系部
- $('#lr_syn').on('click', function () {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SyncDept', function () {
- refreshGirdData();
- });
- });
- // 同步专业
- $('#lr_synmajor').on('click', function () {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SyncMajor', function () {
- refreshGirdData();
- });
- });
-
- // 打印
- $('#lr_print').on('click', function () {
- $('#gridtable').jqprintTable();
- });
- // 分配班级
- $('#lr_allocationClass').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: "分配班级",
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllocationClass',
- width: 1300,
- height: 600,
- btn: null
- });
-
- });
- // 分配宿舍
- $('#lr_allocationDormitory').on('click', function () {
- learun.layerFormForPercent({
- id: 'form',
- title: "分配宿舍",
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllocationDormitory',
- width: '90%',
- height: '90%',
- btn: null
- });
- });
-
-
- // 分配宿舍
- $('#lr_newallocationDormitory').on('click', function () {
- learun.layerFormForPercent({
- id: 'form',
- title: "分配宿舍",
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/NewAllocationDormitory',
- width: '90%',
- height: '90%',
- btn: null
- });
- });
-
- // 分配宿舍
- $('#lr_newallocationBed').on('click', function () {
- learun.layerFormForPercent({
- id: 'form',
- title: "分配床位",
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/NewAllocationBed',
- width: '90%',
- height: '90%',
- btn: null
- });
- });
-
- //确认分配宿舍
- $('#lr_confirmDormitory').on('click', function () {
- learun.layerConfirm('是否确认已经分配的宿舍!', function (res) {
- if (res) {
- learun.loading(true, '分配中');
- learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/ConfirmDormitoryTwo', {}, function (val) {
- learun.alert.success('操作成功');
- learun.loading(false);
- });
- }
- });
- })
-
-
-
-
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
- headData: [
- { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
- {
- label: "进度", name: "Status", width: 100, align: "left", formatter: function (value, row) {
- switch (value) {
- case "":
- return '<span class=\"label label-success\">待受理</span>'
- break;
- case 1:
- return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n" class=\"label label-success\">已受理报到</span>'
- break;
-
- case 2:
- return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '" class=\"label label-success\">已受理住宿</span>'
- break;
- case 3:
- return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '" class=\"label label-success\">已受理资助</span>'
- break;
- case 4:
- return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '" class=\"label label-success\">已受理军训</span>'
- break;
- case 5:
- return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '" class=\"label label-success\">已受理缴费</span>'
- break;
- case 6:
- return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '\n' + (row.IsMug ? "拍照" : "未拍照") + '" class=\"label label-success\">已受理拍照</span>'
- break;
- case 7:
- return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '\n' + (row.IsMug ? "拍照" : "未拍照") + '\n' + (row.IsTakeCloths ? "已领军训服" : "未领军训服") + '" class=\"label label-success\">已受理军训服</span>'
- break;
- case 8:
- return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '\n' + (row.IsMug ? "拍照" : "未拍照") + '\n' + (row.IsTakeCloths ? "已领军训服" : "未领军训服") + '\n' + (row.IsQuantity ? "已量校服尺寸" : "未量校服尺寸") + '" class=\"label label-success\">已受理量尺寸</span>'
- break;
- case 9:
- return '<span title="' + (row.IsReport ? "已报到" : "未报到") + '\n' + (row.IsCheckIn ? "住宿" : "走读") + '\n' + (row.IsSubsidize1 ? "资助" : "不资助") + '\n' + (row.IsMilitary ? "军训" : "不军训") + '\n' + (row.IsPay ? "缴费" : "未缴费") + '\n' + (row.IsMug ? "拍照" : "未拍照") + '\n' + (row.IsTakeCloths ? "已领军训服" : "未领军训服") + '\n' + (row.IsQuantity ? "已量校服尺寸" : "未量校服尺寸") + '\n' + (row.IsGetBeddingArticle ? "已领床上用品" : "未领床上用品") + '" class=\"label label-success\">已受理领取用品</span>'
- break;
-
-
- default:
- }
-
-
- }
- },
- { label: "姓名", name: "StuName", 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: "ClassNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
- key: value,
- keyId: 'classno',
- callback: function (_data) {
- callback(_data['classname']);
- }
- });
- }
- },
- {
- label: "招生类别", name: "EnrollType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'EnrollStudentType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
- return value == "1" ? "男" : "女";
-
- }
- },
- { label: "年级", name: "Grade", width: 100, align: "left" },
- {
- label: "民族", name: "Nationals", 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: "Birthday", width: 100, align: "left", formatter: function (val) { return val.substring(0, 10); } },
- { label: "身份证", name: "IDCard", width: 100, align: "left" },
- {
- label: "政治面貌", name: "Political", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'BCdPartyFace',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "届别", name: "FreshType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'timeType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
-
- {
- label: "学制", name: "EductionalSystme", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'EductionalSystme',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "户别", name: "ResidenceType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'HouseholdCategory',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "考生类别", name: "StuType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'stuType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "户口地", name: "ResidenceAddress", width: 100, align: "left" },
- { label: "非京籍报考类", name: "NonNative", width: 100, align: "left" },
- { label: "学籍所在学校", name: "FromSchool", width: 100, align: "left" },
- { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
- { label: "第一监护人", name: "FirstGuardian", width: 100, align: "left" },
- { label: "与被监护人关系", name: "FirstRelationship", width: 100, align: "left" },
- { label: "工作单位", name: "FirstUnits", width: 100, align: "left" },
- { label: "联系电话", name: "FirstMobile", width: 100, align: "left" },
- { label: "第二监护人", name: "SecondGuardian", width: 100, align: "left" },
- { label: "与被监护人关系", name: "SecondRelationship", width: 100, align: "left" },
- { label: "工作单位", name: "SecondUnits", width: 100, align: "left" },
- { label: "联系电话", name: "SecondMobile", width: 100, align: "left" },
- { label: "接收通知书地址", name: "Acceptance", width: 100, align: "left" },
- { label: "收件人", name: "Recipient", width: 100, align: "left" },
- { label: "邮政编码", name: "ZipCode", width: 100, align: "left" },
- { label: "既往病史", name: "MedicalHistory", width: 100, align: "left" },
- { label: "加分照顾对象", name: "AdditionalCare", width: 100, align: "left" },
- { label: "录取专业名称", name: "MajorName", width: 100, align: "left" },
- {
- label: "录取方式", name: "Admissions", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'enrollType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "是否住宿", name: "IsAccommodation", width: 100, align: "left" },
- { label: "准考证号", name: "ExamRegistration", width: 100, align: "left" },
- { label: "综评成绩", name: "SynthesizeGrade", width: 100, align: "left" },
- { label: "校额到校录取成绩", name: "EnrollGrade", width: 100, align: "left" },
- { label: "添加时间", name: "AddTime", width: 100, align: "left" }
- ],
- mainId: 'StuId',
- isMultiselect: true,
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.Grade = "20";
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- //refreshGirdDatas = function () {
- // alert(2222);
- //};
- page.init();
- }
|