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.
22 lines
799 B
22 lines
799 B
<?php
|
|
|
|
use backend\modules\goods\models\ars\Attribute;
|
|
use backend\modules\goods\web\GoodsAttributeAsset;
|
|
|
|
$param = [];
|
|
$value = [];
|
|
$attrId = [];
|
|
$allAttr = Attribute::find()->where(['type' => Attribute::TYPE_ATTR])->asArray()->all();
|
|
GoodsAttributeAsset::register($this);
|
|
?>
|
|
|
|
<div class="content-box">
|
|
<input type="hidden" id="attribute" name="attribute"/>
|
|
<div id="sku-choose"></div>
|
|
</div>
|
|
<script>
|
|
var csrf = "<?= Yii::$app->request->csrfToken ?>";
|
|
var allAttr = <?= isset($allAttr) ? json_encode($allAttr) : [] ?>; // 所有数据
|
|
var currentAttr = <?= isset($model) ? json_encode($model) : [] ?>; // 默认数据(之前已选择的数据)
|
|
var canNotDeleteAttr =<?=isset($attrValue) ? json_encode($attrValue) : [] ?>; // 已设置sku的值,不可删除
|
|
</script>
|