todo.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. }
  29. }
  30. todo.banliTh=function(type,id){
  31. var path="/todo";
  32. if(type=="dcsb"){
  33. location.href=$.app+"/dcsb/edit?flag=th&path="+path+"&id="+id+"&type="+type;
  34. }else if(type=="jsjd"){
  35. location.href=$.app+"/jsjdgl/edit?id="+id+"&flag=audit"+"&path="+path+"&type="+type;
  36. }else if(type=="jsjdjggz"){
  37. location.href=$.app+"/jsjdgl/edit?id="+id+"&flag=audit"+"&path="+path+"&type="+type;
  38. }else if(type=="xkzyx"){
  39. location.href=$.app+"/xkzyx/editmain?flag=th&id="+id+"&path2="+path+"&type="+type;
  40. }else if(type=="xkzsq"){
  41. location.href=$.app+"/xkzsq/editmain?flag=th&id="+id+"&path2="+path+"&type="+type;
  42. }else if(type=="xkzbg"){
  43. location.href=$.app+"/xkzbg/editmain?flag=th&id="+id+"&path2="+path+"&type="+type;
  44. }else if(type=="xkzzx"){
  45. location.href=$.app+"/xkzzx/editmain?flag=th&id="+id+"&path2="+path+"&type="+type;
  46. }
  47. }
  48. function initTySelect(divid,existVal,changefunc,width){
  49. var str = "";
  50. if(changefunc!=null&&changefunc!=""){
  51. str+="<select class='todoselectpicker' name='type' onchange='"+changefunc+"()' >";
  52. }else{
  53. str+="<select class='todoselectpicker' name='type' >";
  54. }
  55. str+="<option></option>";
  56. var json=eval(jsonstr);
  57. for(var i=0;i<json.length;i++){
  58. var k = json[i];
  59. if(k.type==existVal){
  60. str+=" <option selected='selected' value='"+k.type+"' >"+k.name+"</option>";
  61. }else{
  62. str+=" <option value='"+k.type+"' >"+k.name+"</option>";
  63. }
  64. }
  65. str+="</select>";
  66. $("#"+divid).empty();
  67. $("#"+divid).append(str);
  68. $('.todoselectpicker').selectpicker({
  69. width:width
  70. });
  71. }