三元财务UI

index.html 3.3KB

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