Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

150 righe
6.9 KiB

  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: tianlionfire
  5. * Date: 2018/3/7
  6. * Time: 10:35
  7. */
  8. use backend\modules\zzcs\assets\ZzcsAsset;
  9. use yii\widgets\Pjax;
  10. ZzcsAsset::addCss($this, '/plug/My97DatePicker/skin/WdatePicker.css');
  11. ZzcsAsset::addCss($this, '/global/css/combo.select.css');
  12. ZzcsAsset::addCss($this, '/global/css/bootstrap.min.css');
  13. ZzcsAsset::addCss($this, '/hotel-affiche/css/affiche_list.css');
  14. ZzcsAsset::addScript($this, '/global/js/jquery.combo.select.js');
  15. ZzcsAsset::addScript($this, '/hotel-affiche/js/affiche_list.js?v=20180307');
  16. ZzcsAsset::addScript($this, '/plug/My97DatePicker/WdatePicker.js');
  17. ZzcsAsset::addScript($this, '/plug/layer/layer.js');
  18. ZzcsAsset::addScript($this, '/plug/date-time/date-manage.js?v=001');
  19. ?>
  20. <div class="search_cost">
  21. <ul id="search_cost">
  22. <li class="search2">
  23. <span class="name_span">酒店名称:</span>
  24. <select class="hotel_name" id="hotel_name">
  25. <option value="">请选择</option>
  26. <?php foreach ($hotelName as $key => $vel) { ?>
  27. <option value="<?php echo $vel['hotel_name']; ?>"><?php echo $vel['hotel_name']; ?></option>
  28. <?php } ?>
  29. </select>
  30. </li>
  31. <li class="search9">
  32. <span class="name_span">公告类型:</span>
  33. <select id="affiche_type" class="affiche_type" style="font-size:12px;">
  34. <option value="-1" selected="selected" style="font-size: 12px;">全部</option>
  35. <option value="1" style="font-size: 12px;">价格调整</option>
  36. <option value="2" style="font-size: 12px;">预定信息</option>
  37. <option value="3" style="font-size: 12px;">酒店信息</option>
  38. <option value="0" style="font-size: 12px;">其他</option>
  39. </select>
  40. </li>
  41. <li class="search9">
  42. <span class="name_span">排序:</span>
  43. <select id="sort" class="sort" style="font-size:12px;">
  44. <option value="" selected="selected" style="font-size: 12px;">请选择</option>
  45. <option value="1" style="font-size: 12px;">重要等级</option>
  46. <option value="2" style="font-size: 12px;">发布时间</option>
  47. <option value="3" style="font-size: 12px;">发布人</option>
  48. </select>
  49. </li>
  50. <li>
  51. <span class="name_span">发布人:</span>
  52. <select id="create_name" class="create_name">
  53. <option value="" selected="selected" style="font-size: 12px;">全部</option>
  54. <?php foreach ($createUserName as $v): ?>
  55. <option value="<?= $v['createUserName'] ?>"
  56. style="font-size: 12px;"><?= $v['createUserName'] ?></option>
  57. <?php endforeach; ?>
  58. </select>
  59. </li>
  60. <li class="search4">
  61. <span>更多查询:</span>
  62. <input type="text" style="font-size:12px;width:150px;" id="more_search" value="" size="40"
  63. placeholder="公告标题/公告内容"/>
  64. </li>
  65. <li class="search7">
  66. <span class="btn-primary" id="search_btn" onclick='searchInfo()'>查询</span>
  67. </li>
  68. </ul>
  69. </div>
  70. <!-----------head end-------------->
  71. <?php Pjax::begin(['id' => 'main_table', 'timeout' => 30000000]) ?>
  72. <div class="table_list">
  73. <table id="table_list">
  74. <thead>
  75. <tr style="text-align: center;">
  76. <th class="td5">重要等级</th>
  77. <!-- <th class="td2">编号</th>-->
  78. <th class="td3">酒店名称</th>
  79. <th class="td4">公告类型</th>
  80. <th class="td6">公告标题</th>
  81. <th class="td7">公告内容</th>
  82. <th class="td4">发布人</th>
  83. <th class="td11">发布时间</th>
  84. </tr>
  85. </thead>
  86. <tbody>
  87. <?php foreach($afficheList as $val){ ?>
  88. <tr>
  89. <td class="td5" style="<?php if($val['important_level']==1){?>background:#dd4b39<?php }else if($val['important_level']==2){?>background:#f39c12<?php }else if($val['important_level']==3){?>background:#3b8ab8<?php }?>;color:#ffffff;"><?php echo $val['important_level_description']; ?></td>
  90. <!-- <td class="td2">--><?php //echo $val['index']; ?><!--</span></td>-->
  91. <td class="td3"><?php echo $val['hotel_name']; ?></td>
  92. <td class="td4"><?php echo $val['affiche_type_description']; ?></td>
  93. <td class="td6" style="cursor:pointer;overflow: hidden;white-space:nowrap;text-overflow: ellipsis;text-align:left;" onclick="lookDetail(<?php echo $val['id'];?>)"><?php echo $val['affiche_title']; ?></td>
  94. <td class="td7" style="overflow: hidden;white-space:nowrap;text-overflow: ellipsis;max-width:120px;cursor:pointer;text-align:left;" onclick="lookDetail(<?php echo $val['id'];?>)"><?php echo $val['content']; ?></td>
  95. <td class="td4"><?php echo $val['create_user_name']; ?></td>
  96. <td class="td11"><?php echo $val['create_time']; ?></td>
  97. </tr>
  98. <?php }; ?>
  99. </tbody>
  100. </table>
  101. </div>
  102. <!-----------body end ------------->
  103. <!--页码信息-->
  104. <div id="page_size_d" total_row="<?php echo $page['total_row']; ?>" total_page="<?php echo $page['total_page']; ?>">
  105. <span class="page_size">每页条数</span>
  106. <select id="page_size" onchange="changePageSize(this)">
  107. <?php foreach ($page_size_arr as $key => $vel) {
  108. if ($vel == $page['page_size']) {
  109. echo '<option value="' . $vel . '" selected=selected>' . $vel . '</option>';
  110. } else {
  111. echo '<option value="' . $vel . '">' . $vel . '</option>';
  112. }
  113. } ?>
  114. </select>
  115. </div>
  116. <div id="page_list">
  117. <?php
  118. if (count($page_arr) > 0) {
  119. foreach ($page_arr as $key => $vel) {
  120. if ($page['current_page'] == 1 && ($vel == '首页' || $vel == '<上一页')) {
  121. $class = 'not_click';
  122. } elseif ($page['current_page'] == $vel) {
  123. $class = 'click';
  124. } elseif ($page['current_page'] == $page['total_page'] && ($vel == '末页' || $vel == '下一页>')) {
  125. $class = 'not_click';
  126. } elseif ($vel == '...') {
  127. $class = 'not_click';
  128. } else {
  129. $class = 'clickable';
  130. }
  131. if ($vel != '首页' && $vel != '<上一页' && $vel != '下一页>' && $vel != '末页') {
  132. $class = 'page_num ' . $class;
  133. }
  134. if ($class == 'clickable' || $class == 'page_num clickable') {
  135. echo '<span class="' . $class . '" onclick="pageSearchInfo(this,' . $page['total_page'] . ')">' . $vel . '</span>';
  136. } else {
  137. echo '<span class="' . $class . '">' . $vel . '</span>';
  138. }
  139. }
  140. }
  141. ?>
  142. <span class="total_row">共<?php echo $page['total_row']; ?>条</span>
  143. </div>
  144. <?php Pjax::end() ?>