/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 * 日 期:2021-11-29 11:43 * 描 述:开课计划 */ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var cddeptname = ''; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 250, 400); //$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); $('#AcademicYearNo').lrselect({ placeholder: "请选择学年", allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', value: 'value', text: 'text' }); //年级 $('#Grade').lrselect({ placeholder: "请选择年级", allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', value: 'value', text: 'text' }); $('#Semester').lrDataItemSelect({ code: 'Semester' }); $("#MajorNo").lrselect(); $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); }, // 初始化列表 initGird: function () { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/ClassPlan/GetPageListForSchool', headData: [ { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, { label: "学期", name: "Semester", width: 50, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, code: 'Semester', callback: function (_data) { callback(_data.text); } }); } }, { label: "年级", name: "Grade", width: 50, align: "left" }, { label: "课程编码", name: "LessonNo", width: 200, align: "left" }, { label: "课程名称", name: "LessonName", width: 200, align: "left" }, { label: "课程类型", name: "LessonTypeId", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType', key: value, keyId: 'ltid', callback: function (_data) { callback(_data['lessontypename']); } }); } }, { label: "状态", name: "State", width: 100, align: "left", formatter: function (cellvalue, row) { if (cellvalue == 0) { return '未排课'; } if (cellvalue == 1) { return '已排课'; } } }, { label: "拟开教学班数", name: "TeachClassNum", width: 100, align: "left" }, //{ label: "人数", name: "StuNum", width: 80, align: "left" }, { label: "周课时", name: "WeekLessonHour", width: 80, align: "left" }, { label: "理论课时", name: "WeekHourClassroom", width: 80, align: "left" }, { label: "实践课时", name: "PracticeHour", width: 80, align: "left" }, { label: "起始周次", name: "StartWeek", width: 80, align: "left" }, //{ label: "结束周次", name: "EndWeek", width: 80, align: "left" }, //{ // label: "负责开课院系", name: "TeachDeptNo", 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: "StudyScore", width: 80, align: "left" }, { label: "备注", name: "Remark", width: 100, align: "left" }, ], mainId: 'ID', sidx: 'MakeDate desc', isPage: true }); page.search(); }, search: function (param) { param = param || {}; param.DeptNo = cddeptname; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { $('#gridtable').jfGridSet('reload'); }; page.init(); }