From a1cf0c90aa604968c1e8792bf636837d9fccc795 Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Tue, 10 Dec 2019 15:10:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=94=AE=E5=90=8E=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/models/searchs/AfterSaleSearch.php | 53 ++++++++++++------- 1 file changed, 34 insertions(+), 19 deletions(-) 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' => '详情', + ] + ] ], ]; }