6
0
Fork 0

添加运费模板管理

release
vine_liutk 2021-12-08 15:36:56 +08:00
parent 05a86b9ff1
commit b964db390a
17 changed files with 769 additions and 220 deletions

View File

@ -5,7 +5,6 @@ namespace App\Admin\Controllers;
use App\Admin\Renderable\CouponRangeTable;
use App\Admin\Repositories\Coupon;
use App\Models\Coupon as CouponModel;
use App\Models\CouponRange;
use Dcat\Admin\Admin;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
@ -144,7 +143,6 @@ class CouponController extends AdminController
*/
public function rangeList(Content $content, CouponModel $coupon)
{
$builder = CouponRange::where('coupon_id', $coupon->id);
return $content->header(__('coupon.labels.coupons'))
->description($coupon->name)
->body(CouponRangeTable::grid($coupon->id));

View File

@ -0,0 +1,121 @@
<?php
namespace App\Admin\Controllers;
use App\Admin\Renderable\ShippingRuleTable;
use App\Admin\Repositories\ShippingRule;
use App\Models\ShippingTemplate;
use App\Models\Zone;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Show;
use Illuminate\Support\Facades\Request;
class ShippingRuleController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return ShippingRuleTable::grid();
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
return Show::make($id, new ShippingRule(), function (Show $show) {
$show->field('id');
$show->field('template_id');
$show->field('type');
$show->field('info');
$show->field('remarks');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
$builder = ShippingRule::with('zones');
return Form::make($builder, function (Form $form) {
$templateId = Request::get('template_id', 0);
$form->display('id');
if ($templateId) {
$form->select('template_id_show', __('shipping-rule.fields.template_id'))->options(ShippingTemplate::all()->pluck('name', 'id'))->value($templateId)->disable();
$form->hidden('template_id')->value($templateId);
} else {
$form->select('template_id')->options(ShippingTemplate::all()->pluck('name', 'id'))->required();
}
$form->text('remarks');
$form->tree('zones')
->nodes(Zone::get()->toArray()) // 设置所有节点
->setTitleColumn('name')
->customFormat(function ($v) {
if (!$v) {
return [];
}
return array_column($v, 'id');
})
->expand(false)->required();
$form->radio('type')
->when(1, function (Form $form) {
$form->embeds('info1', function ($form) {
$form->text('threshold')->rules('required_if:type,1');
})->customFormat(function () {
if ($this->model()->type == '1') {
return $this->model()->info;
} else {
return [];
}
})->saveAsJson();
})
->when(2, function (Form $form) {
$form->embeds('info2', function ($form) {
$form->number('first_weight')->rules('required_if:type,2')->default(2);
$form->currency('first_w_amount')->rules('required_if:type,2')->symbol('¥');
$form->number('continue_weight')->rules('required_if:type,2')->default(1);
$form->currency('continue_w_amount')->rules('required_if:type,2')->symbol('¥');
})->customFormat(function () {
if ($this->model()->type == '2') {
return $this->model()->info;
} else {
return [];
}
})->saveAsJson();
})
->options([
1 => '包邮',
2 => '计重',
])->default(1);
$form->hidden('info');
$form->ignore(['template_id_show']);
$form->saving(function (Form $form) {
$info = 'info'.$form->type;
$form->info = $form->$info;
$form->deleteInput('info1');
$form->deleteInput('info2');
});
$form->display('created_at');
$form->display('updated_at');
});
}
}

View File

@ -0,0 +1,104 @@
<?php
namespace App\Admin\Controllers;
use App\Admin\Renderable\ShippingRuleTable;
use App\Admin\Repositories\ShippingTemplate;
use App\Models\ShippingTemplate as ShippingTemplateModel;
use Dcat\Admin\Admin;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Show;
class ShippingTemplateController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(new ShippingTemplate(), function (Grid $grid) {
$grid->column('id')->sortable();
$grid->column('name');
$grid->column('created_at')->sortable();
//排序
$grid->model()->orderBy('created_at', 'desc');
/** 操作 **/
//新增
if (Admin::user()->can('dcat.admin.shipping_templates.create')) {
$grid->disableCreateButton(false);
$grid->enableDialogCreate();
}
//修改
$grid->showQuickEditButton(Admin::user()->can('dcat.admin.shipping_templates.edit'));
//删除以及自定义操作
$grid->actions(function (Grid\Displayers\Actions $actions) {
$actions->disableDelete(Admin::user()->cannot('dcat.admin.shipping_templates.destroy'));
if (Admin::user()->can('dcat.admin.shipping_templates.rule_list')) {
$actions->append('<a href="'.admin_route('shipping_templates.rule_list', ['template'=>$actions->row]).'">
<i class="feather icon-settings grid-action-icon"></i> 运费规则
</a>');
}
});
/** 查询 **/
$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 ShippingTemplate(), function (Show $show) {
$show->field('id');
$show->field('name');
$show->field('created_at');
$show->field('updated_at');
});
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
return Form::make(new ShippingTemplate(), function (Form $form) {
$form->display('id');
$form->text('name');
$form->display('created_at');
$form->display('updated_at');
});
}
/**
* 运费模板的规则
*
* @param Content $content
* @param ShippingTemplateModel $coupon
* @return void
*/
public function ruleList(Content $content, ShippingTemplateModel $template)
{
return $content->header(__('coupon.labels.coupons'))
->description($template->name)
->body(ShippingRuleTable::grid($template->id));
}
}

View File

@ -0,0 +1,67 @@
<?php
namespace App\Admin\Renderable;
use App\Models\ShippingRule;
use App\Models\Zone;
use Dcat\Admin\Admin;
use Dcat\Admin\Grid;
class ShippingRuleTable extends Grid
{
public static function grid(int $templateId = null)
{
$builder = ShippingRule::with('zones');
$grid = parent::make($builder, function (Grid $grid) {
$grid->setResource('shipping-rules');
$grid->column('id')->sortable();
$grid->column('type')->using([
1=>'包邮规则',
2=>'计重规则',
])->label();
$grid->column('remarks', __('shipping-rule.fields.remarks'));
$grid->column('info', __('shipping-rule.fields.info'))->display(function ($value) {
$value = json_decode($value, true);
if ($this->type == 1) {
return '满'.$value['threshold'].'元包邮';
} elseif ($this->type == 2) {
return '首重:'.$value['first_weight'].'KG内'.$value['first_w_amount'].'元,续重:每'.$value['continue_weight'].'KG'.$value['continue_w_amount'].'元';
}
})->label();
$grid->column('zones', __('shipping-rule.fields.zones'))->display(function ($value) {
return $value->pluck('id')->toArray();
})->showTreeInDialog(function (Grid\Displayers\DialogTree $tree) {
$tree->title('城市');
$tree->nodes(Zone::get()->toArray());
$tree->setTitleColumn('name');
});
$grid->column('created_at');
$grid->column('updated_at')->sortable();
/** 操作 **/
//新增
if (Admin::user()->can('dcat.admin.shipping_rules.create')) {
$grid->disableCreateButton(false);
$grid->enableDialogCreate();
$grid->setDialogFormDimensions('40%', '70%');
}
//修改
$grid->showQuickEditButton(Admin::user()->can('dcat.admin.shipping_rules.edit'));
//删除以及自定义操作
$grid->actions(function (Grid\Displayers\Actions $actions) {
$actions->disableView();
$actions->disableEdit();
$actions->disableDelete(Admin::user()->cannot('dcat.admin.shipping_rules.destroy'));
});
});
if ($templateId) {
$grid->model()->where('template_id', $templateId);
$grid->model()->setConstraints([
'template_id' => $templateId,
]);
}
return $grid;
}
}

View File

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

View File

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

View File

@ -31,6 +31,12 @@ Route::group([
$router->resource('articles', 'ArticleController');
$router->resource('shipping-templates', 'ShippingTemplateController')->names('shipping_templates');
$router->get('shipping-templates/{template}/rule-list', 'ShippingTemplateController@ruleList')->name('shipping_templates.rule_list');
$router->resource('shipping-rules', 'ShippingRuleController')->only([
'create', 'store', 'edit', 'update', 'destroy',
])->names('shipping_rules');
$router->resource('product-categories', 'ProductCategoryController')->only([
'index', 'create', 'store', 'edit', 'update', 'destroy',
])->names('product_categories');
@ -54,12 +60,6 @@ Route::group([
'index', 'edit', 'update', 'destroy',
])->names('product_skus');
$router->resource('coupons', 'CouponController')->names('coupons');
$router->get('coupons/{coupon}/range-list', 'CouponController@rangeList')->name('coupons.range_list');
$router->resource('coupon-ranges', 'CouponRangeController')->only([
'create', 'store', 'edit', 'update', 'destroy',
])->names('coupon_ranges');
$router->resource('product-sku-verifies', 'ProductSkuVerifyController')->only([
'index', 'edit', 'update', 'destroy',
])->names('product_sku_verifies');
@ -68,6 +68,12 @@ Route::group([
'index', 'create', 'store', 'edit', 'update', 'destroy',
])->names('product_parts');
$router->resource('coupons', 'CouponController')->names('coupons');
$router->get('coupons/{coupon}/range-list', 'CouponController@rangeList')->name('coupons.range_list');
$router->resource('coupon-ranges', 'CouponRangeController')->only([
'create', 'store', 'edit', 'update', 'destroy',
])->names('coupon_ranges');
$router->resource('users', 'UserController');
$router->resource('vips', 'VipController');

View File

@ -0,0 +1,23 @@
<?php
namespace App\Models;
use App\Casts\JsonArray;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ShippingRule extends Model
{
use HasFactory;
use HasDateTimeFormatter;
// protected $casts = [
// 'info' => JsonArray::class,
// ];
public function zones()
{
return $this->belongsToMany(Zone::class, 'shipping_rule_zones', 'rule_id', 'zone_id');
}
}

View File

@ -0,0 +1,11 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ShippingRuleZone extends Model
{
use HasFactory;
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ShippingTemplate extends Model
{
use HasFactory;
use HasDateTimeFormatter;
}

View File

@ -2,10 +2,12 @@
namespace App\Models;
use Dcat\Admin\Traits\ModelTree;
use Illuminate\Database\Eloquent\Model;
class Zone extends Model
{
use ModelTree;
public const TYPE_PROVINCE = 'province';
public const TYPE_CITY = 'city';
public const TYPE_AREA = 'area';

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateShippingTemplatesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('shipping_templates', function (Blueprint $table) {
$table->id();
$table->string('name')->comment('模板名称');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('shipping_templates');
}
}

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateShippingRulesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('shipping_rules', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('template_id')->comment('模板ID');
$table->unsignedTinyInteger('type')->default(0)->comment('规则类型0包邮1计重');
$table->json('info')->nullable()->comment('规则内容');
$table->string('remarks')->nullable()->comment('规则备注');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('shipping_rules');
}
}

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateShippingRuleZonesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('shipping_rule_zones', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('rule_id')->comment('规则ID');
$table->unsignedBigInteger('zone_id')->comment('城市ID');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('shipping_rule_zones');
}
}

View File

@ -11,223 +11,239 @@ namespace Dcat\Admin {
use Illuminate\Support\Collection;
/**
* @property Grid\Column|Collection created_at
* @property Grid\Column|Collection dimensions
* @property Grid\Column|Collection id
* @property Grid\Column|Collection is_show
* @property Grid\Column|Collection key
* @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 user_id
* @property Grid\Column|Collection consignee
* @property Grid\Column|Collection telephone
* @property Grid\Column|Collection province
* @property Grid\Column|Collection city
* @property Grid\Column|Collection district
* @property Grid\Column|Collection address
* @property Grid\Column|Collection consignee
* @property Grid\Column|Collection is_default
* @property Grid\Column|Collection telephone
* @property Grid\Column|Collection user_id
* @property Grid\Column|Collection zone
* @property Grid\Column|Collection zone_id
* @property Grid\Column|Collection detail
* @property Grid\Column|Collection type
* @property Grid\Column|Collection version
* @property Grid\Column|Collection detail
* @property Grid\Column|Collection is_enabled
* @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 extension
* @property Grid\Column|Collection permission_id
* @property Grid\Column|Collection icon
* @property Grid\Column|Collection order
* @property Grid\Column|Collection parent_id
* @property Grid\Column|Collection uri
* @property Grid\Column|Collection menu_id
* @property Grid\Column|Collection slug
* @property Grid\Column|Collection permission_id
* @property Grid\Column|Collection http_method
* @property Grid\Column|Collection http_path
* @property Grid\Column|Collection slug
* @property Grid\Column|Collection role_id
* @property Grid\Column|Collection value
* @property Grid\Column|Collection username
* @property Grid\Column|Collection password
* @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 address_id
* @property Grid\Column|Collection image
* @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 jump_type
* @property Grid\Column|Collection sort
* @property Grid\Column|Collection _lft
* @property Grid\Column|Collection _rgt
* @property Grid\Column|Collection category_id
* @property Grid\Column|Collection is_recommend
* @property Grid\Column|Collection author_name
* @property Grid\Column|Collection subtitle
* @property Grid\Column|Collection cover
* @property Grid\Column|Collection category_id
* @property Grid\Column|Collection content
* @property Grid\Column|Collection cover
* @property Grid\Column|Collection subtitle
* @property Grid\Column|Collection coupon_id
* @property Grid\Column|Collection ranges
* @property Grid\Column|Collection threshold
* @property Grid\Column|Collection status
* @property Grid\Column|Collection amount
* @property Grid\Column|Collection limit
* @property Grid\Column|Collection sent
* @property Grid\Column|Collection threshold
* @property Grid\Column|Collection use_day
* @property Grid\Column|Collection use_start_at
* @property Grid\Column|Collection use_end_at
* @property Grid\Column|Collection uuid
* @property Grid\Column|Collection use_start_at
* @property Grid\Column|Collection connection
* @property Grid\Column|Collection queue
* @property Grid\Column|Collection payload
* @property Grid\Column|Collection exception
* @property Grid\Column|Collection failed_at
* @property Grid\Column|Collection tokenable_type
* @property Grid\Column|Collection tokenable_id
* @property Grid\Column|Collection token
* @property Grid\Column|Collection payload
* @property Grid\Column|Collection queue
* @property Grid\Column|Collection uuid
* @property Grid\Column|Collection abilities
* @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 sku_id
* @property Grid\Column|Collection gift_sku_id
* @property Grid\Column|Collection num
* @property Grid\Column|Collection sku_id
* @property Grid\Column|Collection attrs
* @property Grid\Column|Collection specs
* @property Grid\Column|Collection part_id
* @property Grid\Column|Collection spu_id
* @property Grid\Column|Collection status
* @property Grid\Column|Collection images
* @property Grid\Column|Collection sell_price
* @property Grid\Column|Collection market_price
* @property Grid\Column|Collection cost_price
* @property Grid\Column|Collection vip_price
* @property Grid\Column|Collection media
* @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 cost_price
* @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 stock
* @property Grid\Column|Collection verify_state
* @property Grid\Column|Collection vip_price
* @property Grid\Column|Collection weight
* @property Grid\Column|Collection feature_id
* @property Grid\Column|Collection product_spu_id
* @property Grid\Column|Collection items
* @property Grid\Column|Collection product_spu_id
* @property Grid\Column|Collection view_date
* @property Grid\Column|Collection phone
* @property Grid\Column|Collection rule_id
* @property Grid\Column|Collection info
* @property Grid\Column|Collection template_id
* @property Grid\Column|Collection quantity
* @property Grid\Column|Collection code
* @property Grid\Column|Collection is_use
* @property Grid\Column|Collection expires_at
* @property Grid\Column|Collection is_use
* @property Grid\Column|Collection phone
* @property Grid\Column|Collection coupon_name
* @property Grid\Column|Collection coupon_threshold
* @property Grid\Column|Collection coupon_type
* @property Grid\Column|Collection coupon_value
* @property Grid\Column|Collection birthday
* @property Grid\Column|Collection gender
* @property Grid\Column|Collection inviter_id
* @property Grid\Column|Collection nickname
* @property Grid\Column|Collection gender
* @property Grid\Column|Collection birthday
* @property Grid\Column|Collection vip_id
* @property Grid\Column|Collection growth_value
* @property Grid\Column|Collection phone_verified_at
* @property Grid\Column|Collection vip_id
* @property Grid\Column|Collection email
* @property Grid\Column|Collection email_verified_at
* @property Grid\Column|Collection last_login_ip
* @property Grid\Column|Collection last_login_at
* @property Grid\Column|Collection last_login_ip
* @property Grid\Column|Collection phone_verified_at
* @property Grid\Column|Collection register_ip
* @property Grid\Column|Collection status_remark
*
* @method Grid\Column|Collection created_at(string $label = null)
* @method Grid\Column|Collection dimensions(string $label = null)
* @method Grid\Column|Collection id(string $label = null)
* @method Grid\Column|Collection is_show(string $label = null)
* @method Grid\Column|Collection key(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 user_id(string $label = null)
* @method Grid\Column|Collection consignee(string $label = null)
* @method Grid\Column|Collection telephone(string $label = null)
* @method Grid\Column|Collection province(string $label = null)
* @method Grid\Column|Collection city(string $label = null)
* @method Grid\Column|Collection district(string $label = null)
* @method Grid\Column|Collection address(string $label = null)
* @method Grid\Column|Collection consignee(string $label = null)
* @method Grid\Column|Collection is_default(string $label = null)
* @method Grid\Column|Collection telephone(string $label = null)
* @method Grid\Column|Collection user_id(string $label = null)
* @method Grid\Column|Collection zone(string $label = null)
* @method Grid\Column|Collection zone_id(string $label = null)
* @method Grid\Column|Collection detail(string $label = null)
* @method Grid\Column|Collection type(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 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 extension(string $label = null)
* @method Grid\Column|Collection permission_id(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 uri(string $label = null)
* @method Grid\Column|Collection menu_id(string $label = null)
* @method Grid\Column|Collection slug(string $label = null)
* @method Grid\Column|Collection permission_id(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 slug(string $label = null)
* @method Grid\Column|Collection role_id(string $label = null)
* @method Grid\Column|Collection value(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 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 address_id(string $label = null)
* @method Grid\Column|Collection image(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 jump_type(string $label = null)
* @method Grid\Column|Collection sort(string $label = null)
* @method Grid\Column|Collection _lft(string $label = null)
* @method Grid\Column|Collection _rgt(string $label = null)
* @method Grid\Column|Collection category_id(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 subtitle(string $label = null)
* @method Grid\Column|Collection cover(string $label = null)
* @method Grid\Column|Collection category_id(string $label = null)
* @method Grid\Column|Collection content(string $label = null)
* @method Grid\Column|Collection cover(string $label = null)
* @method Grid\Column|Collection subtitle(string $label = null)
* @method Grid\Column|Collection coupon_id(string $label = null)
* @method Grid\Column|Collection ranges(string $label = null)
* @method Grid\Column|Collection threshold(string $label = null)
* @method Grid\Column|Collection status(string $label = null)
* @method Grid\Column|Collection amount(string $label = null)
* @method Grid\Column|Collection limit(string $label = null)
* @method Grid\Column|Collection sent(string $label = null)
* @method Grid\Column|Collection threshold(string $label = null)
* @method Grid\Column|Collection use_day(string $label = null)
* @method Grid\Column|Collection use_start_at(string $label = null)
* @method Grid\Column|Collection use_end_at(string $label = null)
* @method Grid\Column|Collection uuid(string $label = null)
* @method Grid\Column|Collection use_start_at(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 failed_at(string $label = null)
* @method Grid\Column|Collection tokenable_type(string $label = null)
* @method Grid\Column|Collection tokenable_id(string $label = null)
* @method Grid\Column|Collection token(string $label = null)
* @method Grid\Column|Collection payload(string $label = null)
* @method Grid\Column|Collection queue(string $label = null)
* @method Grid\Column|Collection uuid(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 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 sku_id(string $label = null)
* @method Grid\Column|Collection gift_sku_id(string $label = null)
* @method Grid\Column|Collection num(string $label = null)
* @method Grid\Column|Collection sku_id(string $label = null)
* @method Grid\Column|Collection attrs(string $label = null)
* @method Grid\Column|Collection specs(string $label = null)
* @method Grid\Column|Collection part_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 images(string $label = null)
* @method Grid\Column|Collection sell_price(string $label = null)
* @method Grid\Column|Collection market_price(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 media(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 cost_price(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 stock(string $label = null)
* @method Grid\Column|Collection verify_state(string $label = null)
* @method Grid\Column|Collection vip_price(string $label = null)
* @method Grid\Column|Collection weight(string $label = null)
* @method Grid\Column|Collection feature_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 product_spu_id(string $label = null)
* @method Grid\Column|Collection view_date(string $label = null)
* @method Grid\Column|Collection phone(string $label = null)
* @method Grid\Column|Collection rule_id(string $label = null)
* @method Grid\Column|Collection info(string $label = null)
* @method Grid\Column|Collection template_id(string $label = null)
* @method Grid\Column|Collection quantity(string $label = null)
* @method Grid\Column|Collection code(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 is_use(string $label = null)
* @method Grid\Column|Collection phone(string $label = null)
* @method Grid\Column|Collection coupon_name(string $label = null)
* @method Grid\Column|Collection coupon_threshold(string $label = null)
* @method Grid\Column|Collection coupon_type(string $label = null)
* @method Grid\Column|Collection coupon_value(string $label = null)
* @method Grid\Column|Collection birthday(string $label = null)
* @method Grid\Column|Collection gender(string $label = null)
* @method Grid\Column|Collection inviter_id(string $label = null)
* @method Grid\Column|Collection nickname(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 growth_value(string $label = null)
* @method Grid\Column|Collection phone_verified_at(string $label = null)
* @method Grid\Column|Collection vip_id(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 last_login_ip(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 phone_verified_at(string $label = null)
* @method Grid\Column|Collection register_ip(string $label = null)
* @method Grid\Column|Collection status_remark(string $label = null)
*/
@ -236,223 +252,239 @@ namespace Dcat\Admin {
class MiniGrid extends Grid {}
/**
* @property Show\Field|Collection created_at
* @property Show\Field|Collection dimensions
* @property Show\Field|Collection id
* @property Show\Field|Collection is_show
* @property Show\Field|Collection key
* @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 user_id
* @property Show\Field|Collection consignee
* @property Show\Field|Collection telephone
* @property Show\Field|Collection province
* @property Show\Field|Collection city
* @property Show\Field|Collection district
* @property Show\Field|Collection address
* @property Show\Field|Collection consignee
* @property Show\Field|Collection is_default
* @property Show\Field|Collection telephone
* @property Show\Field|Collection user_id
* @property Show\Field|Collection zone
* @property Show\Field|Collection zone_id
* @property Show\Field|Collection detail
* @property Show\Field|Collection type
* @property Show\Field|Collection version
* @property Show\Field|Collection detail
* @property Show\Field|Collection is_enabled
* @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 extension
* @property Show\Field|Collection permission_id
* @property Show\Field|Collection icon
* @property Show\Field|Collection order
* @property Show\Field|Collection parent_id
* @property Show\Field|Collection uri
* @property Show\Field|Collection menu_id
* @property Show\Field|Collection slug
* @property Show\Field|Collection permission_id
* @property Show\Field|Collection http_method
* @property Show\Field|Collection http_path
* @property Show\Field|Collection slug
* @property Show\Field|Collection role_id
* @property Show\Field|Collection value
* @property Show\Field|Collection username
* @property Show\Field|Collection password
* @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 address_id
* @property Show\Field|Collection image
* @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 jump_type
* @property Show\Field|Collection sort
* @property Show\Field|Collection _lft
* @property Show\Field|Collection _rgt
* @property Show\Field|Collection category_id
* @property Show\Field|Collection is_recommend
* @property Show\Field|Collection author_name
* @property Show\Field|Collection subtitle
* @property Show\Field|Collection cover
* @property Show\Field|Collection category_id
* @property Show\Field|Collection content
* @property Show\Field|Collection cover
* @property Show\Field|Collection subtitle
* @property Show\Field|Collection coupon_id
* @property Show\Field|Collection ranges
* @property Show\Field|Collection threshold
* @property Show\Field|Collection status
* @property Show\Field|Collection amount
* @property Show\Field|Collection limit
* @property Show\Field|Collection sent
* @property Show\Field|Collection threshold
* @property Show\Field|Collection use_day
* @property Show\Field|Collection use_start_at
* @property Show\Field|Collection use_end_at
* @property Show\Field|Collection uuid
* @property Show\Field|Collection use_start_at
* @property Show\Field|Collection connection
* @property Show\Field|Collection queue
* @property Show\Field|Collection payload
* @property Show\Field|Collection exception
* @property Show\Field|Collection failed_at
* @property Show\Field|Collection tokenable_type
* @property Show\Field|Collection tokenable_id
* @property Show\Field|Collection token
* @property Show\Field|Collection payload
* @property Show\Field|Collection queue
* @property Show\Field|Collection uuid
* @property Show\Field|Collection abilities
* @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 sku_id
* @property Show\Field|Collection gift_sku_id
* @property Show\Field|Collection num
* @property Show\Field|Collection sku_id
* @property Show\Field|Collection attrs
* @property Show\Field|Collection specs
* @property Show\Field|Collection part_id
* @property Show\Field|Collection spu_id
* @property Show\Field|Collection status
* @property Show\Field|Collection images
* @property Show\Field|Collection sell_price
* @property Show\Field|Collection market_price
* @property Show\Field|Collection cost_price
* @property Show\Field|Collection vip_price
* @property Show\Field|Collection media
* @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 cost_price
* @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 stock
* @property Show\Field|Collection verify_state
* @property Show\Field|Collection vip_price
* @property Show\Field|Collection weight
* @property Show\Field|Collection feature_id
* @property Show\Field|Collection product_spu_id
* @property Show\Field|Collection items
* @property Show\Field|Collection product_spu_id
* @property Show\Field|Collection view_date
* @property Show\Field|Collection phone
* @property Show\Field|Collection rule_id
* @property Show\Field|Collection info
* @property Show\Field|Collection template_id
* @property Show\Field|Collection quantity
* @property Show\Field|Collection code
* @property Show\Field|Collection is_use
* @property Show\Field|Collection expires_at
* @property Show\Field|Collection is_use
* @property Show\Field|Collection phone
* @property Show\Field|Collection coupon_name
* @property Show\Field|Collection coupon_threshold
* @property Show\Field|Collection coupon_type
* @property Show\Field|Collection coupon_value
* @property Show\Field|Collection birthday
* @property Show\Field|Collection gender
* @property Show\Field|Collection inviter_id
* @property Show\Field|Collection nickname
* @property Show\Field|Collection gender
* @property Show\Field|Collection birthday
* @property Show\Field|Collection vip_id
* @property Show\Field|Collection growth_value
* @property Show\Field|Collection phone_verified_at
* @property Show\Field|Collection vip_id
* @property Show\Field|Collection email
* @property Show\Field|Collection email_verified_at
* @property Show\Field|Collection last_login_ip
* @property Show\Field|Collection last_login_at
* @property Show\Field|Collection last_login_ip
* @property Show\Field|Collection phone_verified_at
* @property Show\Field|Collection register_ip
* @property Show\Field|Collection status_remark
*
* @method Show\Field|Collection created_at(string $label = null)
* @method Show\Field|Collection dimensions(string $label = null)
* @method Show\Field|Collection id(string $label = null)
* @method Show\Field|Collection is_show(string $label = null)
* @method Show\Field|Collection key(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 user_id(string $label = null)
* @method Show\Field|Collection consignee(string $label = null)
* @method Show\Field|Collection telephone(string $label = null)
* @method Show\Field|Collection province(string $label = null)
* @method Show\Field|Collection city(string $label = null)
* @method Show\Field|Collection district(string $label = null)
* @method Show\Field|Collection address(string $label = null)
* @method Show\Field|Collection consignee(string $label = null)
* @method Show\Field|Collection is_default(string $label = null)
* @method Show\Field|Collection telephone(string $label = null)
* @method Show\Field|Collection user_id(string $label = null)
* @method Show\Field|Collection zone(string $label = null)
* @method Show\Field|Collection zone_id(string $label = null)
* @method Show\Field|Collection detail(string $label = null)
* @method Show\Field|Collection type(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 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 extension(string $label = null)
* @method Show\Field|Collection permission_id(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 uri(string $label = null)
* @method Show\Field|Collection menu_id(string $label = null)
* @method Show\Field|Collection slug(string $label = null)
* @method Show\Field|Collection permission_id(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 slug(string $label = null)
* @method Show\Field|Collection role_id(string $label = null)
* @method Show\Field|Collection value(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 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 address_id(string $label = null)
* @method Show\Field|Collection image(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 jump_type(string $label = null)
* @method Show\Field|Collection sort(string $label = null)
* @method Show\Field|Collection _lft(string $label = null)
* @method Show\Field|Collection _rgt(string $label = null)
* @method Show\Field|Collection category_id(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 subtitle(string $label = null)
* @method Show\Field|Collection cover(string $label = null)
* @method Show\Field|Collection category_id(string $label = null)
* @method Show\Field|Collection content(string $label = null)
* @method Show\Field|Collection cover(string $label = null)
* @method Show\Field|Collection subtitle(string $label = null)
* @method Show\Field|Collection coupon_id(string $label = null)
* @method Show\Field|Collection ranges(string $label = null)
* @method Show\Field|Collection threshold(string $label = null)
* @method Show\Field|Collection status(string $label = null)
* @method Show\Field|Collection amount(string $label = null)
* @method Show\Field|Collection limit(string $label = null)
* @method Show\Field|Collection sent(string $label = null)
* @method Show\Field|Collection threshold(string $label = null)
* @method Show\Field|Collection use_day(string $label = null)
* @method Show\Field|Collection use_start_at(string $label = null)
* @method Show\Field|Collection use_end_at(string $label = null)
* @method Show\Field|Collection uuid(string $label = null)
* @method Show\Field|Collection use_start_at(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 failed_at(string $label = null)
* @method Show\Field|Collection tokenable_type(string $label = null)
* @method Show\Field|Collection tokenable_id(string $label = null)
* @method Show\Field|Collection token(string $label = null)
* @method Show\Field|Collection payload(string $label = null)
* @method Show\Field|Collection queue(string $label = null)
* @method Show\Field|Collection uuid(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 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 sku_id(string $label = null)
* @method Show\Field|Collection gift_sku_id(string $label = null)
* @method Show\Field|Collection num(string $label = null)
* @method Show\Field|Collection sku_id(string $label = null)
* @method Show\Field|Collection attrs(string $label = null)
* @method Show\Field|Collection specs(string $label = null)
* @method Show\Field|Collection part_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 images(string $label = null)
* @method Show\Field|Collection sell_price(string $label = null)
* @method Show\Field|Collection market_price(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 media(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 cost_price(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 stock(string $label = null)
* @method Show\Field|Collection verify_state(string $label = null)
* @method Show\Field|Collection vip_price(string $label = null)
* @method Show\Field|Collection weight(string $label = null)
* @method Show\Field|Collection feature_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 product_spu_id(string $label = null)
* @method Show\Field|Collection view_date(string $label = null)
* @method Show\Field|Collection phone(string $label = null)
* @method Show\Field|Collection rule_id(string $label = null)
* @method Show\Field|Collection info(string $label = null)
* @method Show\Field|Collection template_id(string $label = null)
* @method Show\Field|Collection quantity(string $label = null)
* @method Show\Field|Collection code(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 is_use(string $label = null)
* @method Show\Field|Collection phone(string $label = null)
* @method Show\Field|Collection coupon_name(string $label = null)
* @method Show\Field|Collection coupon_threshold(string $label = null)
* @method Show\Field|Collection coupon_type(string $label = null)
* @method Show\Field|Collection coupon_value(string $label = null)
* @method Show\Field|Collection birthday(string $label = null)
* @method Show\Field|Collection gender(string $label = null)
* @method Show\Field|Collection inviter_id(string $label = null)
* @method Show\Field|Collection nickname(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 growth_value(string $label = null)
* @method Show\Field|Collection phone_verified_at(string $label = null)
* @method Show\Field|Collection vip_id(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 last_login_ip(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 phone_verified_at(string $label = null)
* @method Show\Field|Collection register_ip(string $label = null)
* @method Show\Field|Collection status_remark(string $label = null)
*/

View File

@ -0,0 +1,27 @@
<?php
return [
'labels' => [
'ShippingRule' => 'ShippingRule',
'shipping-rule' => 'ShippingRule',
],
'fields' => [
'template_id' => '运费模板',
'type' => '规则类型',
'info' => '规则内容',
'info1'=> '包邮规则',
'info2'=> '计重规则',
'threshold'=>'包邮门槛',
'first_weight'=>'首重KG',
'first_w_amount'=>'首重金额',
'continue_weight'=>'续重KG',
'continue_w_amount'=>'续重金额',
'section'=>'重量区间KG',
'section_start'=>'起始区间KG',
'section_end'=>'结束区间KG',
'remarks' => '备注',
'zones'=>'地区',
],
'options' => [
],
];

View File

@ -0,0 +1,13 @@
<?php
return [
'labels' => [
'ShippingTemplate' => '运费模板',
'shipping-templates' => '运费模板',
],
'fields' => [
'name' => '模板名称',
],
'options' => [
],
];