linyaostalker
5 years ago
7 changed files with 347 additions and 1 deletions
-
64vendor/antgoods/goods/src/assets/custom/sku_item.6649e882bedbeb22ea3d.js
-
55vendor/antgoods/goods/src/controllers/GoodsController.php
-
167vendor/antgoods/goods/src/logic/goods/GoodsManager.php
-
20vendor/antgoods/goods/src/migrations/m191129_010349_add_column_sku_mode_in_antgoods_goods.php
-
6vendor/antgoods/goods/src/models/ars/Goods.php
-
15vendor/antgoods/goods/src/views/goods/sku_edit.php
-
21vendor/antgoods/goods/src/web/GoodsSkuEditAsset.php
64
vendor/antgoods/goods/src/assets/custom/sku_item.6649e882bedbeb22ea3d.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,20 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use yii\db\Migration; |
||||
|
|
||||
|
/** |
||||
|
* Class m191129_010349_add_column_sku_mode_in_antgoods_goods |
||||
|
*/ |
||||
|
class m191129_010349_add_column_sku_mode_in_antgoods_goods extends Migration |
||||
|
{ |
||||
|
public function up() |
||||
|
{ |
||||
|
$this->addColumn('antgoods_goods', 'sku_mode', $this->tinyInteger(1)->notNull()->defaultValue(1)->comment('sku类型')); |
||||
|
} |
||||
|
|
||||
|
public function down() |
||||
|
{ |
||||
|
$this->dropColumn('antgoods_goods', 'sku_mode'); |
||||
|
return true; |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use antgoods\goods\web\GoodsSkuEditAsset; |
||||
|
|
||||
|
$this->title = '添加SKU'; |
||||
|
$this->params['breadcrumbs'][] = ['label' => '商品列表', 'url' => ['index']]; |
||||
|
$this->params['breadcrumbs'][] = $this->title; |
||||
|
GoodsSkuEditAsset::register($this); |
||||
|
?>
|
||||
|
<div id="app"></div> |
||||
|
<script> |
||||
|
var sku = <?=json_encode($sku)?>;
|
||||
|
var attributes = <?=json_encode($attributes)?>;
|
||||
|
var csrfToken = "<?= Yii::$app->request->csrfToken ?>"; |
||||
|
</script> |
@ -0,0 +1,21 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace antgoods\goods\web; |
||||
|
|
||||
|
use yii\web\AssetBundle; |
||||
|
|
||||
|
/** |
||||
|
* Main backend application asset bundle. |
||||
|
*/ |
||||
|
class GoodsSkuEditAsset extends AssetBundle |
||||
|
{ |
||||
|
public $sourcePath = "@antgoods/goods/src/assets"; |
||||
|
public $css = [ |
||||
|
]; |
||||
|
public $js = [ |
||||
|
'custom/sku_item.6649e882bedbeb22ea3d.js' |
||||
|
]; |
||||
|
public $depends = [ |
||||
|
'yii\web\YiiAsset', |
||||
|
]; |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue