orders.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <script type="text/javascript" src="/static/jquery-2.2.4.min.js"></script>
  8. <link rel="stylesheet" href="/static/h5/css/common.css">
  9. <title>订单统计</title>
  10. <style>
  11. html,body,ul {
  12. margin: 0;
  13. padding: 0;
  14. }
  15. html,body {
  16. overflow-y: scroll;
  17. -webkit-overflow-scrolling: touch;
  18. background-color: #F1F1F1;
  19. }
  20. .select-tab {
  21. border-radius:10px;
  22. margin: 10px 10px 0;
  23. background: #fff;
  24. }
  25. .nav {
  26. display: flex;
  27. display: -webkit-flex;
  28. justify-content: center;
  29. -webkit-justify-content: center;
  30. align-items: center;
  31. border:1px solid var(--themeColor);
  32. border-radius:5px;
  33. list-style: none;
  34. }
  35. .nav>li {
  36. width: 100%;
  37. flex: 1;
  38. text-align: center;
  39. display: block;
  40. }
  41. .nav-tabs>li.active>a {
  42. line-height: 2;
  43. font-size: 16px;
  44. color: #fff;
  45. font-weight: 500;
  46. cursor: default;
  47. background-color: var(--themeColor);
  48. }
  49. .nav-tabs>li>a {
  50. line-height: 2;
  51. font-size: 16px;
  52. color: #999999;
  53. font-weight: 500;
  54. }
  55. a {
  56. display: block;
  57. text-decoration: none;
  58. }
  59. .daily-record {
  60. margin: 10px;
  61. border-radius: 10px;
  62. background: #fff;
  63. }
  64. .record-data {
  65. display: flex;
  66. display: -webkit-flex;
  67. justify-content: space-between;
  68. align-items: center;
  69. height: 7vh;
  70. }
  71. .line {
  72. margin: 0 15px;
  73. height: 1px;
  74. background-color: #CCCCCC;
  75. }
  76. .daily-title, .daily-nums {
  77. display: inline;
  78. font-size: 17px;
  79. font-weight: 500;
  80. }
  81. .daily-title {
  82. margin-left: 15px;
  83. }
  84. .daily-nums {
  85. margin-right: 15px;
  86. color:rgba(153,153,153,1);
  87. }
  88. </style>
  89. </head>
  90. <body>
  91. <div class="select-tab">
  92. <ul id="myTab" class="nav nav-tabs">
  93. <li {eq name="type" value="1"}class="active"{/eq}>
  94. <a href="{:url('orders',['type' => 1,'mode'=>$mode,'orgId' => $orgId])}">日订单统计</a>
  95. </li>
  96. <li {eq name="type" value="2"}class="active"{/eq}>
  97. <a href="{:url('orders',['type' => 2,'mode'=>$mode,'orgId' => $orgId])}">月订单统计</a>
  98. </li>
  99. <li {eq name="type" value="3"}class="active"{/eq}>
  100. <a href="{:url('orders',['type' => 3,'mode'=>$mode,'orgId' => $orgId])}">总订单统计</a>
  101. </li>
  102. </ul>
  103. </div>
  104. <div class="daily-record">
  105. <div class="record-data first" onclick="ordersList(this)" data-type="-1" data-mode="{$mode}" data-orgId="{$orgId}" data-day="{$type}">
  106. <span class="daily-title" style="color: #284a94;font-weight: 600;">订单总数</span>
  107. <span class="daily-nums" style="color: #284a94;font-weight: 600;">{$allcount}</span>
  108. </div>
  109. {foreach $list as $k=>$v}
  110. <div class="line"></div>
  111. <div class="record-data" onclick="ordersList(this)" data-type="{$k}" data-mode="{$mode}" data-orgId="{$orgId}" data-day="{$type}">
  112. <span class="daily-title">{$v['type']}</span>
  113. <span class="daily-nums">{$v['cost']}</span>
  114. </div>
  115. {/foreach}
  116. </div>
  117. </body>
  118. </html>
  119. <script>
  120. function ordersList(obj) {
  121. var type = $(obj).attr('data-type');
  122. var org = $(obj).attr('data-orgId');
  123. var day = $(obj).attr('data-day');
  124. var mode = $(obj).attr('data-mode');
  125. var url = "{:url('Statistics/ordersList')}?type="+type+'&orgId='+org+'&day='+day+'&mode='+mode;
  126. window.location.href=url;
  127. }
  128. </script>