三元财务UI

index.html 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. </head>
  10. <body>
  11. <script src="js/jquery.min.js"></script>
  12. <script src="Script/Common/huayi.config.js"></script>
  13. <script src="Script/Common/huayi.http.js"></script>
  14. <script type="text/javascript">
  15. var openid = helper.cookies.get("openid");
  16. var id = helper.request.queryString("id");
  17. var code = helper.request.queryString("code");
  18. var menucode = helper.request.queryString("menucode");
  19. var typeUser = helper.cookies.get("typeUser");
  20. if(!openid) {
  21. $.ajax({
  22. type: "get",
  23. url: huayi.config.callcenter_url + 'WxLogin/GetOpenId',
  24. data: {
  25. code: code
  26. },
  27. dataType: 'json',
  28. success: function(result) {
  29. if(result.state.toLowerCase() == "success") {
  30. var openid=result.data.openid;
  31. helper.cookies.set("RoleCode", result.data.rolecode, 7);
  32. window.location.replace("login.html?menuCode="+menucode+'&openid='+openid);
  33. }
  34. }
  35. });
  36. }else {
  37. if (typeUser=="5") {
  38. gourl();
  39. } else if(typeUser=="1"){
  40. gourlStaff();
  41. }
  42. }
  43. function gourl(){
  44. switch(menucode) {
  45. case "WYKP":
  46. window.location.replace("content/AddInvoice.html");
  47. break; //我要开票
  48. case "WDGS":
  49. window.location.replace("content/company.html?menucode=WDGS");
  50. break; //我的公司
  51. case "WDCW":
  52. window.location.replace("content/finance.html");
  53. break; //我的财务
  54. case "XXCL":
  55. window.location.replace("content/personal.html");
  56. break; //首页
  57. case "FWJL":
  58. window.location.replace("content/invoiceList.html");
  59. break; //服务记录
  60. case "GDLB":
  61. window.location.replace("content/orderList.html");
  62. break; //工单列表
  63. case "GDXQ":
  64. window.location.replace("content/orderDetail.html?id="+id);
  65. break; //工单详情
  66. case "WZDA":
  67. window.location.replace("content/borrowList.html");
  68. break; //物资档案列表
  69. default:
  70. window.location.replace("error.html");
  71. break;
  72. }
  73. }
  74. function gourlStaff() {
  75. switch(menucode) {
  76. case "WYKP":
  77. window.location.replace("content/AddInvoice.html");
  78. break; //我要开票
  79. case "WDGS":
  80. window.location.replace("content/company.html?menucode=WDGS");
  81. break; //我的公司
  82. case "WDCW":
  83. window.location.replace("content/personal.html");
  84. break; //我的财务
  85. case "XXCL":
  86. window.location.replace("content/personal.html");
  87. break; //首页
  88. case "FWJL":
  89. window.location.replace("content/invoiceList.html");
  90. break; //服务记录
  91. case "GDLB":
  92. window.location.replace("content/orderList.html");
  93. break; //工单列表
  94. case "GDXQ":
  95. window.location.replace("content/orderDetail.html?id="+id);
  96. break; //工单详情
  97. case "WZDA":
  98. window.location.replace("content/borrowList.html");
  99. break; //物资档案列表
  100. default:
  101. window.location.replace("error.html");
  102. break;
  103. }
  104. }
  105. </script>
  106. </body>
  107. </html>