Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

144 linhas
10 KiB

  1. <?php
  2. /**
  3. *
  4. * ============================================================================
  5. * * 版权所有 蜘蛛出行 * *
  6. * 网站地址: http://www.zhizhuchuxing.com
  7. * ----------------------------------------------------------------------------
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
  9. * 使用;不允许对程序代码以任何形式任何目的的再发布。
  10. * ============================================================================
  11. * Author By: luocj
  12. * PhpStorm hotelSales.php
  13. * Create By 2016/12/20 9:55 $
  14. */
  15. //\backend\modules\hotel\assets\hotelAsset::addScript($this, '../assets/js/htCommon.js');
  16. ?>
  17. <div class="portlet-body flip-scroll">
  18. <?php
  19. if (isset($data['total'])) {
  20. ?>
  21. <table class="table table-bordered table-striped table-condensed flip-content"
  22. >
  23. <thead class="flip-content">
  24. <tr>
  25. <th>序号</th>
  26. <th>姓名</th>
  27. <th class="numeric">订单数</th>
  28. <th class="numeric">间夜数</th>
  29. <th class="numeric">间夜数月环比</th>
  30. <th class="numeric">销售额</th>
  31. <th class="numeric">销售额月环比</th>
  32. <th class="numeric">采购成本</th>
  33. <th class="numeric">渠道佣金</th>
  34. <th class="numeric">赔入</th>
  35. <th class="numeric">赔出</th>
  36. <th class="numeric">毛利</th>
  37. <th class="numeric">毛利月环比</th>
  38. <th class="numeric">毛利率</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. <tr style="font-weight: bold;">
  43. <td>-</td>
  44. <td>总计</td>
  45. <td class="numeric">
  46. <?php
  47. if($searchModel['op'] == 'cusServiceSend')
  48. {
  49. ?>
  50. <a target="_blank" onclick="open_new_path(this)" go_path="<?= Yii::$app->urlManager->createUrl(['hotel/report/hotel-sales-room',
  51. 'op' => $searchModel['op'], 'hotel_id' => $searchModel['hotel_id'], 'start_date' => $searchModel['start_date'],
  52. 'org_sale_id' => $searchModel['org_sale_id'], 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']
  53. ]) ?>"><?php echo empty($data['total']['total_order_num']) ? 0 : $data['total']['total_order_num'] ?></a>
  54. <?php
  55. }else
  56. {
  57. ?>
  58. <a target="_blank" onclick="open_new_path(this)" go_path="<?= Yii::$app->urlManager->createUrl(['hotel/report/hotel-sales-room',
  59. 'hotel_id' => $searchModel['hotel_id'], 'start_date' => $searchModel['start_date'], 'org_sale_id' => $searchModel['org_sale_id']
  60. , 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']
  61. ]) ?>"><?php echo empty($data['total']['total_order_num']) ? 0 : $data['total']['total_order_num'] ?></a>
  62. <?php
  63. }
  64. ?>
  65. </td>
  66. <td class="numeric" style="text-align: right"><?php echo empty($data['total']['total_room_num']) ? 0 :$data['total']['total_room_num'] ?></td>
  67. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_mom_room_count'] ?></td>
  68. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_order_price'] === '-' ? '-' : number_format($data['total']['total_order_price'], 2); ?></td>
  69. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_mom_order_price']; ?></td>
  70. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_base_price'] === '-' ? '-' : number_format($data['total']['total_base_price'], 2); ?></td>
  71. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_commission_total'] === '-' ? '-' : number_format($data['total']['total_commission_total'], 2); ?></td>
  72. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_compensate_in'] === '-' ? '-' : number_format($data['total']['total_compensate_in'], 2); ?></td>
  73. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_compensate_out'] === '-' ? '-' : number_format($data['total']['total_compensate_out'], 2); ?></td>
  74. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_order_profit'] === '-' ? '-' : number_format($data['total']['total_order_profit'], 2); ?></td>
  75. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_mom_profit_value']; ?></td>
  76. <td class="numeric" style="text-align: right"><?php echo $data['total']['total_price_rate']; ?></td>
  77. </tr>
  78. <?php
  79. foreach ($data['order_info'] as $k => $v) { ?>
  80. <tr>
  81. <td><?php echo $k + 1 ?></td>
  82. <!-- 客服跟单页面判断-->
  83. <?php if ($searchModel['op'] == 'cusService') { ?>
  84. <td><?php echo $v['INPUT_CREATE_USER'] ?></td>
  85. <td class="numeric">
  86. <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'],
  87. 'org_sale_id' => $searchModel['org_sale_id'], 'start_date' => $searchModel['start_date'], 'user_id' => $v['CREATE_USER_ID']
  88. , 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']]) ?>"><?php echo $v['order_count'] ?></a></td>
  89. <!-- 客服发单页面判断 yuwei-->
  90. <?php } else if ($searchModel['op'] == 'cusServiceSend') { ?>
  91. <td><?php echo $v['SEND_CREATE_USER'] ?></td>
  92. <td class="numeric">
  93. <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'],
  94. 'org_sale_id' => $searchModel['org_sale_id'], 'start_date' => $searchModel['start_date'], 'send_user_id' => $v['SEND_USER_ID'],
  95. 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']]) ?>"><?php echo $v['order_count'] ?></a></td>
  96. <?php } else if ($searchModel['op'] == 'purchaser') { ?>
  97. <!-- 采购业绩页面判断-->
  98. <td><?php echo $v['PURCHASE_TRUE_NAME'] ?></td>
  99. <td class="numeric">
  100. <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'],
  101. 'org_sale_id' => $searchModel['org_sale_id'], 'start_date' => $searchModel['start_date'], 'purchaser_id' => $v['SALES_MAN']
  102. , 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']]) ?>"><?php echo $v['order_count'] ?></a></td>
  103. <?php } else if ($searchModel['op'] == 'principal') { ?>
  104. <!-- 运营业绩页面判断-->
  105. <td><?php echo $v['PRINCIPAL_TRUE_NAME'] ?></td>
  106. <td class="numeric">
  107. <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'],
  108. 'org_sale_id' => $searchModel['org_sale_id'], 'start_date' => $searchModel['start_date'], 'principal_id' => $v['PRINCIPAL_ID']
  109. , 'end_date' => $searchModel['end_date'], 'date_type' => $searchModel['date_type']]) ?>"><?php echo $v['order_count'] ?></a></td>
  110. <?php } else { ?>
  111. <!-- 非客服跟单,采购页面判断-->
  112. <td>
  113. <a href="#"
  114. class="nav-link"><?php echo $v['hotel_name'] ?></a></td>
  115. <td class="numeric">
  116. <a href="#"><?php echo $v['order_count'] ?></a></td>
  117. <?php } ?>
  118. <td class="numeric" style="text-align: right;"><?php echo $v['room_count'] ?></td>
  119. <td class="numeric" style="text-align: right;"><?php echo is_null($v['room_count_mom']) ? '-' :$v['room_count_mom'] ?></td>
  120. <td class="numeric" style="text-align: right;"><?php echo $v['ORDER_PRICE'] === '-' ? '-' : number_format($v['ORDER_PRICE'], 2); ?></td>
  121. <td class="numeric" style="text-align: right;"><?php echo is_null($v['order_price_mom']) ? '-' : $v['order_price_mom'] ?></td>
  122. <td class="numeric" style="text-align: right;"><?php echo $v['BASE_PRICE'] === '-' ? '-' : number_format($v['BASE_PRICE'], 2); ?></td>
  123. <td class="numeric" style="text-align: right;"><?php echo $v['TOTAL_COMMISSION'] === '-' ? '-' : number_format($v['TOTAL_COMMISSION'], 2); ?></td>
  124. <td class="numeric" style="text-align: right;"><?php echo $v['compensate_in'] === '-' ? '-' : number_format($v['compensate_in'], 2); ?></td>
  125. <td class="numeric" style="text-align: right;"><?php echo $v['compensate_out'] === '-' ? '-' : number_format($v['compensate_out'], 2); ?></td>
  126. <td class="numeric" style="text-align: right;"><?php echo $v['PROFIT_VALUE'] === '-' ? '-' : number_format($v['PROFIT_VALUE'], 2); ?></td>
  127. <td class="numeric" style="text-align: right;"><?php echo is_null($v['profit_value_mom']) ? '-' :$v['profit_value_mom'] ?></td>
  128. <td class="numeric" style="text-align: right;"><?php echo is_null($v['price_rate']) ? '-' : $v['price_rate'] ?></td>
  129. </tr>
  130. <?php } ?>
  131. </tbody>
  132. </table>
  133. <?php
  134. } else {
  135. echo '暂无数据';
  136. }
  137. ?>
  138. </div>