|
|
@ -1,6 +1,8 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\bootstrap4\Html; |
|
|
|
use yii\bootstrap4\ActiveForm; |
|
|
|
use kartik\tabs\TabsX; |
|
|
|
|
|
|
|
/* @var $this yii\web\View */ |
|
|
|
/* @var $model antgoods\goods\models\ars\Goods */ |
|
|
@ -9,11 +11,56 @@ $this->title = '编辑商品: ' . $model->name; |
|
|
|
$this->params['breadcrumbs'][] = ['label' => '商品管理', 'url' => ['index']]; |
|
|
|
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]]; |
|
|
|
$this->params['breadcrumbs'][] = '编辑 '; |
|
|
|
Yii::$app->params['bsVersion'] = '4.x'; |
|
|
|
?>
|
|
|
|
<div class="goods-update"> |
|
|
|
<div class="goods-form"> |
|
|
|
<?php |
|
|
|
$form = ActiveForm::begin(['options' => ['class' => 'container-fluid']]); |
|
|
|
|
|
|
|
<?= $this->render('_form', [ |
|
|
|
'model' => $model, |
|
|
|
]) ?>
|
|
|
|
echo TabsX::widget([ |
|
|
|
'bordered' => true, |
|
|
|
'items' => [ |
|
|
|
[ |
|
|
|
'label' => '<i class="fas fa-user"></i> 基本信息', |
|
|
|
'content' => $this->render('goods', [ |
|
|
|
'model' => $model, |
|
|
|
'form' => $form |
|
|
|
]), |
|
|
|
], |
|
|
|
[ |
|
|
|
'label' => '<i class="fas fa-list-alt"></i> 商品规格', |
|
|
|
'content' => $this->render('attribute', [ |
|
|
|
'model' => $attributeModel, |
|
|
|
'attrValue' => [], |
|
|
|
'attrValue' => $attrValue, |
|
|
|
]), |
|
|
|
], |
|
|
|
[ |
|
|
|
'label' => '<i class="fas fa-picture-o"></i> 图片上传', |
|
|
|
'content' => $this->render('picture', [ |
|
|
|
'model' => $model, |
|
|
|
'form' => $form, |
|
|
|
]), |
|
|
|
], |
|
|
|
], |
|
|
|
'position' => TabsX::POS_ABOVE, |
|
|
|
'encodeLabels' => false |
|
|
|
]); |
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
<?= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
|
|
|
|
<?= Html::a('返回', ['index'], ['class' => 'btn btn-info']) ?>
|
|
|
|
</div> |
|
|
|
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div> |
|
|
|
|
|
|
|
<?php |
|
|
|
// $this->render('_form', [
|
|
|
|
// 'model' => $model,
|
|
|
|
// ])
|
|
|
|
?>
|
|
|
|
|
|
|
|
</div> |