You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.7 KiB

  1. <?php
  2. use yii\bootstrap4\Html;
  3. use yii\bootstrap4\ActiveForm;
  4. use kartik\tabs\TabsX;
  5. /* @var $this yii\web\View */
  6. /* @var $model antgoods\models\ars\Goods */
  7. $this->title = '编辑商品: ' . $model->name;
  8. $this->params['breadcrumbs'][] = ['label' => '商品管理', 'url' => ['index']];
  9. $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
  10. $this->params['breadcrumbs'][] = '编辑 ';
  11. Yii::$app->params['bsVersion'] = '4.x';
  12. ?>
  13. <div class="goods-update">
  14. <div class="goods-form">
  15. <?php
  16. $form = ActiveForm::begin(['options' => ['class' => 'container-fluid']]);
  17. echo TabsX::widget([
  18. 'bordered' => true,
  19. 'items' => [
  20. [
  21. 'label' => '<i class="fas fa-user"></i> 基本信息',
  22. 'content' => $this->render('goods', [
  23. 'model' => $model,
  24. 'form' => $form,
  25. 'judgeGoodsCategory' => $judgeGoodsCategory
  26. ]),
  27. ],
  28. [
  29. 'label' => '<i class="fas fa-list-alt"></i> 筛选规格',
  30. 'content' => $this->render('filter_attribute', [
  31. 'filterModel' => $filterAttributeModel,
  32. 'filterAttrValue' => [],
  33. ]),
  34. ],
  35. [
  36. 'label' => '<i class="fas fa-list-alt"></i> 商品规格',
  37. 'content' => $this->render('attribute', [
  38. 'model' => $attributeModel,
  39. 'attrValue' => $attrValue,
  40. 'goodsModel' => $model,
  41. ]),
  42. ],
  43. [
  44. 'label' => '<i class="fas fa-ad"></i> 详情上传',
  45. 'content' => $this->render('new_editor', ['model' => $model,
  46. 'form' => $form,
  47. ]),
  48. ],
  49. [
  50. 'label' => '<i class="fas fa-picture-o"></i> 图片上传',
  51. 'content' => $this->render('picture', [
  52. 'model' => $model,
  53. 'form' => $form,
  54. ]),
  55. ],
  56. ],
  57. 'position' => TabsX::POS_ABOVE,
  58. 'encodeLabels' => false
  59. ]);
  60. ?>
  61. <div class="form-group">
  62. <?= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
  63. <?= Html::a('返回', ['index'], ['class' => 'btn btn-info']) ?>
  64. </div>
  65. <?php ActiveForm::end(); ?>
  66. </div>
  67. <?php
  68. // $this->render('_form', [
  69. // 'model' => $model,
  70. // ])
  71. ?>
  72. </div>