|
- <?php
- use yii\helpers\Url;
- use yii\helpers\Html;
- use yii\grid\GridView;
-
- /* @var $this yii\web\View */
- /* @var $dataProvider yii\data\ActiveDataProvider */
-
- $this->title = '上门接送';
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <style>
- .margin-30 {
- margin: 30px;
- }
- </style>
- <div class="margin-30 zizai-order-temp-index">
- <?= Html::a('下单', Url::to('/motorcade/zizai/create'),['class' => 'btn btn-primary ']); ?>
- <h1><?= Html::encode($this->title) ?></h1>
-
- <?= GridView::widget([
- 'dataProvider' => $dataProvider,
- 'columns' => [
- ['class' => 'yii\grid\SerialColumn'],
- 'create_time',
- 'user.TRUE_NAME',
- 'zz_order_id',
- 'order_id',
- 'seq',
- 'start_time',
- [
- 'attribute' => 'end_time',
- 'value' => function ($model) {
- return substr($model->end_time, 11);
- }
- ],
- // 'end_station',
- 'num',
- 'start_station',
- [
- 'attribute' => 'run_bus_id',
- 'value' => function ($model) {
- return $model->run_bus_id .'--'. $model->bus_order_id;
- },
- 'format' => 'raw'],
- [
- 'label' => '坐标',
- 'attribute' => 'longitude',
- 'value' => function ($model) {
- return $model->latitude . '<br />' . $model->longitude;
- },
- 'format' => 'raw'
- ],
- // 'latitude',
- // 'order_status',
- 'abnormal_msg',
-
- [
- 'class' => 'yii\grid\ActionColumn',
- 'template' => '{view} {update}',
- 'buttons' => [
- 'view' => function ($url, $model, $key) {
- return Html::a('查看', $url);
- },
- 'update' => function ($url, $model, $key) {
- return Html::a('修改', Url::to(''));
- },
- ]
- ],
- ],
- ]); ?>
- </div>
|