Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

232 rindas
11 KiB

  1. <?php
  2. /**
  3. *
  4. * ============================================================================
  5. * * 版权所有 蜘蛛出行 * *
  6. * 网站地址: http://www.zhizhuchuxing.com
  7. * ----------------------------------------------------------------------------
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
  9. * 使用;不允许对程序代码以任何形式任何目的的再发布。
  10. * ============================================================================
  11. * Author By: 张帅
  12. * PhpStorm statistical-from.php
  13. * Create By 2017/1/12 11:39 $
  14. */
  15. use backend\modules\zzcs\assets\ZzcsAsset;
  16. use yii\widgets\Pjax;
  17. ZzcsAsset::addScript($this, '/gathering/js/tool.js');
  18. ZzcsAsset::addCss($this, '/finance/css/bus_cost.css');
  19. ZzcsAsset::addCss($this, '/plug/My97DatePicker/skin/WdatePicker.css');
  20. ZzcsAsset::addScript($this, '/finance/js/bus_work.js?v=002');
  21. ZzcsAsset::addScript($this, '/plug/date-time/date-manage.js?v=001');
  22. ZzcsAsset::addScript($this, '/plug/My97DatePicker/WdatePicker.js');
  23. ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dist/css/bootstrap.css');
  24. ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/style.css');
  25. ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/bootstrap-datetimepicker.css');
  26. ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/docs/assets/css/docs.min.css');
  27. ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/home.css');
  28. ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/prettify.min.css');
  29. ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/module.css');
  30. ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/xcConfirm.css');
  31. ZzcsAsset::addScriptHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/js/bootstrap-datetimepicker.min.js');
  32. ZzcsAsset::addScriptHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/js/module.js');
  33. ZzcsAsset::addScriptHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/js/xcConfirm.js');
  34. ?>
  35. <div class="search_station">
  36. <ul id="search_station">
  37. <li class="search1">
  38. <span>线路类型:</span>
  39. <select id="line_type">
  40. <option value="0">全部</option>
  41. <option value="256">市内</option>
  42. <option value="255">省际</option>
  43. </select>
  44. </li>
  45. <li class="search2">
  46. <span>出发起止日期:</span>
  47. <input type="text" id="start_date" onclick="WdatePicker({onpicked:changeEndDate})" value="<?php echo $start_date; ?>"/>
  48. <span>&nbsp;&nbsp;-&nbsp;&nbsp;</span>
  49. <input type="text" id="end_date" onclick="WdatePicker({onpicked:changeStartDate})" value="<?php echo $end_date; ?>"/>
  50. </li>
  51. <li class="search3">
  52. <span class="btn-primary" id="search_btn" onclick='searchInfo()'>查询</span>
  53. </li>
  54. <li class="search4">
  55. <a id="export_prod_cost"><span class="btn-primary" id="export_btn" onclick='exportInfo()'>导出</span></a>
  56. </li>
  57. </ul>
  58. </div>
  59. <?php Pjax::begin(['id' => 'main_table', 'timeout' => 30000000]) ?>
  60. <div class="table_list">
  61. <table id="table_list" data-time="<?php echo time();?>">
  62. <thead>
  63. <tr>
  64. <th class="td1">编号</th>
  65. <th class="td2">姓名</th>
  66. <th class="td3">订单数</th>
  67. <th class="td6">GMV</th>
  68. <th class="td11">赔入</th>
  69. <th class="td12">赔出</th>
  70. <th class="td7">成本</th>
  71. <th class="td8">GP</th>
  72. <th class="td9">GP率</th>
  73. <th class="td10">订单明细</th>
  74. <!--<th class="td9">人次月环比</th>
  75. <th class="td10">GMV月环比</th>-->
  76. </tr>
  77. </thead>
  78. <tbody>
  79. <!-- 合计 -->
  80. <tr>
  81. <td class="td1" style="color:#0095d9;font-size:larger;">-</td>
  82. <td class="td2" style="color:#0095d9;font-size:larger;">合计</td>
  83. <td class="td3"
  84. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php if (!isset($count['order_num'])) {
  85. $count['order_num'] = 0;
  86. }
  87. echo number_format($count['order_num']); ?></td>
  88. <td class="td6"
  89. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['gmv'], 2); ?></td>
  90. <td class="td11"
  91. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['pay_in'], 2); ?></td>
  92. <td class="td12"
  93. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['pay_out'], 2); ?></td>
  94. <td class="td7"
  95. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['base_price'], 2); ?></td>
  96. <td class="td8"
  97. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['gp'], 2); ?></td>
  98. <td class="td9 <?php
  99. if ($count['gp'] >= 0) {
  100. echo 'red_color';
  101. } else {
  102. echo 'green_color';
  103. } ?>" style="text-align:right;padding-right: 10px;"><?php echo $count['gp_rate']; ?></td>
  104. <td class="td10">-</td>
  105. </tr>
  106. <!-- end 合计 -->
  107. <?php
  108. if (count($list) > 0) {
  109. foreach ($list as $key => $vel) { ?>
  110. <tr>
  111. <td class="td1"><?php echo $vel['no']; ?></td>
  112. <td class="td2"><?php echo $vel['true_name']; ?></td>
  113. <th class="td3"
  114. style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['order_num']); ?></th>
  115. <td class="td6"
  116. style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['gmv'], 2); ?></td>
  117. <td class="td11"
  118. style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['pay_in'], 2); ?> </td>
  119. <td class="td12"
  120. style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['pay_out'], 2); ?> </td>
  121. <td class="td7"
  122. style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['base_price'], 2); ?> </td>
  123. <td class="td8 <?php if ($vel['gp'] >= 0) {
  124. echo 'red_color';
  125. } else {
  126. echo 'green_color';
  127. } ?>" style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['gp'], 2); ?></td>
  128. <td class="td9 <?php if ($vel['gp_rate'] == '-') {
  129. } else if ($vel['gp_rate'] >= 0) {
  130. echo 'red_color';
  131. } else {
  132. echo 'green_color';
  133. } ?>" style="text-align:right;padding-right: 10px;"><?php echo $vel['gp_rate']; ?></td>
  134. <td class="td10"><a href="javascript:void(0);" onclick="window.open('<?php echo $vel['url']?>','_blank');" >下载</a></td>
  135. </tr>
  136. <?php }
  137. } ?>
  138. <!-- 合计 -->
  139. <tr>
  140. <td class="td1" style="color:#0095d9;font-size:larger;">-</td>
  141. <td class="td2" style="color:#0095d9;font-size:larger;">合计</td>
  142. <td class="td3"
  143. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php if (!isset($count['order_num'])) {
  144. $count['order_num'] = 0;
  145. }
  146. echo number_format($count['order_num']); ?></td>
  147. <td class="td6"
  148. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['gmv'], 2); ?></td>
  149. <td class="td11"
  150. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['pay_in'], 2); ?></td>
  151. <td class="td12"
  152. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['pay_out'], 2); ?></td>
  153. <td class="td7"
  154. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['base_price'], 2); ?></td>
  155. <td class="td8"
  156. style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($count['gp'], 2); ?></td>
  157. <td class="td9 <?php
  158. if ($count['gp'] >= 0) {
  159. echo 'red_color';
  160. } else {
  161. echo 'green_color';
  162. } ?>" style="text-align:right;padding-right: 10px;"><?php echo $count['gp_rate']; ?></td>
  163. <td class="td10">-</td>
  164. </tr>
  165. <!-- end 合计 -->
  166. </tbody>
  167. </table>
  168. </div>
  169. <!--页码信息-->
  170. <div id="page_size_d" total_row="<?php echo $page['total_row']; ?>" total_page="<?php echo $page['total_page']; ?>">
  171. <span class="page_size">每页条数</span>
  172. <select id="page_size" onchange="changePageSize(this)">
  173. <?php foreach ($page_size_arr as $key => $vel) {
  174. if ($vel == $page['page_size']) {
  175. echo '<option value="' . $vel . '" selected=selected>' . $vel . '</option>';
  176. } else {
  177. echo '<option value="' . $vel . '">' . $vel . '</option>';
  178. }
  179. } ?>
  180. </select>
  181. </div>
  182. <div id="page_list">
  183. <?php
  184. if (count($page_arr) > 0) {
  185. foreach ($page_arr as $key => $vel) {
  186. if ($page['current_page'] == 1 && ($vel == '首页' || $vel == '<上一页')) {
  187. $class = 'not_click';
  188. } elseif ($page['current_page'] == $vel) {
  189. $class = 'click';
  190. } elseif ($page['current_page'] == $page['total_page'] && ($vel == '末页' || $vel == '下一页>')) {
  191. $class = 'not_click';
  192. } elseif ($vel == '...') {
  193. $class = 'not_click';
  194. } else {
  195. $class = 'clickable';
  196. }
  197. if ($vel != '首页' && $vel != '<上一页' && $vel != '下一页>' && $vel != '末页') {
  198. $class = 'page_num ' . $class;
  199. }
  200. if ($class == 'clickable' || $class == 'page_num clickable') {
  201. echo '<span class="' . $class . '" onclick="pageSearchInfo(this,' . $page['total_page'] . ')">' . $vel . '</span>';
  202. } else {
  203. echo '<span class="' . $class . '">' . $vel . '</span>';
  204. }
  205. }
  206. }
  207. ?>
  208. <span class="total_row">共<?php echo $page['total_row']; ?>条</span>
  209. </div>
  210. <?php Pjax::end() ?>