From 3e3ae5a2363b6fcd7545a53717305b1cdd68419c Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Thu, 28 Nov 2019 16:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81sku=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8C=BA=E5=88=86=E6=98=AF=E5=90=A6=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._is_manaul_in_table_antgoods_goods_sku.php | 20 ++++++++++++++++ .../goods/src/models/ars/GoodsSku.php | 6 ++++- .../goods/src/models/searchs/GoodsSearch.php | 23 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 vendor/antgoods/goods/src/migrations/m191127_114228_add_column_is_manaul_in_table_antgoods_goods_sku.php diff --git a/vendor/antgoods/goods/src/migrations/m191127_114228_add_column_is_manaul_in_table_antgoods_goods_sku.php b/vendor/antgoods/goods/src/migrations/m191127_114228_add_column_is_manaul_in_table_antgoods_goods_sku.php new file mode 100644 index 0000000..a6584d6 --- /dev/null +++ b/vendor/antgoods/goods/src/migrations/m191127_114228_add_column_is_manaul_in_table_antgoods_goods_sku.php @@ -0,0 +1,20 @@ +addColumn('antgoods_goods_sku', 'is_manaul', $this->tinyInteger(1)->notNull()->defaultValue(0)->comment('是否手动')); + } + + public function down() + { + $this->dropColumn('antgoods_goods_sku', 'is_manaul'); + return true; + } +} diff --git a/vendor/antgoods/goods/src/models/ars/GoodsSku.php b/vendor/antgoods/goods/src/models/ars/GoodsSku.php index 7690b0e..a9c201a 100644 --- a/vendor/antgoods/goods/src/models/ars/GoodsSku.php +++ b/vendor/antgoods/goods/src/models/ars/GoodsSku.php @@ -28,9 +28,13 @@ use yii\behaviors\TimestampBehavior; * @property int $is_delete 是否删除,1为已删除 * @property int $created_at 创建时间 * @property int $updated_at 更新时间 + * @property int $is_manaul 是否手动 */ class GoodsSku extends \yii\db\ActiveRecord { + //是否手动is_manaul + const IS_MANUAL_YES = 1; //是手动 + const IS_MANUAL_NO = 0; //不是手动 //是否删除is_delete const IS_DELETE_NO = 0;//未删除 const IS_DELETE_YES = 1;//已删除 @@ -49,7 +53,7 @@ class GoodsSku extends \yii\db\ActiveRecord { return [ [['goods_id', 'goods_sn'], 'required'], - [['goods_id', 'weight', 'length', 'width', 'height', 'diameter', 'sold_count', 'stock', 'market_price', 'price', 'model_id', 'is_sale', 'sort_order', 'is_delete'], 'integer'], + [['goods_id', 'weight', 'length', 'width', 'height', 'diameter', 'sold_count', 'stock', 'market_price', 'price', 'model_id', 'is_sale', 'sort_order', 'is_delete', 'is_manaul'], 'integer'], [['goods_code'], 'string', 'max' => 50], [['goods_sn', 'goods_attr'], 'string', 'max' => 60], ]; diff --git a/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php b/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php index 618b320..41c5c29 100644 --- a/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php +++ b/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php @@ -88,6 +88,29 @@ class GoodsSearch extends Goods [ 'class' => 'iron\grid\ActionColumn', 'align' => 'center', + 'config' => [ + [ + 'name' => 'view', + 'icon' => 'list', + 'title' => '详情', + ], + [ + 'name' => 'update', + 'icon' => 'pencil', + 'title' => '修改' + ], + [ + 'name' => 'edit-sku', + 'icon' => 'hard-drive', + 'title' => '商品sku' + ], + [ + 'name' => 'delete', + 'icon' => 'trash', + 'title' => '删除', + 'contents' => '确定删除?' + ] + ], ], ]; }