12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + '/CourseScheduleSetting/Edit';
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //新增
- function CourseScheduleSetting_Add() {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('课程可排时间设置新增', redirectTo, 800, 600, null, null);
- }
- function reload() {
- $("#dgCourseScheduleSettingList").cmsXDataTable("load", $.getDataGridParams("dgCourseScheduleSettingList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgCourseScheduleSettingList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.CoursematerialID);
- });
- return d;
- }
- //点击列表更新
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?coursematerialID=" + rowdata.CoursematerialID + "&MNU=" + mnu + '&isView=1';
- $.popupTopWindow('课程可排时间设置详情', redirectTo, 800, 600, null, null);
- }
- //修改按钮
- function CourseScheduleSetting_Update() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统信息", "请选择您要修改的课程可排时间设置。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?coursematerialID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('课程可排时间设置修改', redirectTo, 800, 600, null, null);
- }
- //删除
- function CourseScheduleSetting_Delete() {
- var d = validChoose().join(',');
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要重置课程的可排时间设置数据!!");
- return;
- }
- $.messager.confirm("系统提示", "您确定要重置课程的可排时间设置数据?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/CourseScheduleSetting/Delete', { coursematerialIDs: d }, function (data) {
- if (data == "删除成功") {
- $.messager.alert("系统提示", "重置成功!");
- $("#dgCourseScheduleSettingList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function QueryCoursematerialComboGrid() {
- reload();
- }
- function QueryCourseLevelDropdownList() {
- reload();
- }
- function QueryCourseScienceDropdownList() {
- reload();
- }
|