From 4e06b660cea08ad87df3984326e57b112081bf09 Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Fri, 6 Dec 2019 15:43:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=B4=B9=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E5=88=97=E8=A1=A8=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/models/searchs/ExpressAreaSearch.php | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/backend/modules/shop/models/searchs/ExpressAreaSearch.php b/backend/modules/shop/models/searchs/ExpressAreaSearch.php index 7604eef..dea69ac 100644 --- a/backend/modules/shop/models/searchs/ExpressAreaSearch.php +++ b/backend/modules/shop/models/searchs/ExpressAreaSearch.php @@ -6,6 +6,8 @@ use yii\base\Model; use yii\data\ActiveDataProvider; use yii\helpers\ArrayHelper; use backend\modules\shop\models\ars\ExpressArea; +use yii; +use yii\bootstrap4\Html; /** * ExpressAreaSearch represents the model behind the search form of `backend\modules\shop\models\ars\ExpressArea`. @@ -63,16 +65,23 @@ class ExpressAreaSearch extends ExpressArea return implode(' // ', $cities); }, ], - 'express_template', - //'extra_price', - //'basic_price', - //'basic_count', - //'extra_count', - //'updated_at', - //'created_at', [ 'class' => 'iron\grid\ActionColumn', 'align' => 'center', + 'template' => '{express-area-update}', + 'buttons' => [ + 'express-area-update' => function ($url, $model, $key) { + $options = [ + 'title' => Yii::t('yii', '修改'), + 'aria-label' => Yii::t('yii', '修改'), + 'data-method' => 'post', + 'class' => 'oi oi-pencil', + + ]; + return Html::a('', $url . '&expressTemplateId=' . $model->express_template, $options); + }, + ], + 'config' => [], ], ]; }