$(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); var jsonString = ""; var parameterString = ""; var schoolyearID = $("#ddlSchoolyear").combobox("getValue"); if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#cgExaminationBatch").combogridX("reload", eval(jsonString)); } }) function schoolyearChange() { try { var examinationBatchUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationBatch/DropDownList?bindType=0'; var schoolyearID = $("#ddlSchoolyear").combobox('getValue'); if (schoolyearID != nonSelect) { examinationBatchUrl += "&schoolyearID=" + schoolyearID; } $("#ddlExaminationBatch").combobox('reload', examinationBatchUrl); } catch (e) { } } function examinationBatchChange() { try { var examinationTypeUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/TypeDropDownList?bindType=0'; var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue'); if (examinationBatchID != nonSelect) { examinationTypeUrl += "&examinationBatchID=" + examinationBatchID; } $("#ddlExaminationType").combobox('reload', examinationTypeUrl); } catch (e) { } } function examinationTypeChange() { try { var examinationProjectUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/DropDownList?bindType=0'; var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue'); var examinationTypeID = $("#ddlExaminationType").combobox('getValue'); if (examinationBatchID != nonSelect) { examinationProjectUrl += "&examinationBatchID=" + examinationBatchID; } if (examinationTypeID != nonSelect) { examinationProjectUrl += "&examinationTypeID=" + examinationTypeID; } $("#ddlExaminationProject").combobox('reload', examinationProjectUrl); } catch (e) { } } function querySchoolYear() { var jsonString = ""; var parameterString = ""; var schoolyearID = $("#ddlSchoolyear").combobox("getValue"); if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#cgExaminationBatch").combogridX("reload", eval(jsonString)); } reload(); } function queryBatch() { var jsonString = ""; var parameterString = ""; var examinationBatchID = $("#cgExaminationBatch").combogridX("getValue"); var examinationTypeID = $("#cgExaminationType").combogridX("getValue"); if (examinationBatchID != nonSelect && examinationBatchID != "") parameterString += "cgExaminationBatch|*|" + examinationBatchID + "|@|"; if (examinationTypeID != nonSelect && examinationTypeID != "") parameterString += "cgExaminationType|*|" + examinationTypeID + "|@|"; var schoolyearID = $("#ddlSchoolyear").combobox("getValue"); if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#cgExaminationType").combogridX("reload", eval(jsonString)); $("#cgExaminationProject").combogridX("reload", eval(jsonString)); } reload(); } function queryType() { var jsonString = ""; var parameterString = ""; var examinationBatchID = $("#cgExaminationBatch").combogridX("getValue"); var examinationTypeID = $("#cgExaminationType").combogridX("getValue"); if (examinationBatchID != nonSelect && examinationBatchID != "") parameterString += "cgExaminationBatch|*|" + examinationBatchID + "|@|"; if (examinationTypeID != nonSelect && examinationTypeID != "") parameterString += "cgExaminationType|*|" + examinationTypeID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#cgExaminationProject").combogridX("reload", eval(jsonString)); } reload(); } function examinationProjectLoaded() { try { var collegeUrl = CMS_SystemConfig.VirtualDirectoryPath + '/College/CollegeDropdownListOnlyCollege?bindType=1'; $("#ddlCollege").combobox('reload', collegeUrl); } catch (e) { } reload(); } function collegeChange() { try { var jsonString = ""; var parameterString = ""; var campusID = $("#ddlCampus").combobox('getValue'); var collegeID = $("#ddlCollege").combobox('getValue'); var yearID = $("#ddlYear").combobox("getValue"); if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (yearID != nonSelect) parameterString += "DictionarySchoolyear|*|" + yearID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#cgbClassmajor").combogridX("reload", eval(jsonString)); } else { $("#cgbClassmajor").combogridX("reload"); } } catch (e) { } } function collegeSelect() { collegeChange(); reload(); } function reload() { $("#dgStudentFeeList").cmsXDataTable("load", $.getDataGridParams("dgStudentFeeList")); } // 获取选中的数据 function validChoose() { var d = []; $.each($("#dgStudentFeeList").cmsXDataTable("getSelections"), function (index) { if (this.ExaminationRegistrationID) { d.push(this.ExaminationRegistrationID); } }); return d; } // 获取选中的数据 function validChooseAll() { var d = []; $.each($("#dgStudentFeeList").cmsXDataTable("getSelections"), function (index) { if (this.ExaminationRegistrationID) { d.push(this); } }); return d; } function StudentFee_Excel() { $("[name='selectedIDs']").val(validChoose().join(',')); $("#formQuery").submit(); } function StudentFee_Receipt() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/StudentFee/ReceiptSetting?MNU=" + mnu; $.popupTopWindow('设置收据号', redirectTo, 500, 160, null, null); } function StudentFee_InvalidReceipt() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/StudentFee/InvalidReceipt?MNU=" + mnu; $.popupTopWindow('作废收据号', redirectTo, 500, 160, null, null); } function StudentFee_Print() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/StudentFee/Print?MNU=" + mnu; $.popupTopWindow('缴费打印', redirectTo, 1024, 600, null, reload); } function StudentFee_PrintGDCX() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/StudentFee/PrintGDCX?MNU=" + mnu; $.popupTopWindow('缴费打印', redirectTo, 1024, 600, null, reload); } function StudentFee_Refund() { var ids = validChooseAll(); if (ids.length == 0) { $.messager.alert("系统提示", "请选择您要退费的缴费记录。"); return; } if (ids.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行退费。"); return; } if (ids[0].ExaminationRegistrationConfirmID == null) { $.messager.alert("系统提示", "退费申请只针对线下缴费,在线缴费请在学生端或微信端进行退费。"); return; } var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/StudentFee/Refund?MNU=" + mnu + "&examinationRegistrationID=" + ids[0].ExaminationRegistrationID; $.popupTopWindow('退费申请', redirectTo, 1024, 600, null, reload); } function StudentFee_RefundConfirm() { var ids = validChooseAll(); if (ids.length == 0) { $.messager.alert("系统提示", "请选择您要确认的退费记录。"); return; } if (ids.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行确认。"); return; } var errStatusList = $.grep(ids, function (x) { return x.RecordStatus != refundingStatusID }); if (errStatusList.length > 0) { $.messager.alert("系统提示", "只能选择待退费的记录进行确认。"); return; } var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/StudentFee/RefundConfirm?MNU=" + mnu + "&examinationRegistrationID=" + ids[0].ExaminationRegistrationID; $.popupTopWindow('退费确认', redirectTo, 1024, 600, null, reload); } function gridLoaded(data) { if (data && data.total) { var rows = $("#dgStudentFeeList").cmsXDataTable("getRows"); if ($.grep(rows, function (x) { return x.ExaminationRegistrationID == null; }).length == 0) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentFee/ListSum', $.getDataGridParams("dgStudentFeeList"), function (res) { if (res) { rows.push({ ExaminationRegistrationID: null, ExaminationBatchProjectID: null, ExaminationProjectID: null, ExaminationRegistrationConfirmID: null, No: null, ReceiptNo: null, ExaminationProjectName: null, ExaminationBatchName: null, SchoolyearID: null, SchoolyearCode: null, ExaminationProjectFeeTypeID: null, FeeTypeID: null, FeeTypeName: null, UserID: null, CollegeID: null, ClassmajorID: null, ClassmajorName: null, LoginID: null, StudentNo: null, UserName: null, Sex: null, SexName: null, CertificatesType: null, CertificatesTypeName: null, IDNumber: null, Fee: res, Remark: null, RecordStatus: null, RecordStatusName: null, PayTime: null }); $("#dgStudentFeeList").cmsXDataTable("loadCurPageData", { rows: rows, total: data.total }); } }); } } } //function payTimeChanged() { // var payTimeStart = $("#StartDate").val(); // var payTimeEnd = $("#EndDate").val(); // //if (payTimeStart != "" && payTimeEnd != "") { // // if (payTimeEnd.ymdToDate() < payTimeStart.ymdToDate()) { // // $.messager.alert("系统提示", "缴费时间起必须小于或等于缴费时间止。"); // // return; // // } // //} // reload(); //} function StudentFee_RefundAprrove() { var ids = validChoose(); var list = validChooseAll(); if (ids.length == 0) { $.messager.alert("系统提示", "请选择您要退费审核的缴费记录。"); return; } var errStatusList = $.grep(list, function (x) { return x.RecordStatus != refundApplyID }); if (errStatusList.length > 0) { $.messager.alert("系统提示", "只能选择退费申请状态的记录进行审核。"); return; } var examinationRegistrationIDs = ids.join(','); var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/StudentFee/RefundApprove?MNU=" + mnu + "&examinationRegistrationIDs=" + examinationRegistrationIDs; $.popupTopWindow('退费审核', redirectTo, 400, 200, null, reload); } function startDateChanged(dp) { $("#StartDate").val($dp.cal.getNewDateStr()); reload(); } function endDateChanged(dp) { $("#EndDate").val($dp.cal.getNewDateStr()); reload(); } function refundStartDateChanged(dp) { $("#RefundStartDate").val($dp.cal.getNewDateStr()); reload(); } function refundEndDateChanged(dp) { $("#RefundEndDate").val($dp.cal.getNewDateStr()); reload(); }