93 lines
4.3 KiB
PHP
Executable File
93 lines
4.3 KiB
PHP
Executable File
<?php
|
|
|
|
/**
|
|
* @Author: fm453
|
|
* @Date: 2018-11-23 12:17:02
|
|
* @Last Modified by: fm453
|
|
* @Last Modified time: 2020-09-12 22:36:33
|
|
* @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('driver/new')?>">新增司机</a>
|
|
</div>
|
|
<div class="col-sm-3 pull-right">
|
|
<form action="<?=Url::current(['pid' => Yii::$app->session->get('pid')], false);?>" method="post">
|
|
<input type="hidden" name="_csrf-backend" value="<?= Yii::$app->getRequest()->getCsrfToken();?>" />
|
|
<div class="input-group">
|
|
<input class="input-sm form-control" type="text" placeholder="请输入司机姓名" name="title" value="<?=$search['title']?>">
|
|
<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><a class="btn btn-primary btn-xs" onclick="parent.selectDriver('已清空','','<?=$callback?>');">全选</a></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php foreach($drivers as $vo):?>
|
|
<tr>
|
|
<td><?=$vo['id']?></td>
|
|
<td><?=$vo['name']?></td>
|
|
<td><?=$vo['mobile']?></td>
|
|
<td>
|
|
<?php if($vo['status_code']==1){?>
|
|
<label class="btn btn-info btn-xs"><?=$status[$vo['status_code']]?></label>
|
|
<?php }elseif($vo['status_code']==0){?>
|
|
<a class="btn btn-default btn-xs" href="<?=Url::toRoute(['driver/ajax','id'=>$vo['id'],'do'=>'in'])?>" mini="ajax"><?=$status[$vo['status_code']]?></a>
|
|
<?php }else{?>
|
|
<button class="btn btn-success btn-xs"><?=$status[$vo['status_code']]?></button>
|
|
<?php }?>
|
|
</td>
|
|
<td>
|
|
<a class="btn btn-primary btn-xs" onclick="parent.selectDriver('<?=$vo['name']?>','<?=$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>
|