var mnu; var WindowID; $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); WindowID = $.SystemGeneral.getUrlParam("WindowID"); }); //获取选中的数据 function validChooseLessonRecordID() { var d = []; $.each($("#dgSupEvaluationList").cmsXDataTable("getSelections"), function (index) { if (this.LessonRecordID!=null) { d.push(this.LessonRecordID); } }); return d; } //获取选中的数据 function validChooseProjectRecordID() { var d = []; $.each($("#dgSupEvaluationList").cmsXDataTable("getSelections"), function (index) { if (this.ProjectRecordID != null) { d.push(this.ProjectRecordID); } }); return d; } //导出Excel function SupEvaluation_Export() { var d = validChooseLessonRecordID().join(','); var p = validChooseProjectRecordID().join(','); if (d != "") { document.getElementById("LessonRecordIDs").value = d; } else { document.getElementById("LessonRecordIDs").value = ""; } if (p != "") { document.getElementById("ProjectRecordIDs").value = d; } else { document.getElementById("ProjectRecordIDs").value = ""; } $("#formQuery").attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/SupEvaluation/Excel"); $("#formQuery").submit(); } //获取列表字段查询对应比较符 function GetDynamicCondition() { var reg = "/(^/s*)|(/s*$)/g"; var attribute = eval('(' + $("[name='Attribute']").val() + ')').Value; var conditionString = $("[name='Condition']").val(); var value = $("[name='Condition']").parent().parent().next().find("[name^=" + attribute + "]").val(); value = $.trim(value); var sql = ""; if (conditionString == "=" || conditionString == ">" || conditionString == "<" || conditionString == "<>") { sql = attribute + conditionString + value; } else if (conditionString == "左") { sql = attribute + " like '" + value + "%'"; } else if (conditionString == "右") { sql = attribute + " like '%" + value + "'"; } else if (conditionString == "中") { sql = attribute + " like '%" + value + "%'"; } return sql; } function SupEvaluation_Report() { var lid = validChooseLessonRecordID().join(','); var pid = validChooseProjectRecordID().join(','); var ids = lid + "," + pid; var sql = GetDynamicCondition(); var collegeID = $("#DDCollegeDropdown").combogridX("getValue"); var schoolyearID = $("#SchoolyearDropdown").combobox("getValue"); var starDate = document.getElementById("txtStartDate").value; var endDate = document.getElementById("txtEndDate").value; var supervisionType = $("#SupervisionType").combobox("getValue"); var conditionString = sql; $.popupTopWindow('督导评价报表', CMS_SystemConfig.VirtualDirectoryPath + '/SupEvaluation/SupEvaluationReport?MNU=' + mnu, 900, 650, null, { CollegeID: collegeID, StarDate: starDate, EndDate: endDate, SchoolyearID: schoolyearID, SupervisionType: supervisionType, ConditionString: conditionString, Ids: ids }); } function reload() { $("#dgSupEvaluationList").cmsXDataTable("load", $.getDataGridParams("dgSupEvaluationList")); }