<?php

use common\models\Goods;
use common\models\GoodsIndex;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model common\models\GoodsIndex */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="page-header">
    <div class="alert alert-success" role="alert"><?='当前'.  GoodsIndex::getEntityName($model->entity).'【'.$model->getEntityItemName().'】' ?></div>
</div>
<div class="box box-success">
    <div class="box-body">
    <?php $form = ActiveForm::begin(); ?>

        <?= $form->field($model, 'goods_id')->dropDownList(ArrayHelper::map(Goods::lists(), 'id', 'name')) ?>


    <div class="form-group form-submit">
            <?= Html::submitButton($model->isNewRecord ? Yii::t('common', 'Create') : Yii::t('common', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-success']) ?>
        </div>

    <?php ActiveForm::end(); ?>
    </div>
</div>
