viewQyxx.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. function editQyxx(id, from) {
  2. huimv.loadPage('qyxxRight', 'editQyxx.htm', {
  3. "id" : id,
  4. "from" : from
  5. });
  6. }
  7. /**
  8. * 作废企业信息
  9. * @param id
  10. */
  11. function disableQyxx(id, from, numOfExistYh) {
  12. if(numOfExistYh != "" && numOfExistYh > 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 : 'disableQyxx.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('qyxxGrid');
  37. } else if (from == 'view') {
  38. loadQyxxList();
  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. }