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.

72 lines
2.4 KiB

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