12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/ChangeReport/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //刷新
- function reload() {
- $("#dgChangeReportList").cmsXDataTable("load", $.getDataGridParams("dgChangeReportList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgChangeReportList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.ChangeReportID);
- });
- return d;
- }
- //新增
- function ChangeReport_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('异动报表复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/ChangeReport/CopyAdd?changeReportID=' + d[0] + '&MNU=' + mnu, 600, 250, null, null);
- } else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('异动报表新增', redirectTo, 600, 250, null, null);
- }
- }
- //修改按钮
- function ChangeReport_Edit() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?changeReportID=" + d + "&MNU=" + mnu + "&type=edit";
- $.popupTopWindow('异动报表修改', redirectTo, 600, 250, null, null);
- }
- //查看明细
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?changeReportID=" + rowdata.ChangeReportID + "&MNU=" + mnu + "&type=detail";
- $.popupTopWindow('异动报表明细', redirectTo, 600, 250, null, null);
- }
- //删除
- function ChangeReport_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ChangeReport/Delete', { changeReportIDs: d }, function (data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", data.Message);
- $("#dgChangeReportList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
- });
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
- //导出Excel
- function ChangeReport_Export() {
- $("#formQuery").submit();
- }
|