diff --git a/application/admin/controller/Goods.php b/application/admin/controller/Goods.php index 58a2c9eb161f853f7772574a15a418a3b4a0d9c5..69def51d1ac269bb4e575f14282438500f392f52 100755 --- a/application/admin/controller/Goods.php +++ b/application/admin/controller/Goods.php @@ -140,6 +140,10 @@ class Goods extends Common // 品牌分类 $this->assign('brand_list', BrandService::CategoryBrand()); + // 规格扩展数据 + $goods_spec_extends = GoodsService::GoodsSpecificationsExtends(); + $this->assign('goods_specifications_extends', $goods_spec_extends['data']); + // 参数 $this->assign('params', $params); diff --git a/application/admin/view/default/goods/save_info.html b/application/admin/view/default/goods/save_info.html index 7f1a8949a6fbb6c336b777f741e18ac20b6c941a..b4f11f2d069fc2ac59a3c9d613ad341ca26419a0 100755 --- a/application/admin/view/default/goods/save_info.html +++ b/application/admin/view/default/goods/save_info.html @@ -181,12 +181,13 @@ 规格编码 条形码 原价(元) + 扩展 操作 {{if empty($specifications['value'])}} - + @@ -203,7 +204,11 @@ - + + + + + 编辑 @@ -213,7 +218,7 @@ {{if !empty($specifications['value'])}} {{foreach $specifications.value as $line_k=>$line_v}} - + {{foreach $line_v as $v}} {{if isset($v['data_type'])}} {{switch v.data_type}} @@ -240,7 +245,11 @@ - + + + + + 编辑 {{if $line_k gt 0}} @@ -384,12 +393,146 @@ + +
+
+
+

规格扩展数据

+ × +
+
+
+ {{if !empty($goods_specifications_extends) and is_array($goods_specifications_extends)}} + {{foreach $goods_specifications_extends as $v}} +
+ + {{if !empty($v['desc'])}} + {{$v.desc}} + {{/if}} + {{if !empty($v['element'])}} + {{foreach $v.element as $element}} +
+ + {{switch element.element}} + {{case input}} + {{if in_array($element['type'], ['radio', 'checkbox']) and !empty($element['element_data']) and is_array($element['element_data'])}} + {{foreach $element.element_data as $element_data_key=>$element_data}} + + {{/foreach}} + {{else /}} + + {{/if}} + {{/case}} + {{case select}} + {{if !empty($element['element_data']) and is_array($element['element_data'])}} + + {{/if}} + {{/case}} + {{case textarea}} + + {{/case}} + {{/switch}} +
+ {{/foreach}} + {{/if}} +
+ {{/foreach}} + +
+ + +
+ {{else /}} +
没有扩展数据
+ {{/if}} +
+
+
+
+ {{include file="public/footer" /}}