todo.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /**
  2. 待办
  3. *
  4. */
  5. $.namespace("todo");
  6. var jsonstr="data=[{'type':'gg','name':'公告'},{'type':'dcsb','name':'单船申报'},{'type':'xkzsq','name':'许可证申请'},{'type':'xkzbg','name':'许可证变更'},{'type':'xkzyx','name':'许可证延续'},{'type':'xkzzx','name':'许可证注销'}]";
  7. todo.init=function(){
  8. };
  9. todo.search=function(){
  10. $("#todoform").submit();
  11. };
  12. todo.banli=function(type,id){
  13. var path="/todo";
  14. if(type=="dcsb"){
  15. location.href=$.app+"/dcsb/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  16. }else if(type=="jsjd"){
  17. location.href=$.app+"/jsjdgl/edit?id="+id+"&flag=audit"+"&path="+path+"&type="+type;
  18. }else if(type=="jsjdjggz"){
  19. location.href=$.app+"/jsjdgl/edit?id="+id+"&flag=audit"+"&path="+path+"&type="+type;
  20. }else if(type=="xkzyx"){
  21. location.href=$.app+"/xkzyx/viewmain?flag=audit&id="+id+"&path2="+path+"&type="+type;
  22. }else if(type=="xkzsq"){
  23. location.href=$.app+"/xkzsq/viewmain?flag=audit&id="+id+"&path2="+path+"&type="+type;
  24. }else if(type=="xkzbg"){
  25. location.href=$.app+"/xkzbg/viewmain?flag=audit&id="+id+"&path2="+path+"&type="+type;
  26. }else if(type=="xkzzx"){
  27. location.href=$.app+"/xkzzx/viewmain?flag=audit&id="+id+"&path2="+path+"&type="+type;
  28. }else if(type=="jsjdcbsjds"){
  29. location.href=$.app+"/jsjdcbsjds/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  30. }else if(type=="jsjdbgds"){
  31. location.href=$.app+"/jsjdbgds/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  32. }else if(type=="jgsqds"){
  33. location.href=$.app+"/jgsqds/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  34. }else if(type=="jsjdcbsj"){
  35. location.href=$.app+"/jsjdcbsj/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  36. }else if(type=="jsjdbg"){
  37. location.href=$.app+"/jsjdbg/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  38. }else if(type=="jgsq"){
  39. location.href=$.app+"/jgsq/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  40. }else if(type=="lhsq"){
  41. location.href=$.app+"/lhsq/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  42. }else if(type=="lhbg"){
  43. location.href=$.app+"/lhbg/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  44. }else if(type=="lhzx"){
  45. location.href=$.app+"/lhzx/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  46. }else if(type=="jdtx"){
  47. location.href=$.app+"/jdtxxx/view?flag=audit&path="+path+"&id="+id+"&type="+type;
  48. }
  49. }
  50. todo.banliTh=function(type,id){
  51. var path="/todo";
  52. if(type=="dcsb"){
  53. location.href=$.app+"/dcsb/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  54. }else if(type=="jsjd"){
  55. location.href=$.app+"/jsjdgl/edit?id="+id+"&flag=audit"+"&path="+path+"&type="+type;
  56. }else if(type=="jsjdjggz"){
  57. location.href=$.app+"/jsjdgl/edit?id="+id+"&flag=audit"+"&path="+path+"&type="+type;
  58. }else if(type=="xkzyx"){
  59. location.href=$.app+"/xkzyx/editmain?flag=th&id="+id+"&path2="+path+"&type="+type;
  60. }else if(type=="xkzsq"){
  61. location.href=$.app+"/xkzsq/editmain?flag=th&id="+id+"&path2="+path+"&type="+type;
  62. }else if(type=="xkzbg"){
  63. location.href=$.app+"/xkzbg/editmain?flag=th&id="+id+"&path2="+path+"&type="+type;
  64. }else if(type=="xkzzx"){
  65. location.href=$.app+"/xkzzx/editmain?flag=th&id="+id+"&path2="+path+"&type="+type;
  66. }else if(type=="jsjdcbsjds"){
  67. location.href=$.app+"/jsjdcbsjds/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  68. }else if(type=="jsjdbgds"){
  69. location.href=$.app+"/jsjdbgds/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  70. }else if(type=="jgsqds"){
  71. location.href=$.app+"/jgsqds/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  72. }else if(type=="jsjdcbsj"){
  73. location.href=$.app+"/jsjdcbsj/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  74. }else if(type=="jsjdbg"){
  75. location.href=$.app+"/jsjdbg/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  76. }else if(type=="jgsq"){
  77. location.href=$.app+"/jgsq/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  78. }else if(type=="lhsq"){
  79. location.href=$.app+"/lhsq/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  80. }else if(type=="lhbg"){
  81. location.href=$.app+"/lhbg/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  82. }else if(type=="lhzx"){
  83. location.href=$.app+"/lhzx/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  84. }else if(type=="jdtx"){
  85. location.href=$.app+"/jdtxxx/edit?flag=audit&path="+path+"&id="+id+"&type="+type;
  86. }
  87. }
  88. function initTySelect(divid,existVal,changefunc,width){
  89. var str = "";
  90. if(changefunc!=null&&changefunc!=""){
  91. str+="<select class='todoselectpicker' name='type' onchange='"+changefunc+"()' >";
  92. }else{
  93. str+="<select class='todoselectpicker' name='type' >";
  94. }
  95. str+="<option></option>";
  96. var json=eval(jsonstr);
  97. for(var i=0;i<json.length;i++){
  98. var k = json[i];
  99. if(k.type==existVal){
  100. str+=" <option selected='selected' value='"+k.type+"' >"+k.name+"</option>";
  101. }else{
  102. str+=" <option value='"+k.type+"' >"+k.name+"</option>";
  103. }
  104. }
  105. str+="</select>";
  106. $("#"+divid).empty();
  107. $("#"+divid).append(str);
  108. $('.todoselectpicker').selectpicker({
  109. width:width
  110. });
  111. }