var url = CMS_SystemConfig.VirtualDirectoryPath + "/StudentChargeDelay/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //刷新 function reload() { $("#dgStudentChargeDelayList").cmsXDataTable("load", $.getDataGridParams("dgStudentChargeDelayList")); } //获取选中的数据All function validChooseAll() { var d = []; $.each($("#dgStudentChargeDelayList").cmsXDataTable("getSelections"), function (index) { d.push(this); }); return d; } //获取选中的数据ID function validChoose() { var d = []; $.each($("#dgStudentChargeDelayList").cmsXDataTable("getSelections"), function (index) { d.push(this.ChargeDelayID); }); return d; } //查看明细 function edit(rowindex, rowdata) { var redirectTo = url + "?chargeDelayID=" + rowdata.ChargeDelayID + "&MNU=" + mnu + "&Type=1"; $.popupTopWindow('缓交申请信息', redirectTo, 680, 380, null, null); } //申请 function StudentChargeDelay_Apply() { var redirectTo = url + "?MNU=" + mnu; $.popupTopWindow('缓交申请', redirectTo, 680, 380, null, null); } //修改 function StudentChargeDelay_Edit() { var id = validChoose(); if (id == "") { $.messager.alert("系统提示", "请选择您要修改的信息。"); return; } if (id.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } var d = validChooseAll(); if ($.grep(d, function (v, i) { return v.RecordStatus != startStatusID; }).length > 0) { $.messager.alert("系统提示", "只能对未提交状态的信息进行修改。"); return; } var redirectTo = url + "?chargeDelayID=" + id + "&MNU=" + mnu; $.popupTopWindow('缓交申请修改', redirectTo, 680, 380, null, null); } //删除 function StudentChargeDelay_Delete() { var id = validChoose().join(','); if (id == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } var d = validChooseAll(); if ($.grep(d, function (v, i) { return v.RecordStatus != startStatusID; }).length > 0) { $.messager.alert("系统提示", "只能对未提交状态的信息进行删除。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChargeDelay/Delete', { chargeDelayIDs: id }, function (data) { if (data == "删除成功。") { $.messager.alert("系统提示", data); $("#dgStudentChargeDelayList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } //提交 function StudentChargeDelay_Submit() { var chargeDelayIDs = validChoose().join(','); if (chargeDelayIDs.length == 0) { $.messager.alert("系统提示", "请选择您要提交的信息。"); return; } var d = validChooseAll(); if ($.grep(d, function (v, i) { return v.RecordStatus != startStatusID; }).length > 0) { $.messager.alert("系统提示", "只能对未提交状态的信息进行提交。"); return; } $.messager.confirm("系统提示", "您确定要提交选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChargeDelay/Submit', { chargeDelayIDs: chargeDelayIDs }, function (data) { if (data.IsSuccess == true) { $.messager.alert("系统提示", data.Message); $("#dgStudentChargeDelayList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } //Excel导出 function StudentChargeDelay_Excel() { $("#formQuery").submit(); } //已缴金额列设置颜色为红色 function SetAmountColumn(index, row, value) { return " " + value + ""; }