123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeDelay/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgChargeDelayList").cmsXDataTable("load", $.getDataGridParams("dgChargeDelayList"));
- }
- //获取选中的数据All
- function validChooseAll() {
- var d = [];
- $.each($("#dgChargeDelayList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- //获取选中的数据ID
- function validChoose() {
- var d = [];
- $.each($("#dgChargeDelayList").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, 400, null, null);
- }
- //申请
- function ChargeDelay_Apply() {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('缓交名单申请', redirectTo, 680, 400, null, null);
- }
- //修改
- function ChargeDelay_Update() {
- 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, 400, null, null);
- }
- //删除
- function ChargeDelay_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);
- $("#dgChargeDelayList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //提交
- function ChargeDelay_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);
- $("#dgChargeDelayList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //审核
- function ChargeDelay_Approve() {
- var d = validChooseAll();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要审核的信息。");
- return;
- }
- if ($.grep(d, function (v, i) { return v.RecordStatus == startStatusID; }).length > 0) {
- $.messager.alert("系统提示", "不能对未提交状态的信息进行审核。");
- return;
- }
- var recordstatus = d[0].RecordStatus;
- if ($.grep(d, function (v, i) { return v.RecordStatus != recordstatus; }).length > 0) {
- $.messager.alert("系统提示", "不能对不同状态的信息同时进行审核。");
- return;
- }
- if ($.grep(d, function (v, i) { return v.RecordStatus == endStatusID; }).length > 0) {
- $.messager.alert("系统提示", "无法对已结束的流程进行审核。");
- return;
- }
- var chargeDelayIDs = validChoose();
- if (chargeDelayIDs.length > 1) {
- //批量审核
- var approveID = chargeDelayIDs[0];
- $.popupTopWindow('审核信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/ApproveHandler?TableName=EC_ChargeDelay&FormID=' + approveID,
- 400, 300, ChargeDelay_ApproveConfirm);
- }
- else {
- var chargeDelayID = chargeDelayIDs;
- //单个审核
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ChargeDelay/Approve?MNU=" + mnu + "&chargeDelayID=" + chargeDelayID;
- $.popupTopWindow('缓交名单审核', redirectTo, 680, 450, null, null);
- }
- }
- //确定(审核)
- function ChargeDelay_ApproveConfirm(action) {
- if (!action) {
- return;
- }
- if (action.ActionID == "") {
- return;
- }
- var approveIDs = validChoose().join(',');
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + "/ChargeDelay/BatchApprove", { chargeDelayIDs: approveIDs, actionID: action.Action, comment: action.Comment },
- function (data) {
- if (data.IsSuccess) {
- reload();
- }
- $.messager.alert("系统提示", data.Message);
- }, 'json');
- }
- //Excel导出
- function ChargeDelay_Excel() {
- $("#formQuery").submit();
- }
- //已缴金额列设置颜色为红色
- function SetAmountColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //联动查询
- 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();
- }
|