diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php index c68e652..c3b2675 100644 --- a/vendor/antgoods/goods/src/models/ars/Attribute.php +++ b/vendor/antgoods/goods/src/models/ars/Attribute.php @@ -19,6 +19,9 @@ use yii\behaviors\TimestampBehavior; */ class Attribute extends \yii\db\ActiveRecord { + //是否删除is_delete + const IS_DELETE_NO = 0;//未删除 + const IS_DELETE_YES = 1;//已删除 /** * {@inheritdoc} */ diff --git a/vendor/antgoods/goods/src/models/searchs/AttributeSearch.php b/vendor/antgoods/goods/src/models/searchs/AttributeSearch.php index f5cc763..b06e242 100644 --- a/vendor/antgoods/goods/src/models/searchs/AttributeSearch.php +++ b/vendor/antgoods/goods/src/models/searchs/AttributeSearch.php @@ -118,6 +118,7 @@ class AttributeSearch extends Attribute * 条件筛选 */ private function filter($query, $dataProvider){ + $query->andFilterWhere(['is_delete' => Attribute::IS_DELETE_NO]); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); diff --git a/vendor/antgoods/goods/src/views/attribute/_form.php b/vendor/antgoods/goods/src/views/attribute/_form.php index 7d6644c..75c5ddf 100644 --- a/vendor/antgoods/goods/src/views/attribute/_form.php +++ b/vendor/antgoods/goods/src/views/attribute/_form.php @@ -20,8 +20,6 @@ use yii\widgets\ActiveForm; field($model, 'sort_order')->textInput() ?> - field($model, 'is_delete')->textInput() ?> -
'btn btn-success']) ?> 'btn btn-info']) ?> diff --git a/vendor/antgoods/goods/src/views/attribute/create.php b/vendor/antgoods/goods/src/views/attribute/create.php index 1eaf0e4..6aa1ff6 100644 --- a/vendor/antgoods/goods/src/views/attribute/create.php +++ b/vendor/antgoods/goods/src/views/attribute/create.php @@ -5,8 +5,8 @@ use yii\helpers\Html; /* @var $this yii\web\View */ /* @var $model antgoods\goods\models\ars\Attribute */ -$this->title = '创建 Attribute'; -$this->params['breadcrumbs'][] = ['label' => 'Attributes', 'url' => ['index']]; +$this->title = '创建规格'; +$this->params['breadcrumbs'][] = ['label' => '规格管理', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?>
diff --git a/vendor/antgoods/goods/src/views/attribute/index.php b/vendor/antgoods/goods/src/views/attribute/index.php index 6bdf668..b147a9f 100644 --- a/vendor/antgoods/goods/src/views/attribute/index.php +++ b/vendor/antgoods/goods/src/views/attribute/index.php @@ -7,7 +7,7 @@ use iron\grid\GridView; /* @var $searchModel common\models\searchs\AttributeSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ -$this->title = 'Attributes'; +$this->title = '规格管理'; $this->params['breadcrumbs'][] = $this->title; ?>
diff --git a/vendor/antgoods/goods/src/views/attribute/update.php b/vendor/antgoods/goods/src/views/attribute/update.php index e48b930..0f412bc 100644 --- a/vendor/antgoods/goods/src/views/attribute/update.php +++ b/vendor/antgoods/goods/src/views/attribute/update.php @@ -5,8 +5,8 @@ use yii\helpers\Html; /* @var $this yii\web\View */ /* @var $model antgoods\goods\models\ars\Attribute */ -$this->title = '编辑 Attribute: ' . $model->name; -$this->params['breadcrumbs'][] = ['label' => 'Attributes', 'url' => ['index']]; +$this->title = '编辑规格: ' . $model->name; +$this->params['breadcrumbs'][] = ['label' => '规格管理', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]]; $this->params['breadcrumbs'][] = 'Update '; ?> diff --git a/vendor/antgoods/goods/src/views/attribute/view.php b/vendor/antgoods/goods/src/views/attribute/view.php index beac055..87eaed1 100644 --- a/vendor/antgoods/goods/src/views/attribute/view.php +++ b/vendor/antgoods/goods/src/views/attribute/view.php @@ -7,7 +7,7 @@ use yii\widgets\DetailView; /* @var $model antgoods\goods\models\ars\Attribute */ $this->title = $model->name; -$this->params['breadcrumbs'][] = ['label' => 'Attributes', 'url' => ['index']]; +$this->params['breadcrumbs'][] = ['label' => '规格管理', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; \yii\web\YiiAsset::register($this); ?> @@ -25,9 +25,8 @@ $this->params['breadcrumbs'][] = $this->title; 'value:ntext', 'type', 'sort_order', - 'is_delete', - 'created_at', - 'updated_at', + 'created_at:datetime', + 'updated_at:datetime', ], ]) ?> diff --git a/vendor/antgoods/goods/src/views/goods/view.php b/vendor/antgoods/goods/src/views/goods/view.php index c70b22e..5f51770 100644 --- a/vendor/antgoods/goods/src/views/goods/view.php +++ b/vendor/antgoods/goods/src/views/goods/view.php @@ -51,8 +51,8 @@ $this->params['breadcrumbs'][] = $this->title; 'experience_points', 'is_delete', 'express_template', - 'created_at', - 'updated_at', + 'created_at:datetime', + 'updated_at:datetime', ], ]) ?> diff --git a/vendor/antgoods/goods/src/views/shopcategory/view.php b/vendor/antgoods/goods/src/views/shopcategory/view.php index 23f9c29..7157fb0 100644 --- a/vendor/antgoods/goods/src/views/shopcategory/view.php +++ b/vendor/antgoods/goods/src/views/shopcategory/view.php @@ -32,8 +32,8 @@ $this->params['breadcrumbs'][] = $this->title; 'filter_attr:ntext', 'is_show', 'is_delete', - 'created_at', - 'updated_at', + 'created_at:datetime', + 'updated_at:datetime', ], ]) ?>