dashboard.htm 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. ##tlayout("admin/layout.htm"){
  2. <div class="breadcrumbs">
  3. <div class="breadcrumbs_title">数据统计</div>
  4. </div>
  5. <div class="page-content">
  6. <div class="row">
  7. <div class="col-xs-12" style="width: 1000px;margin: 25px 0px;">
  8. <div class="row">
  9. <div class="col-xs-6 col-sm-3 pricing-box">
  10. <div class="widget-box">
  11. <div class="widget-header header-color-blue">
  12. <h5 class="bigger lighter">一周订单</h5>
  13. </div>
  14. <div class="widget-body">
  15. <div class="widget-main">
  16. <ul class="list-unstyled spaced2">
  17. <li><i class="icon-ok green"></i><a href="/admin/orders?status=1&startT=${weekStart!}&endT=${weekEnd!}">待发货:${week_daifahuo!0}</a></li>
  18. <li><i class="icon-ok green"></i><a href="/admin/orders?status=2&startT=${weekStart!}&endT=${weekEnd!}">已发货:${week_yifahuo!0}</a></li>
  19. <li><i class="icon-ok green"></i><a href="/admin/orders?status=8&startT=${weekStart!}&endT=${weekEnd!}">已收货:${week_yishouhuo!0}</a></li>
  20. <li><i class="icon-ok green"></i><a href="/admin/orders?status=3&startT=${weekStart!}&endT=${weekEnd!}">已完成:${week_yiwancheng!0}</a></li>
  21. <li><i class="icon-ok green"></i><a href="/admin/orders?startT=${weekStart!}&endT=${weekEnd!}">订单总量:${week_zongliang!0}</a></li>
  22. </ul>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. <div class="col-xs-6 col-sm-3 pricing-box">
  28. <div class="widget-box">
  29. <div class="widget-header header-color-green">
  30. <h5 class="bigger lighter">一月订单</h5>
  31. </div>
  32. <div class="widget-body">
  33. <div class="widget-main">
  34. <ul class="list-unstyled spaced2">
  35. <li><i class="icon-ok green"></i><a href="/admin/orders?status=1&startT=${monthStart!}&endT=${monthEnd!}">待发货:${month_daifahuo!0}</a></li>
  36. <li><i class="icon-ok green"></i><a href="/admin/orders?status=2&startT=${monthStart!}&endT=${monthEnd!}">已发货:${month_yifahuo!0}</a></li>
  37. <li><i class="icon-ok green"></i><a href="/admin/orders?status=8&startT=${monthStart!}&endT=${monthEnd!}">已收货:${month_yishouhuo!0}</a></li>
  38. <li><i class="icon-ok green"></i><a href="/admin/orders?status=3&startT=${monthStart!}&endT=${monthEnd!}">已完成:${month_yiwancheng!0}</a></li>
  39. <li><i class="icon-ok green"></i><a href="/admin/orders?startT=${monthStart!}&endT=${monthEnd!}">订单总量:${month_zongliang!0}</a></li>
  40. </ul>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="col-xs-6 col-sm-3 pricing-box">
  46. <div class="widget-box">
  47. <div class="widget-header header-color-dark">
  48. <h5 class="bigger lighter">总订单</h5>
  49. </div>
  50. <div class="widget-body">
  51. <div class="widget-main">
  52. <ul class="list-unstyled spaced2">
  53. <li><i class="icon-ok green"></i><a href="/admin/orders?status=1">待发货:${zong_daifahuo!0}</a></li>
  54. <li><i class="icon-ok green"></i><a href="/admin/orders?status=2">已发货:${zong_yifahuo!0}</a></li>
  55. <li><i class="icon-ok green"></i><a href="/admin/orders?status=8">已收货:${zong_yishouhuo!0}</a></li>
  56. <li><i class="icon-ok green"></i><a href="/admin/orders?status=3">已完成:${zong_yiwancheng!0}</a></li>
  57. <li><i class="icon-ok green"></i><a href="/admin/orders">订单总量:${zong_zongliang!0}</a></li>
  58. </ul>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="col-xs-12" id="orders" style="width: 100%;height:400px;margin-top: 25px;"></div>
  66. <div class="col-xs-12" id="account" style="width: 100%;height:400px;margin-top: 25px;"></div>
  67. </div>
  68. </div>
  69. <script src="/admin/script/echarts.min.js"></script>
  70. <script>
  71. var orders_chart = echarts.init(document.getElementById('orders'));
  72. var orders_option = {
  73. title: {
  74. text: '月订单量走势图'
  75. },
  76. tooltip: {
  77. trigger: 'axis'
  78. },
  79. grid: {
  80. left: '3%',
  81. right: '4%',
  82. bottom: '3%',
  83. containLabel: true
  84. },
  85. xAxis: {
  86. type: 'category',
  87. boundaryGap: false,
  88. data: [
  89. ##for(_item in orders_list!){
  90. ##if(_itemLP.index!=orders_list.~size){
  91. '${_item.create_date!}',
  92. ##}else{
  93. '${_item.create_date!}'
  94. ##}
  95. ##}
  96. ]
  97. },
  98. yAxis: {
  99. type: 'value'
  100. },
  101. series: [
  102. {
  103. name:'订单量',
  104. type:'line',
  105. data:[
  106. ##for(_item in orders_list!){
  107. ##if(_itemLP.index!=orders_list.~size){
  108. ${_item.zongliang!},
  109. ##}else{
  110. ${_item.zongliang!}
  111. ##}
  112. ##}
  113. ]
  114. }
  115. ]
  116. };
  117. orders_chart.setOption(orders_option);
  118. var account_chart = echarts.init(document.getElementById('account'));
  119. var account_option = {
  120. title: {
  121. text: '月交易额走势图'
  122. },
  123. tooltip: {
  124. trigger: 'axis'
  125. },
  126. grid: {
  127. left: '3%',
  128. right: '4%',
  129. bottom: '3%',
  130. containLabel: true
  131. },
  132. xAxis: {
  133. type: 'category',
  134. boundaryGap: false,
  135. data: [
  136. ##for(_item in orders_list!){
  137. ##if(_itemLP.index!=orders_list.~size){
  138. '${_item.create_date!}',
  139. ##}else{
  140. '${_item.create_date!}'
  141. ##}
  142. ##}
  143. ]
  144. },
  145. yAxis: {
  146. type: 'value'
  147. },
  148. series: [
  149. {
  150. name:'交易额',
  151. type:'line',
  152. data:[
  153. ##for(_item in orders_list!){
  154. ##if(_itemLP.index!=orders_list.~size){
  155. ${_item.account!},
  156. ##}else{
  157. ${_item.account!}
  158. ##}
  159. ##}
  160. ]
  161. }
  162. ]
  163. };
  164. account_chart.setOption(account_option);
  165. </script>
  166. ##}