var url = CMS_SystemConfig.VirtualDirectoryPath + "/TeachersOrderExamine/ApprovalHandle"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function reload() { $("#dgTeachersOrderExamineList").cmsXDataTable("load", $.getDataGridParams("dgTeachersOrderExamineList")); } //页面提交审核 function TeachersOrder_Add() { var d = validChoose(); var names = validChoosetatusName(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要审核的信息!"); return; } if (unique(names).length > 1) { $.messager.alert("系统提示", "选中的审核数据中包含其他状态值!"); return; } var firstID = d[0]; $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=ET_TeachersOrder&FormID=' + firstID, 400, 300, TeachersOrder_Approve_Confirm); } function TeachersOrder_Approve_Confirm(action) { if (!action) return; if (action.ActionID == "") return; var d = validChoose().join(','); $.post(CMS_SystemConfig.VirtualDirectoryPath + "/TeachersOrderExamine/Approve", { teachersOrderIDs: d, actionID: action.Action, comment: action.Comment }, function (data) { $.messager.alert("系统提示", data.Message); if (data.IsSuccess) { reload(); } }, 'json'); } //点击查看流程状态 function edit(rowindex, rowdata) { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/TeachersOrderExamine/Edit?teachersOrderID=' + rowdata.TeachersOrderID + '&MNU=' + mnu; $.popupTopWindow('计划审核信息', redirectTo, 800, 600, null, null); } //点击查看审核记录 function ShowHistoryLog(rowindex, rowdata) { var redirectTo = url + '?TeachersOrderID=' + rowdata.TeachersOrderID + '&MNU=' + mnu; $.popupTopWindow('审批记录', redirectTo, 800, 600, null, null); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgTeachersOrderExamineList").cmsXDataTable("getSelections"), function (index) { d.push(this.TeachersOrderID); }); return d; } //获取选中的数据状态值 function validChoosetatusName() { var d = []; $.each($("#dgTeachersOrderExamineList").cmsXDataTable("getSelections"), function (index) { d.push(this.ApproveStatusName); }); return d; } //去除数组中重复数据、以达到验证状态是否一致效果、 function unique(arr) { var result = [], hash = {}; for (var i = 0, elem; (elem = arr[i]) != null; i++) { if (!hash[elem]) { result.push(elem); hash[elem] = true; } } return result; } function TeachersOrder_Export() { $("#formQuery").submit(); } function QueryPublishDropdownList(data) { reload(); } function QueryCourseDropdownList(data) { reload(); } function QuerySchoolYearDropdownList(data) { reload(); } function QueryCollegeDropdownList(data) { reload(); } function QueryStatusDropdownList(data) { reload(); }