xkzsqmain.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /**
  2. * 许可证申请
  3. *
  4. */
  5. $.namespace("xkzsq.main");
  6. xkzsq.main.szd = null;
  7. xkzsq.main.szgq = null;
  8. xkzsq.main.szgk = null;
  9. xkzsq.main.init = function() {
  10. xkzsq.main.sel();
  11. // 把form传入,构造翻页控件
  12. pageinfo($("#xkzsqform"));
  13. }
  14. xkzsq.main.sel = function() {
  15. initszdSelect('szdsel', xkzsq.main.szd, 'showgk', '80%');
  16. initgkSelect('gksel', xkzsq.main.szgk, xkzsq.main.szd, 'showgq', '80%');
  17. initgqSelect('gqsel', xkzsq.main.szgq, xkzsq.main.szd, xkzsq.main.szgk,
  18. null, '80%');
  19. }
  20. function showgk() {
  21. initgqSelect('gqsel', '', '', '', null, 200);
  22. initgkSelect('gksel', xkzsq.main.szgk, $('.szdselectpicker').val(),
  23. 'showgq', '80%');
  24. }
  25. function showgq() {
  26. initgqSelect('gqsel', xkzsq.main.szgq, $('.szdselectpicker').val(), $(
  27. '.gkselectpicker').val(), null, '80%');
  28. }
  29. // 新增
  30. xkzsq.main.add = function() {
  31. $.ajax({
  32. async : true,
  33. url : $.app + "/xkzxx/findByjyrid",
  34. type : "post",
  35. dataType : "json",
  36. data:{
  37. flag :1
  38. },
  39. success : function(data) {// ajax返回的数据
  40. if (data.success) {
  41. location.href = $.app + "/xkzsq/addmain";
  42. } else {
  43. $.alert({
  44. title : '提示',
  45. content : data.message,
  46. confirm : function() {
  47. }
  48. });
  49. }
  50. }
  51. });
  52. }
  53. xkzsq.main.search = function() {
  54. $('#pagejump').val(1);
  55. $("#xkzsqform").submit();
  56. }
  57. xkzsq.main.del = function(data) {
  58. $.confirm({
  59. title : '确认框',
  60. content : '确认删除吗',
  61. confirm : function() {
  62. $.post($.app + "/xkzsq/delete", {
  63. id : data
  64. }, function(data) {
  65. if (data.success) {
  66. $.alert({
  67. title : '提示',
  68. content : '删除成功',
  69. confirm : function() {
  70. $("#xkzsqform").submit();
  71. }
  72. });
  73. } else {
  74. $.alert({
  75. title : '提示',
  76. content : data.message,
  77. confirm : function() {
  78. }
  79. });
  80. }
  81. }, "json");
  82. },
  83. cancel : function() {
  84. }
  85. });
  86. }
  87. xkzsq.main.edit = function(data) {
  88. location.href = $.app + "/xkzsq/editmain?id=" + data;
  89. }
  90. xkzsq.main.back = function(data) {
  91. location.href = $.app + "/xkzsq/editmain?flag=th&id=" + data;
  92. }
  93. xkzsq.main.banli = function(data) {
  94. location.href = $.app + "/xkzsq/viewmain?flag=audit&id=" + data;
  95. }
  96. xkzsq.main.view = function(data) {
  97. location.href = $.app + "/xkzsq/viewmain?id=" + data;
  98. }
  99. xkzsq.main.showxkzjds = function(data) {
  100. location.href = $.app + "/xkzsq/showXkzjds?sqid=" + data;
  101. }