123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- 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 " <span style=\"color: red;\">" + value + "</span>";
- }
|