Browse Source

feat: 发货列表修改功能

wechat_public_accounts
travis 5 years ago
parent
commit
0045513a52
  1. 51
      backend/modules/shop/models/searchs/DeliverySearch.php
  2. 6
      backend/modules/shop/views/delivery/_form.php

51
backend/modules/shop/models/searchs/DeliverySearch.php

@ -52,17 +52,37 @@ class DeliverySearch extends Delivery
'width' => '2%', 'width' => '2%',
'align' => 'center' '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', 'attribute' => 'created_at',
'width' => '10%',
'value' => function ($model) { 'value' => function ($model) {
return date('Y-m-d H:i:s', $model->created_at); return date('Y-m-d H:i:s', $model->created_at);
} }
@ -70,7 +90,20 @@ class DeliverySearch extends Delivery
[ [
'class' => 'iron\grid\ActionColumn', 'class' => 'iron\grid\ActionColumn',
'align' => 'center', 'align' => 'center',
'config' => [
[
'name' => 'view',
'icon' => 'list',
'title' => '详情',
],
[
'name' => 'update',
'icon' => 'pencil',
'title' => '修改'
],
],
], ],
]; ];
} }
/** /**

6
backend/modules/shop/views/delivery/_form.php

@ -12,16 +12,10 @@ use yii\bootstrap4\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'order_id')->textInput() ?>
<?= $form->field($model, 'shipping_name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'shipping_name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'shipping_id')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'shipping_id')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'type')->textInput() ?>
<?= $form->field($model, 'goods')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'status')->textInput() ?> <?= $form->field($model, 'status')->textInput() ?>
<?= $form->field($model, 'decription')->textarea(['rows' => 6]) ?> <?= $form->field($model, 'decription')->textarea(['rows' => 6]) ?>

Loading…
Cancel
Save