123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //刷新
- function reload() {
- $("#dgCollegeNoAddList").cmsXDataTable("load", $.getDataGridParams("dgCollegeNoAddList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgCollegeNoAddList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.CollegeID);
- });
- return d;
- }
- //获取选中的数据All
- function validChooseAll() {
- var d = [];
- $.each($("#dgCollegeNoAddList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //确定生成成功后不关闭弹出页面
- function formSuccessReloadNoClose(data) {
- if (data.IsSuccess == true) {
- reload();
- }
- $.messager.alert("系统提示", data.Message);
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //联动查询
- function queryCampus(data) {
- var campusID = $("#CampusDropdown").combogridX("getValue");
- if (campusID != nonSelect) {
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- }
- else {
- $("#CollegeDropdown").combogridX("reload");
- }
- reload();
- }
- //确定
- function EduOpenControlBatchAdd_Confirm() {
- var schoolyearID = $("#SchoolyearID").combobox("getValue");
- if (schoolyearID == "" || schoolyearID == "-1" || schoolyearID == null) {
- $.messager.alert("系统提示", "请选择您要新增的学年学期。");
- return;
- }
- var startDate = $("#StartDate").val();
- var endDate = $("#EndDate").val();
- if (startDate == "" || startDate == null) {
- $.messager.alert("系统提示", "开始日期不能为空。");
- return;
- }
- if (endDate == "" || endDate == null) {
- $.messager.alert("系统提示", "结束日期不能为空。");
- return;
- }
- var sd = new Date(startDate.replace(/\-/g, "\/"));
- var ed = new Date(endDate.replace(/\-/g, "\/"));
- if (startDate != "" && endDate != "" && sd >= ed) {
- $.messager.alert("系统提示", "结束日期不能小于开始日期。");
- return;
- }
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要新增的" + college + "信息。");
- return;
- }
- $("#collegeIDList").val(JSON.stringify(d));
- $(document.forms[0]).submit();
- }
|