123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/StudentCharge/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //查询
- function reload() {
- $("#dgStudentChargeList").cmsXDataTable("load", $.getDataGridParams("dgStudentChargeList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgStudentChargeList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.StudentChargeID);
- });
- return d;
- }
- //新增
- function StudentCharge_Add() {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('应收名单新增', redirectTo, 600, 280, null, null);
- }
- //修改
- function StudentCharge_Update() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?studentChargeID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('应收名单修改', redirectTo, 600, 280, null, null);
- }
- //删除
- function StudentCharge_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentCharge/Delete', { studentChargeIDs: d }, function (data) {
- if (data == "删除成功。") {
- $.messager.alert("系统提示", data);
- $("#dgStudentChargeList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //获取选中的数据
- function validChooseTmp() {
- var d = [];
- $.each($("#dgStudentChargeList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.StudentChargeID);
- });
- return d;
- }
- //获取选中的数据(this)
- function validChooseobj() {
- var d = [];
- $.each($("#dgStudentChargeList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //费用调整(可批量调整)
- function StudentCharge_ChangeActualAmount() {
- var d = validChoose().join(',');
- if (d.length == "") {
- $.messager.alert("系统提示", "请选择要进行费用调整的信息。");
- return;
- }
- var tmps = validChooseTmp().join(',');
- var c = validChooseobj();
- var orderJsonStr = JSON.stringify(c);
- $.popupTopWindow('费用调整', CMS_SystemConfig.VirtualDirectoryPath + '/StudentCharge/ChangeActualAmount?MNU='
- + mnu, 420, 280, null, orderJsonStr);
- }
- //应收名单缓交申请
- function StudentCharge_ChargeDelay() {
- var d = validChoose().join(',');
- var studentChargeID = d;
- if (d.length == "") {
- $.messager.alert("系统提示", "请选择要申请的信息。");
- return;
- }
- var len = validChoose();
- if (len.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行申请。");
- return;
- }
- //var c = validChooseobj();
- //var orderJsonStr = JSON.stringify(c);
-
- var redirectTo = "/StudentCharge/ChargeDelay" + "?studentChargeID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('缓交申请', CMS_SystemConfig.VirtualDirectoryPath + redirectTo, 680, 400, null, null);
- }
- //已缴金额列设置颜色为红色
- function SetPaidAmountColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //导出
- function StudentCharge_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();
- }
|