'pjax-tab' . $tab, 'timeout' => false]);
echo $this->render('_search', ['model' => $searchModel, 'tab' => $tab, 'type' => 'bus']);
$visible_1 = false;
$visible_2 = false;
$visible_3 = false;
if (in_array($tab, [1, 2,])) {
$visible_1 = true;
}
if (in_array($tab, [3, 4, 5])) {
$visible_2 = true;
}
if ($tab == 6) {
$visible_3 = true;
}
?>
'grid-view-tab1',
'tableOptions'=>['class'=>'table table-striped table-hover'],
'dataProvider' => $dataProvider,
'resizableColumns'=>false,
'pagerFixed' => true,
'rowOptions' => function ($model, $key, $index, $column) {
return ['class' => ($model->EXPIRE_DATE < date('Y-m-d', strtotime('+30 days')) ? 'bg-light-sky-blue bg-font-light-pink' : '')];
},
'columns' => [
[
'width' => '55px',
'class' => 'kartik\grid\CheckboxColumn',
'rowSelectedClass' => '',
],
[
'width'=>'220px',
'label' => '车牌号',
'attribute' => 'bus.BUS_NO',
],
// 'bus.BUS_NO',
[
'width'=>'200px',
'label' => '品牌',
'attribute' => 'bus.brand.RES_NAME',
],
[
'width'=>'240px',
'label'=>'座位',
'attribute'=>'bus.SEAT_DESC',
],
// 'bus.SEAT_DESC',
[
'width'=>'100px',
'label' => '有效保险数',
'attribute' => 'countInsurance',
'visible' => $visible_2
],
[
'width'=>'275px',
'label' => '下次保养里程数',
'attribute' => 'LAST_MAINTAIN',
'format' => ['decimal', 2],
'visible' => $visible_3
],
[
'width'=>'210px',
'label' => '当前里程数',
'attribute' => 'end_value',
'format' => ['decimal', 2],
'visible' => $visible_3
],
[
'width'=>'130px',
'attribute' => 'EXPIRE_DATE',
'visible' => $visible_1
],
[
'width'=>'200',
'label' => '保险期结束',
'attribute' => 'EXPIRE_DATE',
'visible' => $visible_2
],
[
'hAlign'=>'center',
// 'width'=>'125px',
'header' => '操作',
'value' => function ($model) {
if (in_array($model->DOC_OPTION, [511, 512, 513, 514])) {
$href = 'upload-tab2';
$contain = 'image2';
} else if ($model->DOC_OPTION == 515) {
$href = 'upload-tab3';
$contain = 'image3';
} else {
$href = 'upload-tab1';
$contain = 'image1';
}
return '
更新';
},
'format' => 'raw',
],
],
]);
?>