1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgMinorPlanApprove").cmsXDataTable("load", $.getDataGridParams("dgMinorPlanApprove"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgMinorPlanApprove").cmsXDataTable("getSelections"), function (index) {
- d.push(this.GradeMinorApplicationID);
- });
- return d;
- }
- function validChooseState() {
- var d = [];
- $.each($("#dgMinorPlanApprove").cmsXDataTable("getSelections"), function (index) {
- d.push(this.ApprovalStatus);
- });
- return d;
- }
- function MinorPlanApprove_Approve() {
- var d = validChoose();
- var state = validChooseState().join(',');
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要审核的信息!");
- return;
- }
- var st = state.split(',')[0];
- for (var i = 0; i < state.split(',').length; i++) {
- if (state.split(',')[i] != "" && state.split(',')[i] != st) {
- $.messager.alert("系统提示", "您选择处理的数据审核状态不一致,请重新选择!");
- return;
- }
- }
- var firstID = d[0];
- $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=CF_GrademinorApplication&FormID=' + firstID,
- 400, 300, MinorPlanApprove_Approve_Confirm);
- }
- function MinorPlanApprove_Approve_Confirm(action) {
- if (!action) return;
- if (action.ActionID == "") return;
- var d = validChoose().join(',');
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/MinorPlanApprove/Approve", { GradeMinorApplicationIDs: 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 + "/MinorPlanApply/Edit?GradeMinorApplicationIDs=" + rowdata.GradeMinorApplicationID + "&MNU=" + mnu + '&isView=1';
- $.popupTopWindow('辅修课程信息详情', redirectTo, 800, 600, null, null);
- }
- //导出Excel
- function MinorPlanApprove_Export() {
- var d = validChoose().join(',')
- if (d != "") {
- document.getElementById("GradeMinorApplicationID").value = d;
- }
- else {
- document.getElementById("GradeMinorApplicationID").value = "";
- }
- $("#formQuery").submit();
- }
|