|
- <?php
- /**
- *
- * ============================================================================
- * * 版权所有 蜘蛛出行 * *
- * 网站地址: http://www.zhizhuchuxing.com
- * ----------------------------------------------------------------------------
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
- * 使用;不允许对程序代码以任何形式任何目的的再发布。
- * ============================================================================
- * Author By: luocj
- * PhpStorm hotelSales.php
- * Create By 2016/12/20 9:55 $
- */
- //\backend\modules\hotel\assets\hotelAsset::addScript($this, '../assets/js/htCommon.js');
-
-
- ?>
-
- <div class="portlet-body flip-scroll">
- <?php
- if (isset($data['total'])) {
- ?>
- <table class="table table-bordered table-striped table-condensed flip-content"
- >
- <thead class="flip-content">
- <tr>
- <th>序号</th>
- <th>姓名</th>
- <th class="numeric">订单数</th>
- <th class="numeric">间夜数</th>
- <th class="numeric">间夜数月环比</th>
- <th class="numeric">销售额</th>
- <th class="numeric">销售额月环比</th>
- <th class="numeric">采购成本</th>
- <th class="numeric">渠道佣金</th>
- <th class="numeric">赔入</th>
- <th class="numeric">赔出</th>
- <th class="numeric">毛利</th>
- <th class="numeric">毛利月环比</th>
- <th class="numeric">毛利率</th>
- </tr>
- </thead>
- <tbody>
- <tr style="font-weight: bold;">
- <td>-</td>
- <td>总计</td>
- <td class="numeric">
- <?php
- if($searchModel['op'] == 'cusServiceSend')
- {
- ?>
- <a target="_blank" onclick="open_new_path(this)" go_path="<?= Yii::$app->urlManager->createUrl(['hotel/report/hotel-sales-room',
- 'op' => $searchModel['op'], 'hotel_id' => $searchModel['hotel_id'], 'start_date' => $searchModel['start_date'],
- 'org_sale_id' => $searchModel['org_sale_id'], 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']
- ]) ?>"><?php echo empty($data['total']['total_order_num']) ? 0 : $data['total']['total_order_num'] ?></a>
- <?php
- }else
- {
- ?>
- <a target="_blank" onclick="open_new_path(this)" go_path="<?= Yii::$app->urlManager->createUrl(['hotel/report/hotel-sales-room',
- 'hotel_id' => $searchModel['hotel_id'], 'start_date' => $searchModel['start_date'], 'org_sale_id' => $searchModel['org_sale_id']
- , 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']
- ]) ?>"><?php echo empty($data['total']['total_order_num']) ? 0 : $data['total']['total_order_num'] ?></a>
- <?php
- }
- ?>
- </td>
- <td class="numeric" style="text-align: right"><?php echo empty($data['total']['total_room_num']) ? 0 :$data['total']['total_room_num'] ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_mom_room_count'] ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_order_price'] === '-' ? '-' : number_format($data['total']['total_order_price'], 2); ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_mom_order_price']; ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_base_price'] === '-' ? '-' : number_format($data['total']['total_base_price'], 2); ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_commission_total'] === '-' ? '-' : number_format($data['total']['total_commission_total'], 2); ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_compensate_in'] === '-' ? '-' : number_format($data['total']['total_compensate_in'], 2); ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_compensate_out'] === '-' ? '-' : number_format($data['total']['total_compensate_out'], 2); ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_order_profit'] === '-' ? '-' : number_format($data['total']['total_order_profit'], 2); ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_mom_profit_value']; ?></td>
- <td class="numeric" style="text-align: right"><?php echo $data['total']['total_price_rate']; ?></td>
- </tr>
- <?php
- foreach ($data['order_info'] as $k => $v) { ?>
- <tr>
- <td><?php echo $k + 1 ?></td>
- <!-- 客服跟单页面判断-->
- <?php if ($searchModel['op'] == 'cusService') { ?>
- <td><?php echo $v['INPUT_CREATE_USER'] ?></td>
- <td class="numeric">
- <a target="_blank" onclick="open_new_path(this)" go_path="<?= Yii::$app->urlManager->createUrl(['hotel/report/hotel-sales-room', 'op' => 'cusService', 'hotel_id' => $searchModel['hotel_id'],
- 'org_sale_id' => $searchModel['org_sale_id'], 'start_date' => $searchModel['start_date'], 'user_id' => $v['CREATE_USER_ID']
- , 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']]) ?>"><?php echo $v['order_count'] ?></a></td>
- <!-- 客服发单页面判断 yuwei-->
- <?php } else if ($searchModel['op'] == 'cusServiceSend') { ?>
- <td><?php echo $v['SEND_CREATE_USER'] ?></td>
- <td class="numeric">
- <a target="_blank" onclick="open_new_path(this)" go_path="<?= Yii::$app->urlManager->createUrl(['hotel/report/hotel-sales-room', 'op' => 'cusServiceSend', 'hotel_id' => $searchModel['hotel_id'],
- 'org_sale_id' => $searchModel['org_sale_id'], 'start_date' => $searchModel['start_date'], 'send_user_id' => $v['SEND_USER_ID'],
- 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']]) ?>"><?php echo $v['order_count'] ?></a></td>
-
- <?php } else if ($searchModel['op'] == 'purchaser') { ?>
- <!-- 采购业绩页面判断-->
- <td><?php echo $v['PURCHASE_TRUE_NAME'] ?></td>
- <td class="numeric">
- <a target="_blank" onclick="open_new_path(this)" go_path="<?= Yii::$app->urlManager->createUrl(['hotel/report/hotel-sales-room', 'op' => 'purchaser', 'hotel_id' => $searchModel['hotel_id'],
- 'org_sale_id' => $searchModel['org_sale_id'], 'start_date' => $searchModel['start_date'], 'purchaser_id' => $v['SALES_MAN']
- , 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']]) ?>"><?php echo $v['order_count'] ?></a></td>
- <?php } else if ($searchModel['op'] == 'principal') { ?>
- <!-- 运营业绩页面判断-->
- <td><?php echo $v['PRINCIPAL_TRUE_NAME'] ?></td>
- <td class="numeric">
- <a target="_blank" onclick="open_new_path(this)" go_path="<?= Yii::$app->urlManager->createUrl(['hotel/report/hotel-sales-room', 'op' => 'principal', 'hotel_id' => $searchModel['hotel_id'],
- 'org_sale_id' => $searchModel['org_sale_id'], 'start_date' => $searchModel['start_date'], 'principal_id' => $v['PRINCIPAL_ID']
- , 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']]) ?>"><?php echo $v['order_count'] ?></a></td>
- <?php } else { ?>
- <!-- 非客服跟单,采购页面判断-->
- <td>
- <a href="#"
- class="nav-link"><?php echo $v['hotel_name'] ?></a></td>
- <td class="numeric">
- <a href="#"><?php echo $v['order_count'] ?></a></td>
- <?php } ?>
-
- <td class="numeric" style="text-align: right;"><?php echo $v['room_count'] ?></td>
- <td class="numeric" style="text-align: right;"><?php echo is_null($v['room_count_mom']) ? '-' :$v['room_count_mom'] ?></td>
- <td class="numeric" style="text-align: right;"><?php echo $v['ORDER_PRICE'] === '-' ? '-' : number_format($v['ORDER_PRICE'], 2); ?></td>
- <td class="numeric" style="text-align: right;"><?php echo is_null($v['order_price_mom']) ? '-' : $v['order_price_mom'] ?></td>
- <td class="numeric" style="text-align: right;"><?php echo $v['BASE_PRICE'] === '-' ? '-' : number_format($v['BASE_PRICE'], 2); ?></td>
- <td class="numeric" style="text-align: right;"><?php echo $v['TOTAL_COMMISSION'] === '-' ? '-' : number_format($v['TOTAL_COMMISSION'], 2); ?></td>
- <td class="numeric" style="text-align: right;"><?php echo $v['compensate_in'] === '-' ? '-' : number_format($v['compensate_in'], 2); ?></td>
- <td class="numeric" style="text-align: right;"><?php echo $v['compensate_out'] === '-' ? '-' : number_format($v['compensate_out'], 2); ?></td>
- <td class="numeric" style="text-align: right;"><?php echo $v['PROFIT_VALUE'] === '-' ? '-' : number_format($v['PROFIT_VALUE'], 2); ?></td>
- <td class="numeric" style="text-align: right;"><?php echo is_null($v['profit_value_mom']) ? '-' :$v['profit_value_mom'] ?></td>
- <td class="numeric" style="text-align: right;"><?php echo is_null($v['price_rate']) ? '-' : $v['price_rate'] ?></td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- <?php
- } else {
- echo '暂无数据';
- }
- ?>
-
- </div>
|