From b964db390a60fff487794f3008e1f03876c3f670 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Wed, 8 Dec 2021 15:36:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=90=E8=B4=B9=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/CouponController.php | 2 - .../Controllers/ShippingRuleController.php | 121 +++++ .../ShippingTemplateController.php | 104 ++++ app/Admin/Renderable/ShippingRuleTable.php | 67 +++ app/Admin/Repositories/ShippingRule.php | 16 + app/Admin/Repositories/ShippingTemplate.php | 16 + app/Admin/routes.php | 18 +- app/Models/ShippingRule.php | 23 + app/Models/ShippingRuleZone.php | 11 + app/Models/ShippingTemplate.php | 13 + app/Models/Zone.php | 2 + ...110613_create_shipping_templates_table.php | 32 ++ ..._08_112027_create_shipping_rules_table.php | 35 ++ ...12331_create_shipping_rule_zones_table.php | 33 ++ dcat_admin_ide_helper.php | 456 ++++++++++-------- resources/lang/zh_CN/shipping-rule.php | 27 ++ resources/lang/zh_CN/shipping-template.php | 13 + 17 files changed, 769 insertions(+), 220 deletions(-) create mode 100644 app/Admin/Controllers/ShippingRuleController.php create mode 100644 app/Admin/Controllers/ShippingTemplateController.php create mode 100644 app/Admin/Renderable/ShippingRuleTable.php create mode 100644 app/Admin/Repositories/ShippingRule.php create mode 100644 app/Admin/Repositories/ShippingTemplate.php create mode 100644 app/Models/ShippingRule.php create mode 100644 app/Models/ShippingRuleZone.php create mode 100644 app/Models/ShippingTemplate.php create mode 100644 database/migrations/2021_12_08_110613_create_shipping_templates_table.php create mode 100644 database/migrations/2021_12_08_112027_create_shipping_rules_table.php create mode 100644 database/migrations/2021_12_08_112331_create_shipping_rule_zones_table.php create mode 100644 resources/lang/zh_CN/shipping-rule.php create mode 100644 resources/lang/zh_CN/shipping-template.php diff --git a/app/Admin/Controllers/CouponController.php b/app/Admin/Controllers/CouponController.php index 690a2069..532b361a 100644 --- a/app/Admin/Controllers/CouponController.php +++ b/app/Admin/Controllers/CouponController.php @@ -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)); diff --git a/app/Admin/Controllers/ShippingRuleController.php b/app/Admin/Controllers/ShippingRuleController.php new file mode 100644 index 00000000..3234aaa0 --- /dev/null +++ b/app/Admin/Controllers/ShippingRuleController.php @@ -0,0 +1,121 @@ +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'); + }); + } +} diff --git a/app/Admin/Controllers/ShippingTemplateController.php b/app/Admin/Controllers/ShippingTemplateController.php new file mode 100644 index 00000000..f7f242b4 --- /dev/null +++ b/app/Admin/Controllers/ShippingTemplateController.php @@ -0,0 +1,104 @@ +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(' + 运费规则 + '); + } + }); + + /** 查询 **/ + $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)); + } +} diff --git a/app/Admin/Renderable/ShippingRuleTable.php b/app/Admin/Renderable/ShippingRuleTable.php new file mode 100644 index 00000000..ee179cce --- /dev/null +++ b/app/Admin/Renderable/ShippingRuleTable.php @@ -0,0 +1,67 @@ +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; + } +} diff --git a/app/Admin/Repositories/ShippingRule.php b/app/Admin/Repositories/ShippingRule.php new file mode 100644 index 00000000..a655c1c8 --- /dev/null +++ b/app/Admin/Repositories/ShippingRule.php @@ -0,0 +1,16 @@ +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'); diff --git a/app/Models/ShippingRule.php b/app/Models/ShippingRule.php new file mode 100644 index 00000000..4b2ead47 --- /dev/null +++ b/app/Models/ShippingRule.php @@ -0,0 +1,23 @@ + JsonArray::class, + // ]; + + public function zones() + { + return $this->belongsToMany(Zone::class, 'shipping_rule_zones', 'rule_id', 'zone_id'); + } +} diff --git a/app/Models/ShippingRuleZone.php b/app/Models/ShippingRuleZone.php new file mode 100644 index 00000000..5a739edf --- /dev/null +++ b/app/Models/ShippingRuleZone.php @@ -0,0 +1,11 @@ +id(); + $table->string('name')->comment('模板名称'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('shipping_templates'); + } +} diff --git a/database/migrations/2021_12_08_112027_create_shipping_rules_table.php b/database/migrations/2021_12_08_112027_create_shipping_rules_table.php new file mode 100644 index 00000000..b29a816a --- /dev/null +++ b/database/migrations/2021_12_08_112027_create_shipping_rules_table.php @@ -0,0 +1,35 @@ +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'); + } +} diff --git a/database/migrations/2021_12_08_112331_create_shipping_rule_zones_table.php b/database/migrations/2021_12_08_112331_create_shipping_rule_zones_table.php new file mode 100644 index 00000000..8dbc6248 --- /dev/null +++ b/database/migrations/2021_12_08_112331_create_shipping_rule_zones_table.php @@ -0,0 +1,33 @@ +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'); + } +} diff --git a/dcat_admin_ide_helper.php b/dcat_admin_ide_helper.php index 167b061b..c9e57935 100644 --- a/dcat_admin_ide_helper.php +++ b/dcat_admin_ide_helper.php @@ -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) */ diff --git a/resources/lang/zh_CN/shipping-rule.php b/resources/lang/zh_CN/shipping-rule.php new file mode 100644 index 00000000..a1b0e75b --- /dev/null +++ b/resources/lang/zh_CN/shipping-rule.php @@ -0,0 +1,27 @@ + [ + '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' => [ + ], +]; diff --git a/resources/lang/zh_CN/shipping-template.php b/resources/lang/zh_CN/shipping-template.php new file mode 100644 index 00000000..4363a9dd --- /dev/null +++ b/resources/lang/zh_CN/shipping-template.php @@ -0,0 +1,13 @@ + [ + 'ShippingTemplate' => '运费模板', + 'shipping-templates' => '运费模板', + ], + 'fields' => [ + 'name' => '模板名称', + ], + 'options' => [ + ], +];