|
- <?php
- /**
- *
- * ============================================================================
- * * 版权所有 蜘蛛出行 * *
- * 网站地址: http://www.zhizhuchuxing.com
- * ----------------------------------------------------------------------------
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
- * 使用;不允许对程序代码以任何形式任何目的的再发布。
- * ============================================================================
- * Author By: 张帅
- * PhpStorm statistical-from.php
- * Create By 2017/1/12 11:39 $
- */
-
- use backend\modules\zzcs\assets\ZzcsAsset;
- use yii\widgets\Pjax;
- ZzcsAsset::addScript($this, '/gathering/js/tool.js');
- ZzcsAsset::addCss($this, '/finance/css/bus_cost.css');
- ZzcsAsset::addCss($this, '/plug/My97DatePicker/skin/WdatePicker.css');
- ZzcsAsset::addScript($this, '/finance/js/bus_cost.js?v=001');
- ZzcsAsset::addScript($this, '/plug/date-time/date-manage.js?v=001');
- ZzcsAsset::addScript($this, '/plug/My97DatePicker/WdatePicker.js');
-
- ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dist/css/bootstrap.css');
- ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/style.css');
- ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/bootstrap-datetimepicker.css');
- ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/docs/assets/css/docs.min.css');
- ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/home.css');
- ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/prettify.min.css');
- ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/module.css');
- ZzcsAsset::addCssHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/css/xcConfirm.css');
-
- ZzcsAsset::addScriptHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/js/bootstrap-datetimepicker.min.js');
- ZzcsAsset::addScriptHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/js/module.js');
- ZzcsAsset::addScriptHTTP($this,'http://img.zhizhuchuxing.cn/zzframe/dists/js/xcConfirm.js');
- ?>
-
- <div class="search_station">
- <ul id="search_station">
- <li class="search1">
- <span>查询维度:</span>
- <select class="dimensionality" onchange="showChannel(this)">
- <?php foreach ($dimensionality as $key => $vel) { ?>
- <option value="<?php echo $key; ?>"><?php echo $vel; ?></option>
- <?php } ?>
- </select>
- </li>
-
- <!--<li class="search1" style="display: none">
- <span>口径:</span>
- <select class="dimensionality2">
- <option value="2">出行日期</option>
- <option value="1">预定日期</option>
- </select>
- </li>-->
- <li class="search1">
- <span>线路类型:</span>
- <select class="dimensionality2">
- <option value="0">全部</option>
- <option value="1">市内</option>
- <option value="2">省际</option>
- </select>
- </li>
-
- <li class="search2">
- <span>出发起止日期:</span>
- <input type="text" id="start_date" onclick="WdatePicker({onpicked:changeEndDate})" value="<?php echo $start_date; ?>"/>
- <span> - </span>
- <input type="text" id="end_date" onclick="WdatePicker({onpicked:changeStartDate})" value="<?php echo $end_date; ?>"/>
- </li>
- <li class="search6">
- <span>线路代码:</span>
- <input type="text" id="line_code" size="10" />
- </li>
- <li class="search6">
- <span>发车时间:</span>
- <div id="time_id_1_1" class="timepicker_box">
- <span class="form-inline timepicker">
- <input type="text" class="form-control bus_start_time" readonly>
- <span class="glyphicon glyphicon-time"></span>
- </span>
- <div class="timepicker_select">
- <div class="select_hour_box"></div>
- <div class="select_minute_box"></div>
- </div>
- </div>
- </li>
- <li class="search3">
- <span class="btn-primary" id="search_btn" onclick='searchInfo()'>查询</span>
- </li>
- <li class="search4">
- <span class="btn-primary" id="export_btn" onclick='exportInfo()'>导出</span>
- </li>
- </ul>
- </div>
- <?php Pjax::begin(['id' => 'main_table', 'timeout' => 30000000]) ?>
- 上座率颜色说明:<span class="green_color" style="font-size: 20px;">■</span> ~ 30% <span class="yellow_color"
- style="font-size: 20px;">■</span> 30% ~ 70%
- <span class="red_color" style="font-size: 20px;">■</span> 70% ~<br/>
- <div class="table_list">
- <table id="table_list" data-time="<?php echo time();?>">
- <thead>
- <tr>
- <th class="td1">编号</th>
- <th class="td2"><?php echo $statistical_type; ?></th>
- <th class="td3">订单数</th>
- <th class="td4">人次</th>
- <th class="td5">上座率</th>
- <th class="td6">GMV</th>
- <th class="td11">赔入</th>
- <th class="td12">赔出</th>
- <th class="td7">成本</th>
- <th class="td8">GP</th>
- <th class="td9">GP率</th>
- <th class="td10">订单明细</th>
- <!--<th class="td9">人次月环比</th>
- <th class="td10">GMV月环比</th>-->
- </tr>
- </thead>
- <tbody>
- <!-- 合计 -->
- <tr>
- <td class="td1" style="color:#0095d9;font-size:larger;">-</td>
- <td class="td2" style="color:#0095d9;font-size:larger;">合计</td>
- <td class="td3"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php if (!isset($final_amount['order_num'])) {
- $final_amount['order_num'] = 0;
- }
- echo number_format($final_amount['order_num']); ?></td>
- <td class="td4"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php if (!isset($final_amount['people_num'])) {
- $final_amount['people_num'] = 0;
- }
- echo number_format($final_amount['people_num']); ?></td>
- <td class="td5"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php if ($search_dimensionality == 2 || $search_dimensionality == 3 || $final_amount['total_saled_count'] == 0) {
- echo "-";
- } else {
- $disp_percent = ($final_amount['total_saled_count'] == 0) ? 0 : $final_amount['total_saled_count'] / $final_amount['total_seat_count'] * 100;
- echo number_format($disp_percent, 2) . "%";
- } ?></td>
- <td class="td6"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['total_price'], 2); ?></td>
- <td class="td11"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['total_peiru'], 2); ?></td>
- <td class="td12"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['total_peichu'], 2); ?></td>
- <td class="td7"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['cost'], 2); ?></td>
- <td class="td8"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['gp'], 2); ?></td>
- <td class="td9 <?php
- if ($final_amount['gp'] >= 0) {
- echo 'red_color';
- } else {
- echo 'green_color';
- } ?>" style="text-align:right;padding-right: 10px;"><?php echo $final_amount['gp_rate']; ?></td>
- <td class="td10">-</td>
-
- </tr>
- <!-- end 合计 -->
- <?php
- if (count($rows) > 0) {
- foreach ($rows as $key => $vel) { ?>
- <tr>
- <td class="td1"><?php echo $vel['no']; ?></td>
- <td class="td2"><?php echo $vel['type_data']; ?></td>
- <th class="td3"
- style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['order_num']); ?></th>
- <td class="td4"
- style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['people_num']); ?></td>
- <td class="td5" style="text-align:right;padding-right: 10px;">
- <?php if ($search_dimensionality == 2 || $search_dimensionality == 3 || $vel['total_saled_count'] == 0) {
- echo "-";
- } else {
- $disp_percent = ($vel['total_saled_count'] == 0) ? 0 : $vel['total_saled_count'] / $vel['total_seat_count'] * 100;
- $disp_color = "red_color";
- if ($disp_percent < 30) {
- $disp_color = "green_color";
- } else if ($disp_percent < 70) {
- $disp_color = "yellow_color";
- }
- echo '<span class="' . $disp_color . '">' . number_format($disp_percent, 2) . "%</span>";
- }
- ?>
- </td>
- <td class="td6"
- style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['total_price'], 2); ?></td>
- <td class="td11"
- style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['peiru'], 2); ?> </td>
- <td class="td12"
- style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['peichu'], 2); ?> </td>
- <td class="td7"
- style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['cost'], 2); ?> </td>
- <td class="td8 <?php if ($vel['gp'] >= 0) {
- echo 'red_color';
- } else {
- echo 'green_color';
- } ?>" style="text-align:right;padding-right: 10px;"><?php echo number_format($vel['gp'], 2); ?></td>
- <td class="td9 <?php if ($vel['gp_rate'] == '-') {
-
- } else if ($vel['gp_rate'] >= 0) {
- echo 'red_color';
- } else {
- echo 'green_color';
- } ?>" style="text-align:right;padding-right: 10px;"><?php echo $vel['gp_rate']; ?></td>
- <td class="td10"><a target="_blank" href="<?php echo $vel['url'] ?>">下载</a></td>
-
- </tr>
- <?php }
- } ?>
- <!--空车成本(渠道维度显示)-->
- <?php if ($empty_bus_cost) { ?>
- <tr>
- <td class="td1" style="color:#FF5722;font-size:larger;">-</td>
- <td class="td2" style="color:#FF5722;font-size:larger;">空车成本</td>
- <td class="td3"
- style="color:#FF5722;font-size:larger;text-align:right;padding-right: 10px;"><?php if (!isset($empty_bus_cost['order_num'])) {
- $empty_bus_cost['order_num'] = 0;
- }
- echo number_format($empty_bus_cost['order_num']); ?></td>
- <td class="td4"
- style="color:#FF5722;font-size:larger;text-align:right;padding-right: 10px;"><?php if (!isset($empty_bus_cost['people_num'])) {
- $empty_bus_cost['people_num'] = 0;
- }
- echo number_format($empty_bus_cost['people_num']); ?></td>
- <td class="td5"
- style="color:#FF5722;font-size:larger;text-align:right;padding-right: 10px;"><?php echo "0%"; ?></td>
- <td class="td6"
- style="color:#FF5722;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($empty_bus_cost['total_price'], 2); ?></td>
- <td class="td11"
- style="color:#FF5722;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format(0, 2); ?></td>
- <td class="td12"
- style="color:#FF5722;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format(0, 2); ?></td>
- <td class="td7"
- style="color:#FF5722;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($empty_bus_cost['cost'], 2); ?></td>
- <td class="td8"
- style="color:#FF5722;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($empty_bus_cost['gp'], 2); ?></td>
- <td class="td9 <?php
- if ($empty_bus_cost['gp'] >= 0) {
- echo 'red_color';
- } else {
- echo 'green_color';
- } ?>" style="text-align:right;padding-right: 10px;"><?php echo $empty_bus_cost['gp_rate']; ?></td>
- <td class="td10">-</td>
- </tr>
- <?php } ?>
- <!-- end 空车成本(渠道维度显示)-->
- <!-- 合计 -->
- <tr>
- <td class="td1" style="color:#0095d9;font-size:larger;">-</td>
- <td class="td2" style="color:#0095d9;font-size:larger;">合计</td>
- <td class="td3"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php if (!isset($final_amount['order_num'])) {
- $final_amount['order_num'] = 0;
- }
- echo number_format($final_amount['order_num']); ?></td>
- <td class="td4"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php if (!isset($final_amount['people_num'])) {
- $final_amount['people_num'] = 0;
- }
- echo number_format($final_amount['people_num']); ?></td>
- <td class="td5"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php if ($search_dimensionality == 2 || $search_dimensionality == 3 || $final_amount['total_saled_count'] == 0) {
- echo "-";
- } else {
- $disp_percent = ($final_amount['total_saled_count'] == 0) ? 0 : $final_amount['total_saled_count'] / $final_amount['total_seat_count'] * 100;
- echo number_format($disp_percent, 2) . "%";
- } ?></td>
- <td class="td6"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['total_price'], 2); ?></td>
- <td class="td11"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['total_peiru'], 2); ?></td>
- <td class="td12"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['total_peichu'], 2); ?></td>
- <td class="td7"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['cost'], 2); ?></td>
- <td class="td8"
- style="color:#0095d9;font-size:larger;text-align:right;padding-right: 10px;"><?php echo number_format($final_amount['gp'], 2); ?></td>
- <td class="td9 <?php
- if ($final_amount['gp'] >= 0) {
- echo 'red_color';
- } else {
- echo 'green_color';
- } ?>" style="text-align:right;padding-right: 10px;"><?php echo $final_amount['gp_rate']; ?></td>
- <td class="td10">-</td>
- </tr>
- <!-- end 合计 -->
-
- </tbody>
- </table>
- </div>
-
-
- <!--页码信息-->
- <div id="page_size_d" total_row="<?php echo $page['total_row']; ?>" total_page="<?php echo $page['total_page']; ?>">
- <span class="page_size">每页条数</span>
- <select id="page_size" onchange="changePageSize(this)">
- <?php foreach ($page_size_arr as $key => $vel) {
- if ($vel == $page_size) {
- echo '<option value="' . $vel . '" selected=selected>' . $vel . '</option>';
- } else {
- echo '<option value="' . $vel . '">' . $vel . '</option>';
- }
- } ?>
- </select>
- </div>
- <div id="page_list">
- <?php
- if (count($page_arr) > 0) {
- foreach ($page_arr as $key => $vel) {
- if ($page['current_page'] == 1 && ($vel == '首页' || $vel == '<上一页')) {
- $class = 'not_click';
- } elseif ($page['current_page'] == $vel) {
- $class = 'click';
- } elseif ($page['current_page'] == $page['total_page'] && ($vel == '末页' || $vel == '下一页>')) {
- $class = 'not_click';
- } elseif ($vel == '...') {
- $class = 'not_click';
- } else {
- $class = 'clickable';
- }
- if ($vel != '首页' && $vel != '<上一页' && $vel != '下一页>' && $vel != '末页') {
- $class = 'page_num ' . $class;
- }
- if ($class == 'clickable' || $class == 'page_num clickable') {
- echo '<span class="' . $class . '" onclick="pageSearchInfo(this,' . $page['total_page'] . ')">' . $vel . '</span>';
- } else {
- echo '<span class="' . $class . '">' . $vel . '</span>';
- }
- }
- }
- ?>
- <span class="total_row">共<?php echo $page['total_row']; ?>条</span>
- </div>
-
- <?php Pjax::end() ?>
-
- <!-- 模态框(Modal) -->
- <div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
- style="z-index: 1050!important;"
- aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 class="modal-title" id="myModalLabel">渠道选择</h4>
- </div>
- <div class="modal-body" style="padding-bottom:70px;">
- <span style="font-size: larger">已选择:</span>
- <span class="btn btn-primary btn-xs" style="margin: 3px" id="clear">重置</span>
- <div id="all" style="min-height: 70px;border-bottom: solid 1px lightgrey;">
-
- </div>
- <?php $channel_list = \backend\modules\zzcs\logic\Finance::getChannelList();
- if ($channel_list != '') {
- foreach ($channel_list as $k => $v) {
- echo "<div style='display: inline-block;width: 200px;margin-top: 10px'>
- <button class='btn btn-default btn-xs btn-data' id='button{$v['id']}' style='width: 180px;overflow: hidden' onclick='add(this)' data-id='{$v['id']}'>{$v['supplier_name']}</button>
- </div>";
- }
- }
- ?>
- </div>
- <div class="modal-footer navbar-fixed-bottom" >
- <button type="button" class="btn btn-default" data-dismiss="modal" id="close">关闭
- </button>
- <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="save()">保存</button>
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal -->
- </div>
-
-
-
-
-
-
|