6
0
Fork 0

添加商品分区管理

release
vine_liutk 2021-12-04 11:47:57 +08:00
parent 3ee8257dfc
commit 0f877e7cbb
9 changed files with 353 additions and 183 deletions

View File

@ -2,7 +2,6 @@
namespace App\Admin\Controllers; namespace App\Admin\Controllers;
use App\Admin\Renderable\ProductAttrTable;
use App\Admin\Repositories\ProductGroup; use App\Admin\Repositories\ProductGroup;
use App\Models\ProductGroup as ProductGroupModel; use App\Models\ProductGroup as ProductGroupModel;
use Dcat\Admin\Admin; use Dcat\Admin\Admin;
@ -92,8 +91,6 @@ class ProductGroupController extends AdminController
$table->text('title'); $table->text('title');
$table->textarea('value'); $table->textarea('value');
}); });
// $form->multipleSelectTable('attrs')
// ->from(ProductAttrTable::make(['id'=>$form->getKey()]));
$form->display('created_at'); $form->display('created_at');
$form->display('updated_at'); $form->display('updated_at');

View File

@ -0,0 +1,125 @@
<?php
namespace App\Admin\Controllers;
use App\Admin\Renderable\ProductSkuTable;
use App\Admin\Repositories\ProductPart;
use App\Models\ProductSku;
use Dcat\Admin\Admin;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Grid\Column;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Show;
class ProductPartController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new ProductPart(), function (Grid $grid) {
$grid->column('id')->sortable();
$grid->column('key');
$grid->column('name');
// $grid->column('')
$grid->column('is_show')
->if(function () {
return Admin::user()->can('dcat.admin.product_parts.edit');
})
->then(function (Column $column) {
$column->switch();
})
->else(function (Column $column) {
$column->bool();
});
$grid->column('created_at');
$grid->column('updated_at')->sortable();
//排序
$grid->model()->orderBy('created_at', 'desc');
/** 操作 **/
//新增
if (Admin::user()->can('dcat.admin.product_parts.create')) {
$grid->disableCreateButton(false);
$grid->enableDialogCreate();
}
//修改
$grid->showQuickEditButton(Admin::user()->can('dcat.admin.product_parts.edit'));
//删除以及自定义操作
$grid->actions(function (Grid\Displayers\Actions $actions) {
$actions->disableDelete(Admin::user()->cannot('dcat.admin.product_parts.destroy'));
});
/** 查询 **/
$grid->filter(function (Grid\Filter $filter) {
$filter->panel();
$filter->like('name')->width(3);
});
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new ProductPart(), function (Show $show) {
$show->field('id');
$show->field('key');
$show->field('name');
$show->field('is_show');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
$builder = ProductPart::with(['partSkus']);
return Form::make($builder, function (Form $form) {
$form->display('id');
$form->text('key')->rules(function (Form $form) {
return 'unique:product_parts,key,'.$form->model()->id.',id';
})->required();
$form->text('name');
if ($form->isCreating()) {
$form->multipleSelectTable('skus')
->from(ProductSkuTable::make())
->model(ProductSku::class, 'id', 'name');
} else {
$form->hasMany('partSkus', function (Form\NestedForm $form) {
$form->select('sku_id')->options(function ($id) {
$sku = ProductSku::find($id);
if ($sku) {
return [$sku->id => $sku->name];
}
})->ajax(admin_route('api.product_skus'));
$form->number('sort')->default(0);
});
}
$form->switch('is_show')->default(0);
$form->display('created_at');
$form->display('updated_at');
});
}
}

View File

@ -202,9 +202,14 @@ class ProductSkuController extends AdminController
public function skus(Request $request) public function skus(Request $request)
{ {
$name = $request->input('q'); $name = $request->input('q');
$query = ProductSkuModel::select('id', 'name as text')->where('name', 'like', "%$name%");
$data = $query->get(); $query = ProductSkuModel::select('id', 'name as text');
return response()->json($data);
if ($name) {
$query->where('name', 'like', "%$name%");
return $query->paginate(null);
}
return response()->json($query->get());
} }
} }

View File

@ -2,19 +2,19 @@
namespace App\Admin\Renderable; namespace App\Admin\Renderable;
use App\Models\ProductAttr; use App\Models\ProductSku;
use Dcat\Admin\Grid; use Dcat\Admin\Grid;
use Dcat\Admin\Grid\LazyRenderable; use Dcat\Admin\Grid\LazyRenderable;
class ProductAttrTable extends LazyRenderable class ProductSkuTable extends LazyRenderable
{ {
public function grid(): Grid public function grid(): Grid
{ {
$id = $this->id; $id = $this->id;
return Grid::make(new ProductAttr(), function (Grid $grid) { // $builder = ProductSku::where('id', $id);
return Grid::make(new ProductSku(), function (Grid $grid) {
$grid->disableRowSelector(false); $grid->disableRowSelector(false);
$grid->column('name'); $grid->column('name');
$grid->column('attrs')->label();
$grid->quickSearch(['name']); $grid->quickSearch(['name']);
$grid->disableActions(); $grid->disableActions();
}); });

View File

@ -0,0 +1,16 @@
<?php
namespace App\Admin\Repositories;
use App\Models\ProductPart as Model;
use Dcat\Admin\Repositories\EloquentRepository;
class ProductPart extends EloquentRepository
{
/**
* Model.
*
* @var string
*/
protected $eloquentClass = Model::class;
}

View File

@ -58,6 +58,10 @@ Route::group([
'index', 'edit', 'update', 'destroy', 'index', 'edit', 'update', 'destroy',
])->names('product_sku_verifies'); ])->names('product_sku_verifies');
$router->resource('product-parts', 'ProductPartController')->only([
'index', 'create', 'store', 'edit', 'update', 'destroy',
])->names('product_parts');
$router->resource('users', 'UserController'); $router->resource('users', 'UserController');
$router->resource('vips', 'VipController'); $router->resource('vips', 'VipController');

View File

@ -2,6 +2,7 @@
namespace App\Models; namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -9,6 +10,7 @@ class ProductPart extends Model
{ {
use Concerns\HasShowable; use Concerns\HasShowable;
use HasFactory; use HasFactory;
use HasDateTimeFormatter;
/** /**
* @var array * @var array
@ -33,11 +35,21 @@ class ProductPart extends Model
'is_show' => 'bool', 'is_show' => 'bool',
]; ];
/**
* 属于此分区的商品关系
*
* @return void
*/
public function partSkus()
{
return $this->hasMany(ProductPartSku::class, 'part_id');
}
/** /**
* 属于此分区的商品 * 属于此分区的商品
*/ */
public function skus() public function skus()
{ {
return $this->belongsToMany(ProductSku::class, ProductPartSku::class, 'part_id', 'sku_id'); return $this->belongsToMany(ProductSku::class, ProductPartSku::class, 'part_id', 'sku_id')->withTimestamps();
} }
} }

View File

@ -12,57 +12,57 @@ namespace Dcat\Admin {
/** /**
* @property Grid\Column|Collection id * @property Grid\Column|Collection id
* @property Grid\Column|Collection created_at
* @property Grid\Column|Collection dimensions
* @property Grid\Column|Collection is_show
* @property Grid\Column|Collection key * @property Grid\Column|Collection key
* @property Grid\Column|Collection name * @property Grid\Column|Collection name
* @property Grid\Column|Collection dimensions
* @property Grid\Column|Collection is_show
* @property Grid\Column|Collection created_at
* @property Grid\Column|Collection updated_at * @property Grid\Column|Collection updated_at
* @property Grid\Column|Collection detail
* @property Grid\Column|Collection type * @property Grid\Column|Collection type
* @property Grid\Column|Collection version * @property Grid\Column|Collection version
* @property Grid\Column|Collection detail
* @property Grid\Column|Collection is_enabled * @property Grid\Column|Collection is_enabled
* @property Grid\Column|Collection extension
* @property Grid\Column|Collection icon
* @property Grid\Column|Collection order
* @property Grid\Column|Collection parent_id * @property Grid\Column|Collection parent_id
* @property Grid\Column|Collection order
* @property Grid\Column|Collection icon
* @property Grid\Column|Collection uri * @property Grid\Column|Collection uri
* @property Grid\Column|Collection menu_id * @property Grid\Column|Collection extension
* @property Grid\Column|Collection permission_id * @property Grid\Column|Collection permission_id
* @property Grid\Column|Collection menu_id
* @property Grid\Column|Collection slug
* @property Grid\Column|Collection http_method * @property Grid\Column|Collection http_method
* @property Grid\Column|Collection http_path * @property Grid\Column|Collection http_path
* @property Grid\Column|Collection slug
* @property Grid\Column|Collection role_id * @property Grid\Column|Collection role_id
* @property Grid\Column|Collection user_id * @property Grid\Column|Collection user_id
* @property Grid\Column|Collection value * @property Grid\Column|Collection value
* @property Grid\Column|Collection avatar
* @property Grid\Column|Collection password
* @property Grid\Column|Collection remember_token
* @property Grid\Column|Collection username * @property Grid\Column|Collection username
* @property Grid\Column|Collection password
* @property Grid\Column|Collection avatar
* @property Grid\Column|Collection remember_token
* @property Grid\Column|Collection address_id * @property Grid\Column|Collection address_id
* @property Grid\Column|Collection image * @property Grid\Column|Collection image
* @property Grid\Column|Collection jump_link
* @property Grid\Column|Collection jump_type
* @property Grid\Column|Collection sort * @property Grid\Column|Collection sort
* @property Grid\Column|Collection jump_type
* @property Grid\Column|Collection jump_link
* @property Grid\Column|Collection is_recommend
* @property Grid\Column|Collection _lft * @property Grid\Column|Collection _lft
* @property Grid\Column|Collection _rgt * @property Grid\Column|Collection _rgt
* @property Grid\Column|Collection is_recommend
* @property Grid\Column|Collection author_name
* @property Grid\Column|Collection category_id * @property Grid\Column|Collection category_id
* @property Grid\Column|Collection content * @property Grid\Column|Collection author_name
* @property Grid\Column|Collection cover
* @property Grid\Column|Collection subtitle * @property Grid\Column|Collection subtitle
* @property Grid\Column|Collection cover
* @property Grid\Column|Collection content
* @property Grid\Column|Collection uuid
* @property Grid\Column|Collection connection * @property Grid\Column|Collection connection
* @property Grid\Column|Collection queue
* @property Grid\Column|Collection payload
* @property Grid\Column|Collection exception * @property Grid\Column|Collection exception
* @property Grid\Column|Collection failed_at * @property Grid\Column|Collection failed_at
* @property Grid\Column|Collection payload * @property Grid\Column|Collection tokenable_type
* @property Grid\Column|Collection queue * @property Grid\Column|Collection tokenable_id
* @property Grid\Column|Collection uuid * @property Grid\Column|Collection token
* @property Grid\Column|Collection abilities * @property Grid\Column|Collection abilities
* @property Grid\Column|Collection last_used_at * @property Grid\Column|Collection last_used_at
* @property Grid\Column|Collection token
* @property Grid\Column|Collection tokenable_id
* @property Grid\Column|Collection tokenable_type
* @property Grid\Column|Collection remarks * @property Grid\Column|Collection remarks
* @property Grid\Column|Collection attrs * @property Grid\Column|Collection attrs
* @property Grid\Column|Collection specs * @property Grid\Column|Collection specs
@ -70,94 +70,92 @@ namespace Dcat\Admin {
* @property Grid\Column|Collection sku_id * @property Grid\Column|Collection sku_id
* @property Grid\Column|Collection spu_id * @property Grid\Column|Collection spu_id
* @property Grid\Column|Collection status * @property Grid\Column|Collection status
* @property Grid\Column|Collection buynote_id
* @property Grid\Column|Collection cost_price
* @property Grid\Column|Collection images * @property Grid\Column|Collection images
* @property Grid\Column|Collection market_price
* @property Grid\Column|Collection media
* @property Grid\Column|Collection release_at
* @property Grid\Column|Collection sales
* @property Grid\Column|Collection sell_price * @property Grid\Column|Collection sell_price
* @property Grid\Column|Collection stock * @property Grid\Column|Collection market_price
* @property Grid\Column|Collection verify_state * @property Grid\Column|Collection cost_price
* @property Grid\Column|Collection vip_price * @property Grid\Column|Collection vip_price
* @property Grid\Column|Collection media
* @property Grid\Column|Collection weight * @property Grid\Column|Collection weight
* @property Grid\Column|Collection stock
* @property Grid\Column|Collection sales
* @property Grid\Column|Collection release_at
* @property Grid\Column|Collection verify_state
* @property Grid\Column|Collection buynote_id
* @property Grid\Column|Collection feature_id * @property Grid\Column|Collection feature_id
* @property Grid\Column|Collection items
* @property Grid\Column|Collection product_spu_id * @property Grid\Column|Collection product_spu_id
* @property Grid\Column|Collection items
* @property Grid\Column|Collection view_date * @property Grid\Column|Collection view_date
* @property Grid\Column|Collection code
* @property Grid\Column|Collection expires_at
* @property Grid\Column|Collection is_use
* @property Grid\Column|Collection phone * @property Grid\Column|Collection phone
* @property Grid\Column|Collection birthday * @property Grid\Column|Collection code
* @property Grid\Column|Collection gender * @property Grid\Column|Collection is_use
* @property Grid\Column|Collection expires_at
* @property Grid\Column|Collection inviter_id * @property Grid\Column|Collection inviter_id
* @property Grid\Column|Collection nickname * @property Grid\Column|Collection nickname
* @property Grid\Column|Collection grow_value * @property Grid\Column|Collection gender
* @property Grid\Column|Collection birthday
* @property Grid\Column|Collection vip_id * @property Grid\Column|Collection vip_id
* @property Grid\Column|Collection growth_value
* @property Grid\Column|Collection phone_verified_at
* @property Grid\Column|Collection email * @property Grid\Column|Collection email
* @property Grid\Column|Collection email_verified_at * @property Grid\Column|Collection email_verified_at
* @property Grid\Column|Collection last_login_at
* @property Grid\Column|Collection last_login_ip * @property Grid\Column|Collection last_login_ip
* @property Grid\Column|Collection phone_verified_at * @property Grid\Column|Collection last_login_at
* @property Grid\Column|Collection register_ip * @property Grid\Column|Collection register_ip
* @property Grid\Column|Collection status_remark * @property Grid\Column|Collection status_remark
* @property Grid\Column|Collection vip_growth_value
* @property Grid\Column|Collection vip_name
* *
* @method Grid\Column|Collection id(string $label = null) * @method Grid\Column|Collection id(string $label = null)
* @method Grid\Column|Collection created_at(string $label = null)
* @method Grid\Column|Collection dimensions(string $label = null)
* @method Grid\Column|Collection is_show(string $label = null)
* @method Grid\Column|Collection key(string $label = null) * @method Grid\Column|Collection key(string $label = null)
* @method Grid\Column|Collection name(string $label = null) * @method Grid\Column|Collection name(string $label = null)
* @method Grid\Column|Collection dimensions(string $label = null)
* @method Grid\Column|Collection is_show(string $label = null)
* @method Grid\Column|Collection created_at(string $label = null)
* @method Grid\Column|Collection updated_at(string $label = null) * @method Grid\Column|Collection updated_at(string $label = null)
* @method Grid\Column|Collection detail(string $label = null)
* @method Grid\Column|Collection type(string $label = null) * @method Grid\Column|Collection type(string $label = null)
* @method Grid\Column|Collection version(string $label = null) * @method Grid\Column|Collection version(string $label = null)
* @method Grid\Column|Collection detail(string $label = null)
* @method Grid\Column|Collection is_enabled(string $label = null) * @method Grid\Column|Collection is_enabled(string $label = null)
* @method Grid\Column|Collection extension(string $label = null)
* @method Grid\Column|Collection icon(string $label = null)
* @method Grid\Column|Collection order(string $label = null)
* @method Grid\Column|Collection parent_id(string $label = null) * @method Grid\Column|Collection parent_id(string $label = null)
* @method Grid\Column|Collection order(string $label = null)
* @method Grid\Column|Collection icon(string $label = null)
* @method Grid\Column|Collection uri(string $label = null) * @method Grid\Column|Collection uri(string $label = null)
* @method Grid\Column|Collection menu_id(string $label = null) * @method Grid\Column|Collection extension(string $label = null)
* @method Grid\Column|Collection permission_id(string $label = null) * @method Grid\Column|Collection permission_id(string $label = null)
* @method Grid\Column|Collection menu_id(string $label = null)
* @method Grid\Column|Collection slug(string $label = null)
* @method Grid\Column|Collection http_method(string $label = null) * @method Grid\Column|Collection http_method(string $label = null)
* @method Grid\Column|Collection http_path(string $label = null) * @method Grid\Column|Collection http_path(string $label = null)
* @method Grid\Column|Collection slug(string $label = null)
* @method Grid\Column|Collection role_id(string $label = null) * @method Grid\Column|Collection role_id(string $label = null)
* @method Grid\Column|Collection user_id(string $label = null) * @method Grid\Column|Collection user_id(string $label = null)
* @method Grid\Column|Collection value(string $label = null) * @method Grid\Column|Collection value(string $label = null)
* @method Grid\Column|Collection avatar(string $label = null)
* @method Grid\Column|Collection password(string $label = null)
* @method Grid\Column|Collection remember_token(string $label = null)
* @method Grid\Column|Collection username(string $label = null) * @method Grid\Column|Collection username(string $label = null)
* @method Grid\Column|Collection password(string $label = null)
* @method Grid\Column|Collection avatar(string $label = null)
* @method Grid\Column|Collection remember_token(string $label = null)
* @method Grid\Column|Collection address_id(string $label = null) * @method Grid\Column|Collection address_id(string $label = null)
* @method Grid\Column|Collection image(string $label = null) * @method Grid\Column|Collection image(string $label = null)
* @method Grid\Column|Collection jump_link(string $label = null)
* @method Grid\Column|Collection jump_type(string $label = null)
* @method Grid\Column|Collection sort(string $label = null) * @method Grid\Column|Collection sort(string $label = null)
* @method Grid\Column|Collection jump_type(string $label = null)
* @method Grid\Column|Collection jump_link(string $label = null)
* @method Grid\Column|Collection is_recommend(string $label = null)
* @method Grid\Column|Collection _lft(string $label = null) * @method Grid\Column|Collection _lft(string $label = null)
* @method Grid\Column|Collection _rgt(string $label = null) * @method Grid\Column|Collection _rgt(string $label = null)
* @method Grid\Column|Collection is_recommend(string $label = null)
* @method Grid\Column|Collection author_name(string $label = null)
* @method Grid\Column|Collection category_id(string $label = null) * @method Grid\Column|Collection category_id(string $label = null)
* @method Grid\Column|Collection content(string $label = null) * @method Grid\Column|Collection author_name(string $label = null)
* @method Grid\Column|Collection cover(string $label = null)
* @method Grid\Column|Collection subtitle(string $label = null) * @method Grid\Column|Collection subtitle(string $label = null)
* @method Grid\Column|Collection cover(string $label = null)
* @method Grid\Column|Collection content(string $label = null)
* @method Grid\Column|Collection uuid(string $label = null)
* @method Grid\Column|Collection connection(string $label = null) * @method Grid\Column|Collection connection(string $label = null)
* @method Grid\Column|Collection queue(string $label = null)
* @method Grid\Column|Collection payload(string $label = null)
* @method Grid\Column|Collection exception(string $label = null) * @method Grid\Column|Collection exception(string $label = null)
* @method Grid\Column|Collection failed_at(string $label = null) * @method Grid\Column|Collection failed_at(string $label = null)
* @method Grid\Column|Collection payload(string $label = null) * @method Grid\Column|Collection tokenable_type(string $label = null)
* @method Grid\Column|Collection queue(string $label = null) * @method Grid\Column|Collection tokenable_id(string $label = null)
* @method Grid\Column|Collection uuid(string $label = null) * @method Grid\Column|Collection token(string $label = null)
* @method Grid\Column|Collection abilities(string $label = null) * @method Grid\Column|Collection abilities(string $label = null)
* @method Grid\Column|Collection last_used_at(string $label = null) * @method Grid\Column|Collection last_used_at(string $label = null)
* @method Grid\Column|Collection token(string $label = null)
* @method Grid\Column|Collection tokenable_id(string $label = null)
* @method Grid\Column|Collection tokenable_type(string $label = null)
* @method Grid\Column|Collection remarks(string $label = null) * @method Grid\Column|Collection remarks(string $label = null)
* @method Grid\Column|Collection attrs(string $label = null) * @method Grid\Column|Collection attrs(string $label = null)
* @method Grid\Column|Collection specs(string $label = null) * @method Grid\Column|Collection specs(string $label = null)
@ -165,41 +163,39 @@ namespace Dcat\Admin {
* @method Grid\Column|Collection sku_id(string $label = null) * @method Grid\Column|Collection sku_id(string $label = null)
* @method Grid\Column|Collection spu_id(string $label = null) * @method Grid\Column|Collection spu_id(string $label = null)
* @method Grid\Column|Collection status(string $label = null) * @method Grid\Column|Collection status(string $label = null)
* @method Grid\Column|Collection buynote_id(string $label = null)
* @method Grid\Column|Collection cost_price(string $label = null)
* @method Grid\Column|Collection images(string $label = null) * @method Grid\Column|Collection images(string $label = null)
* @method Grid\Column|Collection market_price(string $label = null)
* @method Grid\Column|Collection media(string $label = null)
* @method Grid\Column|Collection release_at(string $label = null)
* @method Grid\Column|Collection sales(string $label = null)
* @method Grid\Column|Collection sell_price(string $label = null) * @method Grid\Column|Collection sell_price(string $label = null)
* @method Grid\Column|Collection stock(string $label = null) * @method Grid\Column|Collection market_price(string $label = null)
* @method Grid\Column|Collection verify_state(string $label = null) * @method Grid\Column|Collection cost_price(string $label = null)
* @method Grid\Column|Collection vip_price(string $label = null) * @method Grid\Column|Collection vip_price(string $label = null)
* @method Grid\Column|Collection media(string $label = null)
* @method Grid\Column|Collection weight(string $label = null) * @method Grid\Column|Collection weight(string $label = null)
* @method Grid\Column|Collection stock(string $label = null)
* @method Grid\Column|Collection sales(string $label = null)
* @method Grid\Column|Collection release_at(string $label = null)
* @method Grid\Column|Collection verify_state(string $label = null)
* @method Grid\Column|Collection buynote_id(string $label = null)
* @method Grid\Column|Collection feature_id(string $label = null) * @method Grid\Column|Collection feature_id(string $label = null)
* @method Grid\Column|Collection items(string $label = null)
* @method Grid\Column|Collection product_spu_id(string $label = null) * @method Grid\Column|Collection product_spu_id(string $label = null)
* @method Grid\Column|Collection items(string $label = null)
* @method Grid\Column|Collection view_date(string $label = null) * @method Grid\Column|Collection view_date(string $label = null)
* @method Grid\Column|Collection code(string $label = null)
* @method Grid\Column|Collection expires_at(string $label = null)
* @method Grid\Column|Collection is_use(string $label = null)
* @method Grid\Column|Collection phone(string $label = null) * @method Grid\Column|Collection phone(string $label = null)
* @method Grid\Column|Collection birthday(string $label = null) * @method Grid\Column|Collection code(string $label = null)
* @method Grid\Column|Collection gender(string $label = null) * @method Grid\Column|Collection is_use(string $label = null)
* @method Grid\Column|Collection expires_at(string $label = null)
* @method Grid\Column|Collection inviter_id(string $label = null) * @method Grid\Column|Collection inviter_id(string $label = null)
* @method Grid\Column|Collection nickname(string $label = null) * @method Grid\Column|Collection nickname(string $label = null)
* @method Grid\Column|Collection grow_value(string $label = null) * @method Grid\Column|Collection gender(string $label = null)
* @method Grid\Column|Collection birthday(string $label = null)
* @method Grid\Column|Collection vip_id(string $label = null) * @method Grid\Column|Collection vip_id(string $label = null)
* @method Grid\Column|Collection growth_value(string $label = null)
* @method Grid\Column|Collection phone_verified_at(string $label = null)
* @method Grid\Column|Collection email(string $label = null) * @method Grid\Column|Collection email(string $label = null)
* @method Grid\Column|Collection email_verified_at(string $label = null) * @method Grid\Column|Collection email_verified_at(string $label = null)
* @method Grid\Column|Collection last_login_at(string $label = null)
* @method Grid\Column|Collection last_login_ip(string $label = null) * @method Grid\Column|Collection last_login_ip(string $label = null)
* @method Grid\Column|Collection phone_verified_at(string $label = null) * @method Grid\Column|Collection last_login_at(string $label = null)
* @method Grid\Column|Collection register_ip(string $label = null) * @method Grid\Column|Collection register_ip(string $label = null)
* @method Grid\Column|Collection status_remark(string $label = null) * @method Grid\Column|Collection status_remark(string $label = null)
* @method Grid\Column|Collection vip_growth_value(string $label = null)
* @method Grid\Column|Collection vip_name(string $label = null)
*/ */
class Grid {} class Grid {}
@ -207,57 +203,57 @@ namespace Dcat\Admin {
/** /**
* @property Show\Field|Collection id * @property Show\Field|Collection id
* @property Show\Field|Collection created_at
* @property Show\Field|Collection dimensions
* @property Show\Field|Collection is_show
* @property Show\Field|Collection key * @property Show\Field|Collection key
* @property Show\Field|Collection name * @property Show\Field|Collection name
* @property Show\Field|Collection dimensions
* @property Show\Field|Collection is_show
* @property Show\Field|Collection created_at
* @property Show\Field|Collection updated_at * @property Show\Field|Collection updated_at
* @property Show\Field|Collection detail
* @property Show\Field|Collection type * @property Show\Field|Collection type
* @property Show\Field|Collection version * @property Show\Field|Collection version
* @property Show\Field|Collection detail
* @property Show\Field|Collection is_enabled * @property Show\Field|Collection is_enabled
* @property Show\Field|Collection extension
* @property Show\Field|Collection icon
* @property Show\Field|Collection order
* @property Show\Field|Collection parent_id * @property Show\Field|Collection parent_id
* @property Show\Field|Collection order
* @property Show\Field|Collection icon
* @property Show\Field|Collection uri * @property Show\Field|Collection uri
* @property Show\Field|Collection menu_id * @property Show\Field|Collection extension
* @property Show\Field|Collection permission_id * @property Show\Field|Collection permission_id
* @property Show\Field|Collection menu_id
* @property Show\Field|Collection slug
* @property Show\Field|Collection http_method * @property Show\Field|Collection http_method
* @property Show\Field|Collection http_path * @property Show\Field|Collection http_path
* @property Show\Field|Collection slug
* @property Show\Field|Collection role_id * @property Show\Field|Collection role_id
* @property Show\Field|Collection user_id * @property Show\Field|Collection user_id
* @property Show\Field|Collection value * @property Show\Field|Collection value
* @property Show\Field|Collection avatar
* @property Show\Field|Collection password
* @property Show\Field|Collection remember_token
* @property Show\Field|Collection username * @property Show\Field|Collection username
* @property Show\Field|Collection password
* @property Show\Field|Collection avatar
* @property Show\Field|Collection remember_token
* @property Show\Field|Collection address_id * @property Show\Field|Collection address_id
* @property Show\Field|Collection image * @property Show\Field|Collection image
* @property Show\Field|Collection jump_link
* @property Show\Field|Collection jump_type
* @property Show\Field|Collection sort * @property Show\Field|Collection sort
* @property Show\Field|Collection jump_type
* @property Show\Field|Collection jump_link
* @property Show\Field|Collection is_recommend
* @property Show\Field|Collection _lft * @property Show\Field|Collection _lft
* @property Show\Field|Collection _rgt * @property Show\Field|Collection _rgt
* @property Show\Field|Collection is_recommend
* @property Show\Field|Collection author_name
* @property Show\Field|Collection category_id * @property Show\Field|Collection category_id
* @property Show\Field|Collection content * @property Show\Field|Collection author_name
* @property Show\Field|Collection cover
* @property Show\Field|Collection subtitle * @property Show\Field|Collection subtitle
* @property Show\Field|Collection cover
* @property Show\Field|Collection content
* @property Show\Field|Collection uuid
* @property Show\Field|Collection connection * @property Show\Field|Collection connection
* @property Show\Field|Collection queue
* @property Show\Field|Collection payload
* @property Show\Field|Collection exception * @property Show\Field|Collection exception
* @property Show\Field|Collection failed_at * @property Show\Field|Collection failed_at
* @property Show\Field|Collection payload * @property Show\Field|Collection tokenable_type
* @property Show\Field|Collection queue * @property Show\Field|Collection tokenable_id
* @property Show\Field|Collection uuid * @property Show\Field|Collection token
* @property Show\Field|Collection abilities * @property Show\Field|Collection abilities
* @property Show\Field|Collection last_used_at * @property Show\Field|Collection last_used_at
* @property Show\Field|Collection token
* @property Show\Field|Collection tokenable_id
* @property Show\Field|Collection tokenable_type
* @property Show\Field|Collection remarks * @property Show\Field|Collection remarks
* @property Show\Field|Collection attrs * @property Show\Field|Collection attrs
* @property Show\Field|Collection specs * @property Show\Field|Collection specs
@ -265,94 +261,92 @@ namespace Dcat\Admin {
* @property Show\Field|Collection sku_id * @property Show\Field|Collection sku_id
* @property Show\Field|Collection spu_id * @property Show\Field|Collection spu_id
* @property Show\Field|Collection status * @property Show\Field|Collection status
* @property Show\Field|Collection buynote_id
* @property Show\Field|Collection cost_price
* @property Show\Field|Collection images * @property Show\Field|Collection images
* @property Show\Field|Collection market_price
* @property Show\Field|Collection media
* @property Show\Field|Collection release_at
* @property Show\Field|Collection sales
* @property Show\Field|Collection sell_price * @property Show\Field|Collection sell_price
* @property Show\Field|Collection stock * @property Show\Field|Collection market_price
* @property Show\Field|Collection verify_state * @property Show\Field|Collection cost_price
* @property Show\Field|Collection vip_price * @property Show\Field|Collection vip_price
* @property Show\Field|Collection media
* @property Show\Field|Collection weight * @property Show\Field|Collection weight
* @property Show\Field|Collection stock
* @property Show\Field|Collection sales
* @property Show\Field|Collection release_at
* @property Show\Field|Collection verify_state
* @property Show\Field|Collection buynote_id
* @property Show\Field|Collection feature_id * @property Show\Field|Collection feature_id
* @property Show\Field|Collection items
* @property Show\Field|Collection product_spu_id * @property Show\Field|Collection product_spu_id
* @property Show\Field|Collection items
* @property Show\Field|Collection view_date * @property Show\Field|Collection view_date
* @property Show\Field|Collection code
* @property Show\Field|Collection expires_at
* @property Show\Field|Collection is_use
* @property Show\Field|Collection phone * @property Show\Field|Collection phone
* @property Show\Field|Collection birthday * @property Show\Field|Collection code
* @property Show\Field|Collection gender * @property Show\Field|Collection is_use
* @property Show\Field|Collection expires_at
* @property Show\Field|Collection inviter_id * @property Show\Field|Collection inviter_id
* @property Show\Field|Collection nickname * @property Show\Field|Collection nickname
* @property Show\Field|Collection grow_value * @property Show\Field|Collection gender
* @property Show\Field|Collection birthday
* @property Show\Field|Collection vip_id * @property Show\Field|Collection vip_id
* @property Show\Field|Collection growth_value
* @property Show\Field|Collection phone_verified_at
* @property Show\Field|Collection email * @property Show\Field|Collection email
* @property Show\Field|Collection email_verified_at * @property Show\Field|Collection email_verified_at
* @property Show\Field|Collection last_login_at
* @property Show\Field|Collection last_login_ip * @property Show\Field|Collection last_login_ip
* @property Show\Field|Collection phone_verified_at * @property Show\Field|Collection last_login_at
* @property Show\Field|Collection register_ip * @property Show\Field|Collection register_ip
* @property Show\Field|Collection status_remark * @property Show\Field|Collection status_remark
* @property Show\Field|Collection vip_growth_value
* @property Show\Field|Collection vip_name
* *
* @method Show\Field|Collection id(string $label = null) * @method Show\Field|Collection id(string $label = null)
* @method Show\Field|Collection created_at(string $label = null)
* @method Show\Field|Collection dimensions(string $label = null)
* @method Show\Field|Collection is_show(string $label = null)
* @method Show\Field|Collection key(string $label = null) * @method Show\Field|Collection key(string $label = null)
* @method Show\Field|Collection name(string $label = null) * @method Show\Field|Collection name(string $label = null)
* @method Show\Field|Collection dimensions(string $label = null)
* @method Show\Field|Collection is_show(string $label = null)
* @method Show\Field|Collection created_at(string $label = null)
* @method Show\Field|Collection updated_at(string $label = null) * @method Show\Field|Collection updated_at(string $label = null)
* @method Show\Field|Collection detail(string $label = null)
* @method Show\Field|Collection type(string $label = null) * @method Show\Field|Collection type(string $label = null)
* @method Show\Field|Collection version(string $label = null) * @method Show\Field|Collection version(string $label = null)
* @method Show\Field|Collection detail(string $label = null)
* @method Show\Field|Collection is_enabled(string $label = null) * @method Show\Field|Collection is_enabled(string $label = null)
* @method Show\Field|Collection extension(string $label = null)
* @method Show\Field|Collection icon(string $label = null)
* @method Show\Field|Collection order(string $label = null)
* @method Show\Field|Collection parent_id(string $label = null) * @method Show\Field|Collection parent_id(string $label = null)
* @method Show\Field|Collection order(string $label = null)
* @method Show\Field|Collection icon(string $label = null)
* @method Show\Field|Collection uri(string $label = null) * @method Show\Field|Collection uri(string $label = null)
* @method Show\Field|Collection menu_id(string $label = null) * @method Show\Field|Collection extension(string $label = null)
* @method Show\Field|Collection permission_id(string $label = null) * @method Show\Field|Collection permission_id(string $label = null)
* @method Show\Field|Collection menu_id(string $label = null)
* @method Show\Field|Collection slug(string $label = null)
* @method Show\Field|Collection http_method(string $label = null) * @method Show\Field|Collection http_method(string $label = null)
* @method Show\Field|Collection http_path(string $label = null) * @method Show\Field|Collection http_path(string $label = null)
* @method Show\Field|Collection slug(string $label = null)
* @method Show\Field|Collection role_id(string $label = null) * @method Show\Field|Collection role_id(string $label = null)
* @method Show\Field|Collection user_id(string $label = null) * @method Show\Field|Collection user_id(string $label = null)
* @method Show\Field|Collection value(string $label = null) * @method Show\Field|Collection value(string $label = null)
* @method Show\Field|Collection avatar(string $label = null)
* @method Show\Field|Collection password(string $label = null)
* @method Show\Field|Collection remember_token(string $label = null)
* @method Show\Field|Collection username(string $label = null) * @method Show\Field|Collection username(string $label = null)
* @method Show\Field|Collection password(string $label = null)
* @method Show\Field|Collection avatar(string $label = null)
* @method Show\Field|Collection remember_token(string $label = null)
* @method Show\Field|Collection address_id(string $label = null) * @method Show\Field|Collection address_id(string $label = null)
* @method Show\Field|Collection image(string $label = null) * @method Show\Field|Collection image(string $label = null)
* @method Show\Field|Collection jump_link(string $label = null)
* @method Show\Field|Collection jump_type(string $label = null)
* @method Show\Field|Collection sort(string $label = null) * @method Show\Field|Collection sort(string $label = null)
* @method Show\Field|Collection jump_type(string $label = null)
* @method Show\Field|Collection jump_link(string $label = null)
* @method Show\Field|Collection is_recommend(string $label = null)
* @method Show\Field|Collection _lft(string $label = null) * @method Show\Field|Collection _lft(string $label = null)
* @method Show\Field|Collection _rgt(string $label = null) * @method Show\Field|Collection _rgt(string $label = null)
* @method Show\Field|Collection is_recommend(string $label = null)
* @method Show\Field|Collection author_name(string $label = null)
* @method Show\Field|Collection category_id(string $label = null) * @method Show\Field|Collection category_id(string $label = null)
* @method Show\Field|Collection content(string $label = null) * @method Show\Field|Collection author_name(string $label = null)
* @method Show\Field|Collection cover(string $label = null)
* @method Show\Field|Collection subtitle(string $label = null) * @method Show\Field|Collection subtitle(string $label = null)
* @method Show\Field|Collection cover(string $label = null)
* @method Show\Field|Collection content(string $label = null)
* @method Show\Field|Collection uuid(string $label = null)
* @method Show\Field|Collection connection(string $label = null) * @method Show\Field|Collection connection(string $label = null)
* @method Show\Field|Collection queue(string $label = null)
* @method Show\Field|Collection payload(string $label = null)
* @method Show\Field|Collection exception(string $label = null) * @method Show\Field|Collection exception(string $label = null)
* @method Show\Field|Collection failed_at(string $label = null) * @method Show\Field|Collection failed_at(string $label = null)
* @method Show\Field|Collection payload(string $label = null) * @method Show\Field|Collection tokenable_type(string $label = null)
* @method Show\Field|Collection queue(string $label = null) * @method Show\Field|Collection tokenable_id(string $label = null)
* @method Show\Field|Collection uuid(string $label = null) * @method Show\Field|Collection token(string $label = null)
* @method Show\Field|Collection abilities(string $label = null) * @method Show\Field|Collection abilities(string $label = null)
* @method Show\Field|Collection last_used_at(string $label = null) * @method Show\Field|Collection last_used_at(string $label = null)
* @method Show\Field|Collection token(string $label = null)
* @method Show\Field|Collection tokenable_id(string $label = null)
* @method Show\Field|Collection tokenable_type(string $label = null)
* @method Show\Field|Collection remarks(string $label = null) * @method Show\Field|Collection remarks(string $label = null)
* @method Show\Field|Collection attrs(string $label = null) * @method Show\Field|Collection attrs(string $label = null)
* @method Show\Field|Collection specs(string $label = null) * @method Show\Field|Collection specs(string $label = null)
@ -360,41 +354,39 @@ namespace Dcat\Admin {
* @method Show\Field|Collection sku_id(string $label = null) * @method Show\Field|Collection sku_id(string $label = null)
* @method Show\Field|Collection spu_id(string $label = null) * @method Show\Field|Collection spu_id(string $label = null)
* @method Show\Field|Collection status(string $label = null) * @method Show\Field|Collection status(string $label = null)
* @method Show\Field|Collection buynote_id(string $label = null)
* @method Show\Field|Collection cost_price(string $label = null)
* @method Show\Field|Collection images(string $label = null) * @method Show\Field|Collection images(string $label = null)
* @method Show\Field|Collection market_price(string $label = null)
* @method Show\Field|Collection media(string $label = null)
* @method Show\Field|Collection release_at(string $label = null)
* @method Show\Field|Collection sales(string $label = null)
* @method Show\Field|Collection sell_price(string $label = null) * @method Show\Field|Collection sell_price(string $label = null)
* @method Show\Field|Collection stock(string $label = null) * @method Show\Field|Collection market_price(string $label = null)
* @method Show\Field|Collection verify_state(string $label = null) * @method Show\Field|Collection cost_price(string $label = null)
* @method Show\Field|Collection vip_price(string $label = null) * @method Show\Field|Collection vip_price(string $label = null)
* @method Show\Field|Collection media(string $label = null)
* @method Show\Field|Collection weight(string $label = null) * @method Show\Field|Collection weight(string $label = null)
* @method Show\Field|Collection stock(string $label = null)
* @method Show\Field|Collection sales(string $label = null)
* @method Show\Field|Collection release_at(string $label = null)
* @method Show\Field|Collection verify_state(string $label = null)
* @method Show\Field|Collection buynote_id(string $label = null)
* @method Show\Field|Collection feature_id(string $label = null) * @method Show\Field|Collection feature_id(string $label = null)
* @method Show\Field|Collection items(string $label = null)
* @method Show\Field|Collection product_spu_id(string $label = null) * @method Show\Field|Collection product_spu_id(string $label = null)
* @method Show\Field|Collection items(string $label = null)
* @method Show\Field|Collection view_date(string $label = null) * @method Show\Field|Collection view_date(string $label = null)
* @method Show\Field|Collection code(string $label = null)
* @method Show\Field|Collection expires_at(string $label = null)
* @method Show\Field|Collection is_use(string $label = null)
* @method Show\Field|Collection phone(string $label = null) * @method Show\Field|Collection phone(string $label = null)
* @method Show\Field|Collection birthday(string $label = null) * @method Show\Field|Collection code(string $label = null)
* @method Show\Field|Collection gender(string $label = null) * @method Show\Field|Collection is_use(string $label = null)
* @method Show\Field|Collection expires_at(string $label = null)
* @method Show\Field|Collection inviter_id(string $label = null) * @method Show\Field|Collection inviter_id(string $label = null)
* @method Show\Field|Collection nickname(string $label = null) * @method Show\Field|Collection nickname(string $label = null)
* @method Show\Field|Collection grow_value(string $label = null) * @method Show\Field|Collection gender(string $label = null)
* @method Show\Field|Collection birthday(string $label = null)
* @method Show\Field|Collection vip_id(string $label = null) * @method Show\Field|Collection vip_id(string $label = null)
* @method Show\Field|Collection growth_value(string $label = null)
* @method Show\Field|Collection phone_verified_at(string $label = null)
* @method Show\Field|Collection email(string $label = null) * @method Show\Field|Collection email(string $label = null)
* @method Show\Field|Collection email_verified_at(string $label = null) * @method Show\Field|Collection email_verified_at(string $label = null)
* @method Show\Field|Collection last_login_at(string $label = null)
* @method Show\Field|Collection last_login_ip(string $label = null) * @method Show\Field|Collection last_login_ip(string $label = null)
* @method Show\Field|Collection phone_verified_at(string $label = null) * @method Show\Field|Collection last_login_at(string $label = null)
* @method Show\Field|Collection register_ip(string $label = null) * @method Show\Field|Collection register_ip(string $label = null)
* @method Show\Field|Collection status_remark(string $label = null) * @method Show\Field|Collection status_remark(string $label = null)
* @method Show\Field|Collection vip_growth_value(string $label = null)
* @method Show\Field|Collection vip_name(string $label = null)
*/ */
class Show {} class Show {}

View File

@ -0,0 +1,19 @@
<?php
return [
'labels' => [
'ProductPart' => 'ProductPart',
'product-part' => 'ProductPart',
],
'fields' => [
'key' => '分区KEY',
'name' => '名称',
'is_show' => '显示',
'partSkus' => '分区商品',
'skus'=> '分区商品',
'sku_id' => '商品名称',
'sort' => '排序',
],
'options' => [
],
];