| xqd
@@ -22,15 +22,30 @@ class UserRechargeRecordController extends AdminController
|
|
|
$grid->model()->where('status',1)
|
|
|
->orderByDesc('id');
|
|
|
$grid->column('id')->sortable();
|
|
|
- $grid->column('user.nickname','昵称');
|
|
|
- $grid->column('combo.name','充值套餐');
|
|
|
- $grid->column('price');
|
|
|
- $grid->column('gift');
|
|
|
+ $grid->column('avatar','头像')->display(function () {
|
|
|
+ $str = "";
|
|
|
+ $str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
|
|
|
+ $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
|
|
|
+ $str .= '<div>';
|
|
|
+ $str .= '<p style="margin-bottom: 5px">' . $this->user->nickname . '</p>';
|
|
|
+ $str .= '<p style="margin-bottom: 0px">' . $this->user->mobile . '</p>';
|
|
|
+ $str .= "</div>";
|
|
|
+ $str .= "</div>";
|
|
|
+ return $str;
|
|
|
+ });
|
|
|
+ $grid->column('user.info.platform','所属平台')->using(config('global.platform'))->label('primary');
|
|
|
+ $grid->column('gold','收支情况')->display(function (){
|
|
|
+ return '+'.($this->gold + $this->gift);
|
|
|
+ })->label('success');
|
|
|
+ $grid->column('desc');
|
|
|
+ $grid->column('pay_id','订单号');
|
|
|
$grid->column('created_at','充值时间');
|
|
|
|
|
|
$grid->filter(function (Grid\Filter $filter) {
|
|
|
$filter->panel();
|
|
|
$filter->like('user.nickname','昵称')->width(3);
|
|
|
+ $filter->like('pay_id','订单号')->width(3);
|
|
|
+ $filter->equal('user.info.platform','所属平台')->select(config('global.platform'))->width(3);
|
|
|
$filter->equal('combo.id','充值套餐')->select(function (){
|
|
|
return RechargeCombo::select(['id','name'])->get()->pluck('name','id')->toArray();
|
|
|
})->width(3);
|
| xqd
@@ -38,6 +53,7 @@ class UserRechargeRecordController extends AdminController
|
|
|
|
|
|
});
|
|
|
|
|
|
+ $grid->disableActions();
|
|
|
$grid->disableDeleteButton();
|
|
|
$grid->disableCreateButton();
|
|
|
$grid->disableViewButton();
|