ctms/pms-admin/views/room/select.php
2025-04-10 23:19:13 +08:00

91 lines
4.1 KiB
PHP
Executable File

<?php
/**
* @Author: fm453
* @Date: 2018-11-23 12:17:02
* @Last Modified by: fm453
* @Last Modified time: 2018-12-11 01:30:24
* @Email: fm453@lukegzs.com
*/
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;
use yii\widgets\LinkPager;
$this->title = '酒店列表';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
<h1><?= Html::encode($this->title) ?></h1>
<div class="row">
<div class="col-sm-3">
<a class="btn btn-info btn-sm" href="<?= Url::toRoute('hotel/new')?>">新增酒店</a>
</div>
<div class="col-sm-3 pull-right">
<form action="<?=Url::toRoute('hotel/list')?>" method="post">
<input type="hidden" name="_csrf-backend" value="<?= Yii::$app->getRequest()->getCsrfToken();?>" />
<div class="input-group">
<input type="text" placeholder="请输入酒店名" name="title" class="input-sm form-control">
<span class="input-group-btn">
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
</span>
</div>
</form>
</div>
</div>
<hr>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>序号</th>
<th>区域地址</th>
<th>名称</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<?php foreach($hotels as $vo):?>
<tr>
<td><?=$vo['id']?></td>
<td>【<code><?=isset($citys[$vo['city']]['name'])?$citys[$vo['city']]['name']:'未设置'?></code>】<?=$vo['addr']?></td>
<td><?=$vo['title']?></td>
<td>
<?php if($vo['status_code']==1){?>
<a class="btn btn-info btn-xs" href="<?=Url::toRoute(['hotel/ajax','id'=>$vo['id'],'do'=>'hide'])?>" mini="ajax"><?=$status[$vo['status_code']]?></a>
<?php }else{?>
<a class="btn btn-default btn-xs" href="<?=Url::toRoute(['hotel/ajax','id'=>$vo['id'],'do'=>'show'])?>" mini="ajax"><?=$status[$vo['status_code']]?></a>
<?php }?>
</td>
<td>
<a class="btn btn-primary btn-xs" onclick="parent.selectHotel('<?=$vo['title']?>','<?=$vo['id']?>','<?=$callback?>');">选择</a>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<!--分页-->
<div class="f-r">
<?= LinkPager::widget([
'pagination'=>$pager,
'firstPageLabel' => '首页',
'nextPageLabel' => '下一页',
'prevPageLabel' => '上一页',
'lastPageLabel' => '末页',
]) ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>