|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- 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);
- }, 290, 400);
- $('#DeptNo').lrDataSourceSelect({
- code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (val) {
- var deptno = "";
- if (val) {
- deptno = val.deptno;
- }
- $('#MajorNo').lrselectRefresh({
- url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetListByDeptNo?DeptNo=' + deptno,
- text: "MajorName",
- value: "MajorNo"
- })
- }
- });
- $('#MajorNo').lrDataSourceSelect({
- code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select:
- function (val) {
- var majorNo = '';
- if (val) {
- majorNo = val.MajorNo;
- }
- $('#ClassNo').lrselectRefresh({
- url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GetClassByMajorNo?majorNo=' + majorNo,
- text: "ClassName",
- value: "ClassNo"
- })
- }
- });
- $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
- $('#FinishSchoolMark').lrselect({
- data: [{ text: "准许毕业", value: "1" }, { text: "待准许", value: "0" }],
- text: "text",
- value: "value"
- })
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- $('#lr_getcard').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认领取毕业证!', function (res) {
- if (res) {
- learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetCard', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- })
- $('#lr_store').on('click', function () {
- learun.layerConfirm('1.毕业生归档必须在6-8月份进行; <br> 2.归档后的学生信息如:操行、奖惩、成绩、毕业证书等只有通过毕业生信息管理才能查询或打印;<br> 3.毕业学生的账户将自动取消;<br> 4.学生所占的床位也将自动退掉;<br> 5.学生所在的班级置为已毕业班级;<br> 6.归档操作后不可撤消,请谨慎操作!', function (res) {
- if (res) {
- learun.httpAsync('post', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/StuStore', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- })
-
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').jfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
- headData: [
- { label: "学号", name: "StuNo", width: 100, align: "left" },
- { label: "姓名", name: "StuName", width: 100, align: "left" },
- {
- label: "性别", name: "GenderNo", width: 80, align: "left",
- formatter: function (cellvalue) {
- return cellvalue == true ? "男" : "女";
- }
- },
- {
- 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: "Grade", width: 100, align: "left" },
- {
- label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'EduSystem',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: '毕业状态', name: 'FinishSchoolMark', width: 100, align: "left", formatter: function (val) {
- if (val == '0') {
- return '待准许';
- } else if (val == "1") {
- return '准许毕业';
- } else if (val == '2') {
-
- return '已毕业';
- } else {
- return '待准许';
- }
- }
- },
- { label: "毕业证", name: "DiplomaNo", width: 100, align: "left" },
- { label: "毕业时间", name: "FinishSchoolDate", width: 100, align: "left" },
- ],
- mainId: 'StuId',
- isPage: true,
- isMultiselect: true,
-
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|