|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412 |
- /* * 版 本 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, 400);
- $("#IsReport").lrDataItemSelect({ code: "jyYewOrNot" });
- $('#Year').lrselect({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
- value: "year",
- text: "year",
- });
- $('#Admissions').lrDataItemSelect({ code: 'enrollType' });
-
-
- $('#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" }
- });
- }
- }
- });
- $('#ClassNo').lrselect({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1" },
- value: "classno",
- text: "classname"
- });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#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_print').on('click', function () {
- $('#gridtable').jqprintTable();
- });
- $('#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_allreport").on('click',
- function () {
- learun.layerConfirm('是否全部报到!',
- function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllReport',
- {},
- function (res) {
- refreshGirdData();
-
- });
- }
-
-
- });
- });
-
- //确认报到
- $("#lr_sign").on('click',
- function () {
- var data = $('#gridtable').jfGridGet('rowdata');
- if (data.length > 0) {
- learun.layerConfirm('是否确认签订!',
- function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Sign',
- { stuId: JSON.stringify(data), status: true },
- function (res) {
- refreshGirdData();
-
- });
- }
-
-
- });
-
- }
- });
-
- //确认报到
- $("#lr_nosign").on('click',
- function () {
- var data = $('#gridtable').jfGridGet('rowdata');
- if (data.length > 0) {
- learun.layerConfirm('是否确认未签订!',
- function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Sign',
- { stuId: JSON.stringify(data), status: false },
- function (res) {
- refreshGirdData();
-
- });
- }
-
-
- });
-
- }
- });
-
-
-
- //确认报到
- $("#lr_report").on('click',
- function () {
- var data = $('#gridtable').jfGridGet('rowdata');
- if (data.length > 0) {
- learun.layerConfirm('是否确认报到!',
- function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Report',
- { stuId: JSON.stringify(data), status: true },
- function (res) {
- refreshGirdData();
-
- });
- }
-
-
- });
-
- }
- });
-
- //确认报到
- $("#lr_noreport").on('click',
- function () {
- var data = $('#gridtable').jfGridGet('rowdata');
- if (data.length > 0) {
- learun.layerConfirm('是否确认未报到!',
- function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/Report',
- { stuId: JSON.stringify(data), status: false },
- function (res) {
- refreshGirdData();
-
- });
- }
-
-
- });
-
- }
- });
-
-
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetReportPageList',
- headData: [
- { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
- { label: "姓名", name: "StuName", width: 100, align: "left" },
- {
- 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: "SecurityAgreement", width: 100, align: "left",
- formatter: function (value, row, drop) {
- if (row.SecurityAgreement) {
- return '<span class=\"label label-success\">已签</span>';
- } else if (row.SecurityAgreement == false) {
- return '<span class=\"label label-warning\">未签</span>';
- }
- else {
- return "未签";
- }
-
- }
- },
- {
- label: "是否报到", name: "IsReport", width: 100, align: "left",
- formatter: function (value, row, drop) {
- if (row.IsReport) {
- return '<span class=\"label label-success\">报到</span>';
- } else if (row.IsReport == false) {
- return '<span class=\"label label-warning\">未报到</span>';
- }
- else {
- return "未处理";
- }
-
- }
- },
- {
- label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
- return value == "1" ? "男" : "女";
-
- }
- },
- {
- label: "宿舍", name: "DormitoryName", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DormitoryInfo',
- key: value,
- keyId: 'planclassno',
- callback: function (_data) {
- callback(_data['name']);
- }
- });
- }
- },
- {
- label: "床位", name: "StuId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PlanBedInfo',
- key: value,
- keyId: 'planstudentid',
- callback: function (_data) {
- callback(_data['name']);
- }
- });
- }
- },
- {
- 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: "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: "MajorNo", 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" },
- ],
- isMultiselect: true,
- mainId: 'StuId',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.Grade = "20";
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|