viewQxxx.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. function editQxxx(id, from) {
  2. huimv.loadPage('qxglRight', 'editQxxx.htm', {
  3. "id" : id,
  4. "from" : from
  5. });
  6. }
  7. /**
  8. * 作废权限信息
  9. * @param id
  10. */
  11. function disableQxxx(id, from, numOfExistJs) {
  12. if (numOfExistJs != "" && numOfExistJs > 0) {
  13. var errMsg = document.getElementById('errMsg');
  14. errMsg.innerHTML = "无法删除此权限,请先通过角色信息中的分配权限功能去掉角色信息下的该权限!";
  15. return;
  16. }
  17. Dialogs.alert("确定作废当前权限信息?", {
  18. title : '提示信息',
  19. width : 250,
  20. height : 80,
  21. top : 150,
  22. button : {
  23. ok : ['确定',function(){
  24. this.close();
  25. huimv.showProcessModel('处理数据中');
  26. jQuery.ajax({
  27. url : 'disableQxxx.htm',
  28. dataType : 'json',
  29. type : 'post',
  30. cache : false,
  31. data : {"id" : id},
  32. success : function(data) {
  33. huimv.hideProcessModel();
  34. if (data.returnCode > 0) {
  35. if (from == 'list') {
  36. huimv.reloadGrid('qxxxGrid');
  37. } else if (from == 'view') {
  38. loadQxxxList();
  39. }
  40. } else {
  41. Dialogs.alert("传入参数有误!", {
  42. width : 300,
  43. height : 50
  44. });
  45. }
  46. },
  47. error : function(data) {
  48. huimv.showError(data.responseText);
  49. }
  50. });
  51. }],
  52. cancel : ['取消',function(){
  53. this.close();
  54. }]
  55. }
  56. });
  57. }