From 0045513a52786fbe183ad32b8f7e2ae70527a9bb Mon Sep 17 00:00:00 2001 From: travis <310243791@qq.com> Date: Sat, 7 Dec 2019 17:24:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=91=E8=B4=A7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/models/searchs/DeliverySearch.php | 51 +++++++++++++++---- backend/modules/shop/views/delivery/_form.php | 6 --- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/backend/modules/shop/models/searchs/DeliverySearch.php b/backend/modules/shop/models/searchs/DeliverySearch.php index 43edd61..f0a0804 100644 --- a/backend/modules/shop/models/searchs/DeliverySearch.php +++ b/backend/modules/shop/models/searchs/DeliverySearch.php @@ -52,17 +52,37 @@ class DeliverySearch extends Delivery 'width' => '2%', 'align' => 'center' ], - 'id', - 'order_id', - 'shipping_name', - 'shipping_id', - 'type', -// 'goods', - 'status', - 'decription', - //'updated_at', + [ + 'attribute' => 'id', + 'width' => '7%', + ], + [ + 'attribute' => 'order_id', + 'width' => '10%', + ], + [ + 'attribute' => 'shipping_name', + 'width' => '10%', + ], + [ + 'attribute' => 'shipping_id', + 'width' => '10%', + ], + [ + 'attribute' => 'type', + 'width' => '7%', + ], + [ + 'attribute' => 'status', + 'width' => '7%', + ], + [ + 'attribute' => 'decription', + 'width' => '7%', + ], [ 'attribute' => 'created_at', + 'width' => '10%', 'value' => function ($model) { return date('Y-m-d H:i:s', $model->created_at); } @@ -70,7 +90,20 @@ class DeliverySearch extends Delivery [ 'class' => 'iron\grid\ActionColumn', 'align' => 'center', + 'config' => [ + [ + 'name' => 'view', + 'icon' => 'list', + 'title' => '详情', + ], + [ + 'name' => 'update', + 'icon' => 'pencil', + 'title' => '修改' + ], + ], ], + ]; } /** diff --git a/backend/modules/shop/views/delivery/_form.php b/backend/modules/shop/views/delivery/_form.php index 963acf9..a58650e 100644 --- a/backend/modules/shop/views/delivery/_form.php +++ b/backend/modules/shop/views/delivery/_form.php @@ -12,16 +12,10 @@ use yii\bootstrap4\ActiveForm; - field($model, 'order_id')->textInput() ?> - field($model, 'shipping_name')->textInput(['maxlength' => true]) ?> field($model, 'shipping_id')->textInput(['maxlength' => true]) ?> - field($model, 'type')->textInput() ?> - - field($model, 'goods')->textarea(['rows' => 6]) ?> - field($model, 'status')->textInput() ?> field($model, 'decription')->textarea(['rows' => 6]) ?>