RetakeOpenControl.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/RetakeOpenControl/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. function reload() {
  8. $("#dgOpenControlList").cmsXDataTable("load", $.getDataGridParams("dgOpenControlList"));
  9. }
  10. //获取选中的数据
  11. function validChoose() {
  12. var d = [];
  13. $.each($("#dgOpenControlList").cmsXDataTable("getSelections"), function (index) {
  14. d.push(this.RetakeOpenControlID);
  15. });
  16. return d;
  17. }
  18. //重修控制新增
  19. function RetakeOpenControl_Add() {
  20. var redirectTo = url + "?MNU=" + mnu;
  21. $.popupTopWindow('重修控制新增', redirectTo, 650, 230, null, null);
  22. }
  23. //重修控制修改
  24. function RetakeOpenControl_Update() {
  25. var d = validChoose();
  26. if (d.length == 0) {
  27. $.messager.alert("系统信息", "请选择您要修改的信息。");
  28. return;
  29. }
  30. if (d.length > 1) {
  31. $.messager.alert("系统信息", "只能选择单个记录进行修改。");
  32. return;
  33. }
  34. var redirectTo = url + "?RetakeOpenControlID=" + d + "&MNU=" + mnu;
  35. $.popupTopWindow('重修控制修改', redirectTo, 650, 230, null, null);
  36. }
  37. //删除
  38. function RetakeOpenControl_Delete() {
  39. var d = validChoose();
  40. if (d.length == 0) {
  41. $.messager.alert("系统提示", "请选择您要删除的信息。");
  42. return;
  43. }
  44. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  45. if (r) {
  46. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakeOpenControl/Delete', { RetakeOpenControlIDs: d.join(',') }, function (data) {
  47. if (data.IsSuccess) {
  48. $.messager.alert("系统提示", data.Message);
  49. $("#dgOpenControlList").cmsXDataTable('load');
  50. } else {
  51. $.messager.alert("系统提示", data.Message);
  52. }
  53. });
  54. }
  55. });
  56. }
  57. //Excel导出
  58. function RetakeOpenControl_Export() {
  59. $("#formQuery").submit();
  60. }