|
|
@@ -0,0 +1,218 @@ |
|
|
|
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) |
|
|
|
* Copyright (c) 2013-2018 北京泉江科技有限公司 |
|
|
|
* 创建人:超级管理员 |
|
|
|
* 日 期:2019-05-15 10:33 |
|
|
|
* 描 述:选修课课程 |
|
|
|
*/ |
|
|
|
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) { |
|
|
|
if ($("#AcademicYearNo").lrselectGet() == "" || $("#AcademicYearNo").lrselectGet() == null || $("#AcademicYearNo").lrselectGet() == undefined) { |
|
|
|
top.learun.alert.warning("请先选择学年!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
if ($("#Semester").lrselectGet() == "" || $("#Semester").lrselectGet() == null || $("#Semester").lrselectGet() == undefined) { |
|
|
|
top.learun.alert.warning("请先选择学期!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
page.search(queryJson); |
|
|
|
}, 300, 400); |
|
|
|
$('#AcademicYearNo').lrselect({ |
|
|
|
placeholder: "请选择学年", |
|
|
|
allowSearch: true, |
|
|
|
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', |
|
|
|
value: 'value', |
|
|
|
text: 'text' |
|
|
|
}); |
|
|
|
//学期 |
|
|
|
$('#Semester').lrselect({ |
|
|
|
placeholder: "请选择学期", |
|
|
|
allowSearch: true, |
|
|
|
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', |
|
|
|
value: 'value', |
|
|
|
text: 'text' |
|
|
|
}); |
|
|
|
$('#ElectiveSelectStatus').lrDataItemSelect({ code: 'ElectiveSelectStatus' }); |
|
|
|
$('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); |
|
|
|
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); |
|
|
|
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); |
|
|
|
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); |
|
|
|
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); |
|
|
|
// 刷新 |
|
|
|
$('#lr_refresh').on('click', function () { |
|
|
|
location.reload(); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 初始化列表 |
|
|
|
initGird: function () { |
|
|
|
$('#gridtable').jfGrid({ |
|
|
|
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', |
|
|
|
headData: [ |
|
|
|
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, |
|
|
|
{ label: "学期", name: "Semester", width: 60, align: "left" }, |
|
|
|
{ |
|
|
|
label: "校区", name: "F_SchoolId", width: 200, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', |
|
|
|
key: value, |
|
|
|
keyId: 'f_companyid', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['f_fullname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
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: "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: "Id", width: 100, align: "left", |
|
|
|
formatter: function (cellvalue, row) { |
|
|
|
if (cellvalue == null || cellvalue == undefined || cellvalue == "") { |
|
|
|
return '<span class=\"label label-default\">未报名</span>'; |
|
|
|
} else { |
|
|
|
return '<span class=\"label label-success\">已报名</span>'; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "报名状态", name: "Status", width: 100, align: "left", |
|
|
|
formatter: function (cellvalue, row) { |
|
|
|
if (cellvalue == 1) { |
|
|
|
return '<span class=\"label label-primary\">审核中</span>'; |
|
|
|
} else if (cellvalue == 2) { |
|
|
|
return '<span class=\"label label-success\">报名成功</span>'; |
|
|
|
} else if (cellvalue == 3) { |
|
|
|
return '<span class=\"label label-warning\">报名失败</span>'; |
|
|
|
} else { |
|
|
|
return '<span class=\"label label-default\">未报名</span>'; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: "所选课程号", name: "LessonNo", width: 100, align: "left" }, |
|
|
|
{ |
|
|
|
label: "所选课程名称", name: "LessonName", width: 150, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', |
|
|
|
key: row.LessonNo, |
|
|
|
keyId: 'lessonno', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['lessonname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: "课程学分", name: "StudyScore", width: 100, align: "left" }, |
|
|
|
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, |
|
|
|
{ |
|
|
|
label: "教师姓名", name: "EmpName", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', |
|
|
|
key: row.EmpNo, |
|
|
|
keyId: 'empno', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['empname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "上课节次", name: "LessonSection", width: 150, align: "left", |
|
|
|
formatter: function (cellvalue, row) { |
|
|
|
if (cellvalue != "" && cellvalue != undefined && cellvalue != null) { |
|
|
|
if (cellvalue.indexOf(',') == -1) { |
|
|
|
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; |
|
|
|
} else { |
|
|
|
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: "上课时间", name: "LessonTime", width: 180, align: "left" }, |
|
|
|
{ |
|
|
|
label: "教室名称", name: "ClassRoomName", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', |
|
|
|
key: row.ClassRoomNo, |
|
|
|
keyId: 'classroomno', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data['classroomname']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ label: "备注", name: "Remark", width: 100, align: "left" }, |
|
|
|
], |
|
|
|
mainId: 'StuId', |
|
|
|
isPage: true, |
|
|
|
sidx: 'StuNo', |
|
|
|
sord: 'asc' |
|
|
|
}); |
|
|
|
}, |
|
|
|
search: function (param) { |
|
|
|
param = param || {}; |
|
|
|
param.EmpNo = learun.clientdata.get(['userinfo']).enCode; |
|
|
|
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); |
|
|
|
} |
|
|
|
}; |
|
|
|
refreshGirdData = function () { |
|
|
|
page.search(); |
|
|
|
}; |
|
|
|
page.init(); |
|
|
|
} |