筛选条件: = $time['explain']; ?>
= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
//重新定义分页样式
'tableOptions' => ['class' => 'table table-hover'],
'columns' => [
[
'class' => 'yii\grid\SerialColumn',
'visible' => false, // 不显示#
],
[
'attribute' => 'buyer_id',
'label' => '用户ID',
'headerOptions' => ['class' => 'col-md-1'],
],
[
'attribute' => 'member.nickname',
'format' => 'raw',
'value' => function ($model) {
return ' $model['buyer_id'],
]). '>
' . $model['member']['nickname'] . '
';
},
],
'member.mobile',
[
'attribute' => 'count',
'label' => '订单笔数',
'value' => function ($model) {
return $model->count;
}
],
[
'attribute' => 'product_count',
'label' => '订单量',
],
[
'attribute' => 'pay_money',
'label' => '支付金额',
],
[
'attribute' => 'refund_money',
'label' => '退款金额',
],
[
'attribute' => 'order.order_sn',
'label' => '最后一次订单',
'format' => 'raw',
'value' => function ($model) {
return ' $model['id']]) . '>
'. $model['order']['order_sn'] .'
';
}
],
[
'attribute' => 'created_at',
'label' => '最后一次消费时间',
'filter' => false, //不显示搜索框
'format' => ['date', 'php:Y-m-d H:i:s'],
],
],
]); ?>