123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgLessonRecordList").cmsXDataTable("load", $.getDataGridParams("dgLessonRecordList"));
- }
- function startDateChanged(dp) {
- $("#StartDate").val($dp.cal.getNewDateStr());
- reload();
- }
- function endDateChanged(dp) {
- $("#EndDate").val($dp.cal.getNewDateStr());
- reload();
- }
- function validChoose() {
- var d = [];
- $.each($("#dgLessonRecordList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- function show(rowIndex, rowData) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/LessonRecord/Edit?lessonRecordID=" + rowData.LessonRecordID + "&isShow=1&MNU=" + mnu;
- $.popupTopWindow('听课记录', redirectTo, 800, 600, null, null);
- }
- function LessonRecord_Add() {
- $.popupTopWindow('添加听课记录', CMS_SystemConfig.VirtualDirectoryPath + "/LessonRecord/Edit?MNU=" + mnu, 800, 600, null, null);
- }
- function LessonRecord_Edit() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统信息", "请选择您要修改的听课记录信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/LessonRecord/Edit?lessonRecordID=" + d[0].LessonRecordID + "&MNU=" + mnu;
- $.popupTopWindow('修改听课记录', redirectTo, 800, 600, null, null);
- }
- function LessonRecord_Delete() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的听课记录。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除听课记录信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/LessonRecord/Delete', { lessonRecordIDs: $.map(d, function (x) { return x.LessonRecordID; }).join(',') },
- function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgLessonRecordList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- function LessonRecord_Export() {
- $("[name='LessonRecordIDs']").val($.map(validChoose(), function (x) { return x.LessonRecordID; }).join(','));
- $("#formQuery").submit();
- }
|