orders.html 4.0 KB

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