diff --git a/backend/modules/shop/models/searchs/AfterSaleSearch.php b/backend/modules/shop/models/searchs/AfterSaleSearch.php index c8b132c..fc526cd 100644 --- a/backend/modules/shop/models/searchs/AfterSaleSearch.php +++ b/backend/modules/shop/models/searchs/AfterSaleSearch.php @@ -6,6 +6,7 @@ use yii\base\Model; use yii\data\ActiveDataProvider; use yii\helpers\ArrayHelper; use backend\modules\shop\models\ars\AfterSale; +use backend\modules\shop\models\ars\OrderGoods; /** * AfterSaleSearch represents the model behind the search form of `backend\modules\shop\models\ars\AfterSale`. @@ -52,28 +53,42 @@ class AfterSaleSearch extends AfterSale 'width' => '2%', 'align' => 'center' ], - 'id', - 'wx_refund_id', - 'after_sale_sn', - 'user_id', - 'order_goods_id', - //'amount', - //'count', - //'apply_at', - //'dealt_at', - //'finish_at', - //'operator_id', - //'refund_type', - //'description', - //'image', - //'status', - //'reason', - //'remarks', - //'take_shipping_sn', - //'refund_mode', + 'id', + 'after_sale_sn', + 'operator_id', + [ + 'attribute' => 'order_goods_id', + 'value' => function ($model) { + return $model->goods->goods_name; + } + ], + [ + 'attribute' => 'order_pay_amount', + 'value' => function ($model) { + return $model->goods->order->payment_amount; + }, + 'label' => '订单支付金额' + ], + 'amount', + [ + 'attribute' => 'status', + 'value' => function ($model) { + return AfterSale::$status[$model->status]; + } + ], + 'apply_at:datetime', + 'dealt_at:datetime', + 'finish_at:datetime', [ 'class' => 'iron\grid\ActionColumn', 'align' => 'center', + 'config' => [ + [ + 'name' => 'view', + 'icon' => 'list', + 'title' => '详情', + ] + ] ], ]; }