lhsqmain.js 2.4 KB

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