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]) ?>