var url = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeStandard/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //刷新 function reload() { $("#dgChargeStandardList").cmsXDataTable("load", $.getDataGridParams("dgChargeStandardList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgChargeStandardList").cmsXDataTable("getSelections"), function (index) { d.push(this.ChargeStandardID); }); return d; } //新增 function ChargeStandard_Add() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeStandard/AddList" + "?MNU=" + mnu; $.popupTopWindow('收费标准新增', redirectTo, 850, 550, reload, null); } //修改 function ChargeStandard_Update() { var d = validChoose(); if (d == "") { $.messager.alert("系统提示", "请选择您要修改的信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?chargeStandardID=" + d + "&MNU=" + mnu; $.popupTopWindow('收费标准修改', redirectTo, 640, 350, null, null); } //删除 function ChargeStandard_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChargeStandard/Delete', { chargeStandardIDs: d }, function (data) { if (data == "删除成功。") { $.messager.alert("系统提示", data); $("#dgChargeStandardList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } //刷新名单 function ChargeStandard_CreateReceivable() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要刷新的信息。"); return; } //在校状态 var inschoolStatus = $("#DictionaryInschoolStatus").combobox("getValue"); $.messager.confirm("系统提示", "您确定要对选择的信息进行刷新名单?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChargeStandard/CreatChargeList', { chargeStandardIDs: d, inschoolStatus: inschoolStatus }, function (data) { if (data.IsSuccess == true) { $.messager.alert("系统提示", data.Message); $("#dgChargeStandardList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } //学生信息明细 function editStudentCount(rowindex, rowdata) { var inschoolStatus = $("#DictionaryInschoolStatus").combobox("getValue"); var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeStandard/StudentList?inschoolStatus=" + inschoolStatus + "&grademajorID=" + rowdata.GrademajorID + "&MNU=" + mnu; $.popupTopWindow('学生信息明细', redirectTo, 750, 420, null, null); } //应收名单信息 function editStudentChargeCount(rowindex, rowdata) { //在校状态暂时不考虑,只传 var inschoolStatus = $("#DictionaryInschoolStatus").combobox("getValue"); var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeStandard/StudentChargeList?grademajorID=" + rowdata.GrademajorID + "&chargeYearID=" + rowdata.ChargeYear + "&chargeProjectID=" + rowdata.ChargeProjectID + "&inschoolStatus=" + inschoolStatus + "&MNU=" + mnu; $.popupTopWindow('应收名单信息', redirectTo, 760, 420, null, null); } //Excel导出 function ChargeStandard_Excel() { $("#formQuery").submit(); } //联动查询 function queryStandard(data) { queryClass(); reload(); } function queryCollege(data) { var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|"; jsonString += "CollegeDropdown|*|" + collegeID + "|@|'})"; $("#CollegeDropdown").combogridX("reload", eval(jsonString)); $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString)); queryClass(); reload(); } function queryClass() { var jsonString = ""; var parameterString = ""; var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var educationID = $("#DictionaryEducation").combobox("getValue"); var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue"); var standardID = $("#StandardDictionaryDropDown").combogridX("getValue"); var learningFormID = $("#DictionaryLearningform").combobox("getValue"); if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|"; if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#StandardDictionaryDropDown").combogridX("reload", eval(jsonString)); } else { $("#StandardDictionaryDropDown").combogridX("reload"); } reload(); }