//刷新 function reload() { $("#dgSchoolyearNumDicNoAddList").cmsXDataTable("load", $.getDataGridParams("dgSchoolyearNumDicNoAddList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgSchoolyearNumDicNoAddList").cmsXDataTable("getSelections"), function (index) { d.push(this.Value); }); return d; } //获取选中的数据All function validChooseAll() { var d = []; $.each($("#dgSchoolyearNumDicNoAddList").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 " " + value + ""; } //确定 function StudentEditObjectBatchAdd_Confirm() { var educationID = $("#EducationID").combogridX("getValue"); if (educationID == "" || educationID == "-1" || educationID == null) { $.messager.alert("系统提示", "请选择" + educationName + "。"); return; } var startDate = $("#Starttime").val(); var endDate = $("#Endtime").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("系统提示", "请选择您要新增的开放学年信息。"); return; } $("#schoolyearNumIDList").val(JSON.stringify(d)); $(document.forms[0]).submit(); }