1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/MinorControl/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgMinorControlList").cmsXDataTable("load", $.getDataGridParams("dgMinorControlList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgMinorControlList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.MinorControlID);
- });
- return d;
- }
- //辅修控制新增
- function MinorControl_Add() {
- var d = validChoose();
- if (d.length > 0) {
- $.popupTopWindow('辅修控制复制新增', CMS_SystemConfig.VirtualDirectoryPath + '/MinorControl/CopyAdd?minorControlID=' + d[0] + '&MNU=' + mnu, 680, 320, null, null);
- } else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('辅修控制新增', redirectTo, 680, 320, null, null);
- }
- }
- //辅修控制修改
- function MinorControl_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?minorControlID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('辅修控制修改', redirectTo, 650, 230, null, null);
- }
- //删除
- function MinorControl_Delete() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/MinorControl/Delete', { minorControlIDs: d.join(',') }, function (data) {
- if (data == "删除成功。") {
- $.messager.alert("系统提示", data);
- $("#dgMinorControlList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
|