|
|
|
@ -34,18 +34,14 @@ class GoodsActivityController extends AdminController |
|
|
|
$marketId = Auth::getMarket(); |
|
|
|
$build = new \App\Models\v3\GoodsActivity(); |
|
|
|
if ($marketId){ |
|
|
|
//$build = new \App\Models\v3\Goods();
|
|
|
|
$build = $build::where('market_id',$marketId); |
|
|
|
$storeList = StoreModel::getStoreArray([['market_id','=',$marketId]]); |
|
|
|
}else{ |
|
|
|
//$build = new GoodsActivity();
|
|
|
|
$storeList = StoreModel::getStoreArray([['market_id','=',$marketId]]); |
|
|
|
} |
|
|
|
return Grid::make($build, function (Grid $grid) use($storeList){ |
|
|
|
// 二级分类
|
|
|
|
$categoryList = CategoryModel::getArray([['parent_id','>',0]],['选择分类'=>0]); |
|
|
|
// 店铺
|
|
|
|
// $storeList = StoreModel::getStoreArray();
|
|
|
|
// 商品类目
|
|
|
|
$goodsCategoryList = GoodsCategoryModel::getArray([],['选择类目'=>0]); |
|
|
|
//市场
|
|
|
|
@ -71,10 +67,10 @@ class GoodsActivityController extends AdminController |
|
|
|
$item = CategoryModel::getInfo($categoryId,'title'); |
|
|
|
return empty($item) ? '' : $item->title; |
|
|
|
}); |
|
|
|
// $grid->goods_category_id->display(function ($goodsCategoryId){
|
|
|
|
// $item = GoodsCategoryModel::getInfo($goodsCategoryId,'title');
|
|
|
|
// return empty($item) ? '' : $item->title;
|
|
|
|
// });
|
|
|
|
$grid->goods_category_id->display(function ($goodsCategoryId){ |
|
|
|
$item = GoodsCategoryModel::getInfo($goodsCategoryId,'title'); |
|
|
|
return empty($item) ? '' : $item->title; |
|
|
|
}); |
|
|
|
$grid->column('expire_time_text'); |
|
|
|
$grid->column('sales'); |
|
|
|
$grid->column('on_sale')->switch(); |
|
|
|
|