123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- function reload() {
- $("#dgCollegePriorityList").cmsXDataTable("load", $.getDataGridParams("dgCollegePriorityList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgCollegePriorityList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //function validChooseStatus() {
- // var d = [];
- // $.each($("#dgCollegePriorityList").cmsXDataTable("getSelections"), function (index) {
- // d.push(this.RecordStatus);
- // });
- // return d;
- //}
- function validChooseCollege() {
- var d = [];
- $.each($("#dgCollegePriorityList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.CollegeID);
- });
- return d;
- }
- function CollegeScheduleApproval_submit() {
- var d = validChoose();
- // var status = validChooseStatus();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要提交的" + EMIS_CollegeLabel + "课表。");
- return;
- }
- for (var i = 0; i < d.length; i++) {
- if (d[i].RecordStatus != startStatus) {
- $.messager.alert("系统提示", "部分选中的" + EMIS_CollegeLabel + "课表已经提交,请不要重复提交。");
- return;
- }
- }
- $.messager.confirm("系统提示", "您确定要提交该" + EMIS_CollegeLabel + "课表?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/CollegeScheduleApproval/Submit', { collegeScheduleStatusIDs: $.map(d, function (x) { return x.CollegeScheduleStatusID; }).join(","), collegeIDs: $.map(d, function (x) { return x.CollegeID; }).join(","), schoolYearID: $("#SchoolyearDropdownList").combobox("getValue") }, function (data) {
- if (data == "提交成功") {
- $.messager.alert("系统提示", "提交成功!");
- $("#dgCollegePriorityList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function CollegeScheduleApproval_approve() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要审核的" + EMIS_CollegeLabel + "课表。");
- return;
- }
- for (var i = 0; i < d.length; i++) {
- if (d[i].RecordStatus == startStatus) {
- $.messager.alert("系统提示", "部分选中的" + EMIS_CollegeLabel + "课表仍未提交,请提交后再进行审核。");
- return;
- }
- }
- $.messager.confirm("系统提示", "您确定要审核该" + EMIS_CollegeLabel + "课表?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/CollegeScheduleApproval/Approve', { collegeScheduleStatusIDs: $.map(d, function (x) { return x.CollegeScheduleStatusID; }).join(",") }, function (data) {
- if (data == "审核成功") {
- $.messager.alert("系统提示", "审核成功!");
- $("#dgCollegePriorityList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function CollegeScheduleApproval_returnback() {
- var d = validChoose();
- // var status = validChooseStatus();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要撤回的" + EMIS_CollegeLabel + "课表。");
- return;
- }
- for (var i = 0; i < d.length; i++) {
- if (d[i].RecordStatus == startStatus) {
- $.messager.alert("系统提示", "部分选中的" + EMIS_CollegeLabel + "课表仍未提交,请提交后再进行撤回。");
- return;
- }
- }
- $.messager.confirm("系统提示", "您确定要撤回该" + EMIS_CollegeLabel + "课表?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/CollegeScheduleApproval/ReturnBack', { collegeScheduleStatusIDs: $.map(d, function (x) { return x.CollegeScheduleStatusID; }).join(",") }, function (data) {
- if (data == "撤回成功") {
- $.messager.alert("系统提示", "撤回成功!");
- $("#dgCollegePriorityList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
|