/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) * Copyright (c) 2013-2018 北京泉江科技有限公司 * 创建人:超级管理员 * 日 期:2020-05-18 14:35 * 描 述:学籍信息管理 */ var selectedRow; 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); }, 350, 400); $("#ResidenceNo").lrDataItemSelect({ code: 'ResidenceNo' }); $('#CultureDegreeNo').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); $("#TeachSituation").lrDataItemSelect({ code: 'TeachSituation' }); $("#HealthType").lrDataItemSelect({ code: 'StuHealthType' }); $("#ReadStudyWay").lrDataItemSelect({ code: 'StudyWay' }); $("#ReadStudyPeriod").lrDataItemSelect({ code: 'StudyPeriod' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 新增 $('#lr_add').on('click', function () { selectedRow = null; learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicTwo/Form', width: 700, height: 400, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } }); }); // 编辑 $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('id'); selectedRow = $('#gridtable').jfGridGet('rowdata'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'form', title: '编辑', url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicTwo/Form?keyValue=' + keyValue, width: 700, height: 400, 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 + '/EducationalAdministration/StuInfoBasicTwo/DeleteForm', { keyValue: keyValue }, function () { }); } }); } }); }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicTwo/GetPageList', headData: [ { label: '学号', name: 'StuNo', width: 100, align: "left" }, { label: '姓名', name: 'StuName', width: 100, align: "left" }, { label: '身份证号', name: 'IdCard', width: 100, align: "left" }, { label: '出生日期', name: 'Birthday', width: 100, align: "left" }, { label: '毕业时间', name: 'GraduateDate', width: 100, align: "left" }, { label: '年龄', name: 'Age', 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: 'HuKouPaperNum', width: 100, align: "left" }, { label: '户籍地', name: 'OriginAddress', width: 100, align: "left" }, { 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: 'FamilyRelation', width: 100, align: "left" }, { 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: 'CultureDegreeNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree', key: value, keyId: 'culturedegreeno', callback: function (_data) { callback(_data['culturedegree']); } }); } }, { label: '父亲姓名', name: 'FatherName', width: 100, align: "left" }, { label: '父亲身份证号', name: 'FatherIdCard', width: 100, align: "left" }, { label: '父亲电话', name: 'FatherPhone', width: 100, align: "left" }, { label: '母亲姓名', name: 'MotherName', width: 100, align: "left" }, { label: '母亲身份证号', name: 'MotherIdCard', width: 100, align: "left" }, { label: '母亲电话', name: 'MotherPhone', width: 100, align: "left" }, { label: '受教情况', name: 'TeachSituation', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, code: 'TeachSituation', callback: function (_data) { callback(_data.text); } }); } }, { label: '工作单位', name: 'WorkUnits', width: 100, align: "left" }, { label: '联系电话', name: 'Phone', width: 100, align: "left" }, { label: '健康状况', name: 'HealthType', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, code: 'StuHealthType', callback: function (_data) { callback(_data.text); } }); } }, { label: '残疾类型', name: 'DisableType', width: 100, align: "left" }, { label: '政治面貌', name: 'PartyFaceNo', 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: 'MainBusiness', width: 100, align: "left" }, { label: '备注', name: 'Remark', width: 100, align: "left" }, { label: '原县', name: 'OriginalCountry', width: 100, align: "left" }, { label: '原乡镇', name: 'OriginalVillage', width: 100, align: "left" }, { label: '原学校', name: 'OriginalSchool', width: 100, align: "left" }, { label: '原年级', name: 'OriginalGrade', width: 100, align: "left" }, { label: '原班主任', name: 'OriginalTeacher', width: 100, align: "left" }, { label: '原班主任电话', name: 'OriginalTeacherPhone', width: 100, align: "left" }, { label: '原班级', name: 'OriginalClass', width: 100, align: "left" }, { label: '原班级类别', name: 'OriginalClassType', width: 100, align: "left" }, { label: '原就读方式', name: 'OriginalStudyWay', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, code: 'StudyWay', callback: function (_data) { callback(_data.text); } }); } }, { label: '原学段', name: 'OriginalStudyPeriod', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, code: 'StudyPeriod', callback: function (_data) { callback(_data.text); } }); } }, { label: '原学生状态', name: 'OriginalStudentStatus', width: 100, align: "left" }, { label: '省', name: 'Province', width: 100, align: "left" }, { label: '地区', name: 'Area', width: 100, align: "left" }, { label: '县', name: 'Country', width: 100, align: "left" }, { label: '乡镇', name: 'Village', width: 100, align: "left" }, { label: '村', name: 'Hamlet', width: 100, align: "left" }, { label: '组', name: 'Groups', width: 100, align: "left" }, { label: '门号', name: 'DoorNum', width: 100, align: "left" }, { label: '新疆学籍', name: 'XinJiangStatus', width: 100, align: "left" }, { label: '在读县', name: 'ReadCountry', width: 100, align: "left" }, { label: '在读乡镇', name: 'ReadVillage', width: 100, align: "left" }, { label: '在读学校', name: 'ReadSchool', width: 100, align: "left" }, { label: '在读学段', name: 'ReadStudyPeriod', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, code: 'StudyPeriod', callback: function (_data) { callback(_data.text); } }); } }, { label: '在读年级', name: 'ReadGrade', width: 100, align: "left" }, { label: '科类', name: 'DivisionType', width: 100, align: "left" }, { label: '计划类型', name: 'PlanType', width: 100, align: "left" }, { label: '入学时间', name: 'AdmissionTime', width: 100, align: "left" }, { label: '在读班主任', name: 'ReadTeacher', width: 100, align: "left" }, { label: '在读班主任电话', name: 'ReadTeacherPhone', width: 100, align: "left" }, { label: '在读班级', name: 'ReadClass', width: 100, align: "left" }, { label: '毕业证号', name: 'GraduateNo', width: 100, align: "left" }, { label: '在读班级类别', name: 'ReadClassType', width: 100, align: "left" }, { label: '在读就读方式', name: 'ReadStudyWay', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, code: 'StudyWay', callback: function (_data) { callback(_data.text); } }); } }, { label: '在读学生状态', name: 'ReadStudentStatus', 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(); }