|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-05-14 10:02
- * 描 述:选修课课程信息
- */
- var weekChina = ["一", "二", "三", "四", "五", "六", "日"];
- 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);
- }, 220, 400);
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- $('#AcademicYearNo').lrselect({
- placeholder: "学年",
- allowSearch: false,
- url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
- value: 'value',
- text: 'text'
- });
- //学期
- $('#Semester').lrselect({
- placeholder: "学期",
- allowSearch: false,
- url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
- value: 'value',
- text: 'text'
- });
- $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- var AcademicYearNo = $('#gridtable').jfGridValue('AcademicYearNo');
- var Semester = $('#gridtable').jfGridValue('Semester');
- var LessonNo = $('#gridtable').jfGridValue('LessonNo');
- var EmpNo = $('#gridtable').jfGridValue('EmpNo');
- var F_SchoolId = $('#gridtable').jfGridValue('F_SchoolId');
- if (learun.checkrow(keyValue)) {
- if (keyValue.indexOf(',') == -1) {
- learun.alert.warning("必须选择多条记录进行合班操作!");
- return;
- }
- learun.layerConfirm('是否确认合班!', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/ElectiveMerge/Merge',
- { keyValue: keyValue, Semester: Semester, AcademicYearNo: AcademicYearNo, LessonNo: LessonNo, EmpNo: EmpNo, F_SchoolId: F_SchoolId }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- //查看学生
- $('#lr_view').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '查看学生',
- url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/FinishIndex?OLPEId=' + keyValue,
- width: 1000,
- height: 700,
- btn: null,
- end: function () {
- refreshGirdData();
- }
- });
- }
- });
- //审核学生
- $('#lr_audit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('Id');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '审核学生',
- url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/AuditIndex?OLPEId=' + keyValue,
- width: 1000,
- height: 700,
- btn: null,
- end: function () {
- refreshGirdData();
- }
- });
- }
- });
-
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetPageList',
- headData: [
- { label: "学年", name: "AcademicYearNo", width: 60, align: "left" },
- { label: "学期", name: "Semester", width: 40, align: "left" },
- { label: "课程号", name: "LessonNo", width: 100, align: "left" },
- { label: "课程名称", name: "LessonName", width: 130, align: "left" },
- //{ label: "上课节次(如 11 代表星期一第一节课)", name: "LessonSection", width: 220, align: "left" },
- {
- label: "上课节次", name: "LessonSection", width: 100, align: "left",
- formatter: function (cellvalue, row) {
- return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节";
- }
- },
- { label: "上课时间", name: "LessonTime", width: 100, align: "left" },
- { label: "学分", name: "StudyScore", width: 100, align: "left" },
- { label: "教师号", name: "EmpNo", width: 100, align: "left" },
- { label: "教师姓名", name: "EmpName", width: 100, align: "left" },
- { label: "教室", name: "ClassRoomName", width: 100, align: "left" }
- ],
- mainId: 'Id',
- isPage: true,
- sidx: 'AcademicYearNo desc,Semester desc,LessonName asc,EmpName asc,LessonSection asc',
- //sord: 'desc',
- isMultiselect: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|