|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
- * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
- * 创建人:超级管理员
- * 日 期:2021-12-08 12:19
- * 描 述:排考2021新
- */
- var selectedRow;
- var refreshGirdData;
-
- var bootstrap = function ($, learun) {
- "use strict";
- var datebegin = '';
- var dateend = '';
- var page = {
- init: function () {
- page.initGird();
- page.bind();
- },
- bind: function () {
- $('.datetime').each(function () {
- $(this).lrdate({
- dfdata: [
- { name: '清空', begin: function () { return '' }, end: function () { return '' } },
- { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
- { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
- { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
- { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
- ],
- // 月
- mShow: false,
- premShow: false,
- // 季度
- jShow: false,
- prejShow: false,
- // 年
- ysShow: false,
- yxShow: false,
- preyShow: false,
- yShow: false,
- // 默认
- dfvalue: '0',
- selectfn: function (begin, end) {
- datebegin = begin;
- dateend = end;
- }
- });
- });
- // 查询
- $('#btn_Search').on('click', function () {
- page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet()});
- });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- //排考数据同步
- $('#lr_arrange').on('click', function () {
- learun.layerForm({
- id: 'SyncByConditionForm',
- title: '按条件同步排考数据',
- url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/SyncByConditionForm',
- width: 600,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- $('#AcademicYearNo').lrselect({
- placeholder: "学年",
- allowSearch: false,
- url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
- value: 'value',
- text: 'text'
- });
- //学期
- $('#Semester').lrselect({
- placeholder: "学期",
- allowSearch: false,
- url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
- value: 'value',
- text: 'text'
- });
- //课程
- $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' });
- },
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetPageList',
- headData: [
- { label: '学年', name: 'AcademicYearNo', width: 80, align: "left" },
- { label: '学期', name: 'Semester', width: 80, align: "left" },
- {
- label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) {
- return learun.formatDate(v, "yyyy-MM-dd");
- }
- },
- { label: '考试时间', name: 'ExamTime', width: 100, align: "left" },
- //{ label: '班级编号', name: 'ClassNo', width: 200, align: "left" },
- //{ label: '班级名称', name: 'ClassName', width: 200, align: "left" },
- { label: '课程编号', name: 'LessonNo', width: 100, align: "left" },
- { label: '课程名称', name: 'LessonName', width: 200, align: "left" },
- { label: '教师编号', name: 'EmpNo', width: 100, align: "left" },
- { label: '教师姓名', name: 'EmpName', width: 100, align: "left" },
- { label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" },
- { label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" }
- ],
- mainId: 'AETId',
- sidx: 'ExamTime asc, LessonNo asc,ClassRoomNo asc',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.StartTime = datebegin;
- param.EndTime = dateend;
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- $('#gridtable').jfGridSet('reload');
- };
- page.init();
- }
|