Initial commit,修正
This commit is contained in:
Executable
+120
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @Author: fm453
|
||||
* @Date: 2018-11-23 12:17:02
|
||||
* @Last Modified by: fm453
|
||||
* @Last Modified time: 2020-12-13 09:29:31
|
||||
* @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">
|
||||
<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="col-sm-3">
|
||||
<a class="btn btn-info btn-sm" href="<?= Url::toRoute('car/new')?>">新增车辆</a>
|
||||
</div>
|
||||
<div class="col-sm-3 pull-right">
|
||||
<div class="input-group">
|
||||
<input class="input-sm form-control" type="text" placeholder="请输入车牌尾数或车架号" name="search[title]" value="<?=$search['title']?>">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3 pull-right">
|
||||
<div class="input-group">
|
||||
<input class="input-sm form-control" type="text" placeholder="点击按品牌筛选" name="search[brand]" id="brand-title" value="<?=$search['brand']?>" autocomplete="off" href="<?=Url::toRoute(['carbrand/select','callback'=>'brand']);?>" w="80%;" h="90%;" title="选择品牌车型" mini="load">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 筛选</button>
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" name="search[brand_id]" id="brand-value" value="<?=$search['brand_id']?>" />
|
||||
<script>
|
||||
function selectCarBrand(title,id,callback)
|
||||
{
|
||||
layer.closeAll();
|
||||
layer.msg('已选择');
|
||||
$('#'+callback+'-value').val(id);
|
||||
$('#'+callback+'-title').val(title);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th style="width:100px;">车主</th>
|
||||
<th style="width:120px;">品牌车型</th>
|
||||
<th style="width:120px;">车架号</th>
|
||||
<th>车牌</th>
|
||||
<th>状态</th>
|
||||
<th style="width:150px;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach($cars as $vo):?>
|
||||
<tr>
|
||||
<td><?=$vo['id']?></td>
|
||||
<td>【<code><?=isset($users[$vo['mid']]['username'])?$users[$vo['mid']]['username']:'未设置'?></code>】</td>
|
||||
<td><?=$vo['title']?><br><?=$vo['title2']?></td>
|
||||
<td><?=$vo['num_frame']?></td>
|
||||
<td><?=$vo['num_p'].$vo['num_area']?>・<?=$vo['num_left']?></td>
|
||||
<td>
|
||||
<?php if($vo['status_code']==1){?>
|
||||
<label class="btn btn-info btn-xs"><?=isset($status[$vo['status_code']]) ? $status[$vo['status_code']] : '未知'?></label>
|
||||
<?php }else{?>
|
||||
<label class="btn btn-default btn-xs"><?=isset($status[$vo['status_code']]) ? $status[$vo['status_code']] : '未知'?></label>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-primary btn-sm" href="<?=Url::toRoute(['car/ajax','id'=>$vo['id'],'do'=>'show'])?>" mini="ajax" data-toggle="tooltip" data-placement="top" data-title="设置该车辆为显示状态" trigger="hover|focus">显</a>
|
||||
<a class="btn btn-default btn-sm" href="<?=Url::toRoute(['car/ajax','id'=>$vo['id'],'do'=>'hide'])?>" mini="ajax" data-toggle="tooltip" data-placement="top" data-title="设置该车辆为隐藏状态" trigger="hover|focus">隐</a>
|
||||
<a title="点击将删除" href="<?=Url::toRoute(['car/delete','id'=>$vo['id']])?>" class="btn btn-danger btn-sm" mini="act" data-toggle="tooltip" data-placement="top" data-title="删除该车辆信息" trigger="hover|focus"><i class="fa fa-trash bigger-120"></i></a>
|
||||
|
||||
<a class="btn btn-primary btn-sm" href="<?=Url::toRoute(['car/edit','id'=>$vo['id']])?>" data-toggle="tooltip" data-placement="top" data-title="编辑该车辆信息" trigger="hover|focus"><i class="fa fa-edit bigger-120"></i></a>
|
||||
<a class="btn btn-success btn-sm" href="<?=Url::toRoute(['car/copy','id'=>$vo['id']])?>" w="100%;" h="90%;" title="复制车辆信息" mini="load" data-toggle="tooltip" data-placement="top" data-title="复制车辆信息后新增" trigger="hover|focus"><i class="fa fa-copy bigger-120"></i></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>
|
||||
Reference in New Issue
Block a user