123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgTrainingClassList").cmsXDataTable("load", $.getDataGridParams("dgTrainingClassList"));
- }
- function validChoose() {
- var d = [];
- $.each($("#dgTrainingClassList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.TrainingClassID);
- });
- return d;
- }
- function schoolyearChange() {
- try {
- var examinationBatchUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationBatch/DropDownList?bindType=0';
- var schoolyearID = $("#ddlSchoolyear").combobox('getValue');
- if (schoolyearID != nonSelect) {
- examinationBatchUrl += "&schoolyearID=" + schoolyearID;
- }
- $("#ddlExaminationBatch").combobox('reload', examinationBatchUrl);
- } catch (e) {
- }
- }
- function examinationBatchChange() {
- try {
- var examinationTypeUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/TypeDropDownList?bindType=0';
- var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue');
- if (examinationBatchID != nonSelect) {
- examinationTypeUrl += "&examinationBatchID=" + examinationBatchID;
- }
- $("#ddlExaminationType").combobox('reload', examinationTypeUrl);
- } catch (e) {
- }
- }
- function examinationTypeChange() {
- try {
- var examinationProjectUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/DropDownList?bindType=0';
- var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue');
- var examinationTypeID = $("#ddlExaminationType").combobox('getValue');
- if (examinationBatchID != nonSelect) {
- examinationProjectUrl += "&examinationBatchID=" + examinationBatchID;
- }
- if (examinationTypeID != nonSelect) {
- examinationProjectUrl += "&examinationTypeID=" + examinationTypeID;
- }
- $("#ddlExaminationProject").combobox('reload', examinationProjectUrl);
- } catch (e) {
- }
- }
- function studentList(rowindex, rowdata) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/TrainingClass/StudentList?MNU=" + mnu + "&trainingClassID=" + rowdata.TrainingClassID;
- $.popupTopWindow('学生名单', redirectTo, 1000, 480, reload);
- }
- function TrainingClass_Generate() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/TrainingClass/Generate?MNU=" + mnu;
- $.popupTopWindow('生成培训班', redirectTo, 640, 250, null, null);
- }
- function TrainingClass_Edit() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/TrainingClass/Edit?MNU=" + mnu + "&trainingClassID=" + d;
- $.popupTopWindow('修改', redirectTo, 640, 250, null, null);
- }
- function TrainingClass_Split() {
- var ids = validChoose();
- if (ids.length == 0) {
- $.messager.alert("系统提示", "请选择您要分班的培训班级。");
- return;
- }
- if (ids.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行分班。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/TrainingClass/Split?MNU=" + mnu + "&trainingClassID=" + ids[0];
- $.popupTopWindow('分班', redirectTo, 1024, 768, null, null);
- }
- function TrainingClass_Merge() {
- var ids = validChoose();
- if (ids.length == 0) {
- $.messager.alert("系统提示", "请选择您要合班的培训班级。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/TrainingClass/Merge?MNU=" + mnu;
- $.popupTopWindow('合班', redirectTo, 640, 150, null, ids);
- }
- function TrainingClass_Send() {
- var traingingClassIDList = validChoose();
- if (traingingClassIDList.length == 0) {
- $.messager.alert("系统提示", "请选择您要发送信息的培训班。");
- return;
- }
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/TrainingClass/StudentUserIDList", { trainingClassIDs: traingingClassIDList.join(',') }, function (res) {
- if (res) {
- if (res.length == 0) {
- $.messager.alert("系统提示", "您选择的培训班中没有对应的学生,无法发送信息。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Common/UserAnnouncementSend";
- $.popupTopWindow('信息发送', redirectTo, 1024, 768, null, res);
- }
- });
- }
- function TrainingClassGDCX_Send() {
- var traingingClassIDList = validChoose();
- if (traingingClassIDList.length == 0) {
- $.messager.alert("系统提示", "请选择您要发送信息的培训班。");
- return;
- }
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/TrainingClass/StudentUserIDList", { trainingClassIDs: traingingClassIDList.join(',') }, function (res) {
- if (res) {
- if (res.length == 0) {
- $.messager.alert("系统提示", "您选择的培训班中没有对应的学生,无法发送信息。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Common/UserAnnouncementSendGDCX";
- $.popupTopWindow('信息发送', redirectTo, 1024, 768, null, res);
- }
- });
- }
- function TrainingClass_Export() {
- $("[name='selectedIDs']").val(validChoose().join(','));
- $("#formQuery").submit();
- }
|