Browse Source

sunguidong

zhangguidong 2 years ago
parent
commit
995fca8503
2 changed files with 17 additions and 0 deletions
  1. 6 0
      app/admin/controller/Shop.php
  2. 11 0
      app/admin/view/shop/add_shop.html

+ 6 - 0
app/admin/controller/Shop.php

@@ -12,6 +12,7 @@
 
 namespace app\admin\controller;
 
+use app\model\goods\GoodsBrand as GoodsBrandModel;
 use app\model\shop\Shop as ShopModel;
 use app\model\shop\ShopAccount;
 use app\model\shop\ShopCategory as ShopCategoryModel;
@@ -206,6 +207,11 @@ class Shop extends BaseAdmin
             $shop_category_list = $shop_category_model->getCategoryList([], 'category_id, category_name', 'sort asc');
             $this->assign('shop_category_list', $shop_category_list['data']);
 
+            //商品品牌
+            $goods_brand_model = new GoodsBrandModel();
+            $brand_list = $goods_brand_model->getBrandList([ [ 'site_id', 'in', ("0,$this->site_id") ] ], "brand_id, brand_name");
+            $brand_list = $brand_list['data'];
+            $this->assign("brand_list", $brand_list);
             //商家主营行业
             $shop_group_model = new ShopGroupModel();
             $shop_group_list = $shop_group_model->getGroupList([['is_own','=',0]], 'group_id,is_own,group_name,fee,remark', 'is_own asc,fee asc');

+ 11 - 0
app/admin/view/shop/add_shop.html

@@ -46,6 +46,17 @@
 					</select>
 				</div>
 			</div>
+			<div class="layui-form-item">
+				<label class="layui-form-label"><span class="required">*</span>关联品牌:</label>
+				<div class="layui-input-block ns-len-mid">
+					<select class="ns-category" name="brand_id" lay-verify="required">
+						<option value="">选择主营行业</option>
+						{volist name="$brand_list" id="brand"}
+						<option value="{$brand.brand_id}">{$brand.brand_name}</option>
+						{/volist}
+					</select>
+				</div>
+			</div>
 
 			<!--是否为自营-->
 			<div class="layui-form-item">