diff --git a/app/Admin/Actions/Grid/OrderPackageSetTag.php b/app/Admin/Actions/Grid/OrderPackageSetTag.php new file mode 100644 index 00000000..2622b665 --- /dev/null +++ b/app/Admin/Actions/Grid/OrderPackageSetTag.php @@ -0,0 +1,45 @@ +'; + + public function title() + { + if ($this->title) { + return $this->title.' 标签'; + } + + return '标签'; + } + + /** + * @param Model|Authenticatable|HasPermissions|null $user + * + * @return bool + */ + protected function authorize($user): bool + { + return $user->can('dcat.admin.order_packages.tags'); + } + + public function render() + { + $form = OrderPackageTagForm::make()->payload(['id'=>$this->getKey(), 'type'=>OrderPackage::class]); + return Modal::make() + ->lg() + ->title($this->title()) + ->body($form) + ->button($this->title()); + } +} diff --git a/app/Admin/Actions/Grid/OrderSetTag.php b/app/Admin/Actions/Grid/OrderSetTag.php new file mode 100644 index 00000000..0e051417 --- /dev/null +++ b/app/Admin/Actions/Grid/OrderSetTag.php @@ -0,0 +1,45 @@ +'; + + public function title() + { + if ($this->title) { + return $this->title.' 标签'; + } + + return '标签'; + } + + /** + * @param Model|Authenticatable|HasPermissions|null $user + * + * @return bool + */ + protected function authorize($user): bool + { + return $user->can('dcat.admin.orders.tags'); + } + + public function render() + { + $form = OrderTagForm::make()->payload(['id'=>$this->getKey(), 'type'=>Order::class]); + return Modal::make() + ->lg() + ->title($this->title()) + ->body($form) + ->button($this->title()); + } +} diff --git a/app/Admin/Controllers/OrderController.php b/app/Admin/Controllers/OrderController.php index b8da57a3..e1f902c7 100644 --- a/app/Admin/Controllers/OrderController.php +++ b/app/Admin/Controllers/OrderController.php @@ -3,6 +3,7 @@ namespace App\Admin\Controllers; use App\Admin\Actions\Grid\CreateOrderPackage; +use App\Admin\Actions\Grid\OrderSetTag; use App\Admin\Actions\Show\OrderConsigneeInfo; use App\Admin\Actions\Show\OrderCreatePackage; use App\Admin\Actions\Show\OrderPay; @@ -14,6 +15,7 @@ use App\Models\Order as OrderModel; use App\Models\OrderLog; use App\Models\OrderPackage; use App\Models\OrderProduct; +use App\Models\Tag; use Dcat\Admin\Admin; use Dcat\Admin\Form; use Dcat\Admin\Grid; @@ -32,10 +34,17 @@ class OrderController extends AdminController */ protected function grid() { - $builder = Order::with('user'); + $builder = Order::with(['user', 'tags']); return Grid::make($builder, function (Grid $grid) { $grid->column('id')->sortable(); $grid->column('sn'); + $grid->column('tags', '标签')->display(function ($tags) { + $array = []; + foreach ($this->tags as $key => $tag) { + $array[] = $tag->name; + } + return $array; + })->label(); $grid->column('user.phone'); $grid->column('total_amount')->display(function ($value) { return bcdiv($value, 100, 2); @@ -107,12 +116,20 @@ class OrderController extends AdminController $grid->actions(function (Grid\Displayers\Actions $actions) { $actions->disableView(false); + if (Admin::user()->can('dcat.admin.orders.tags')) { + $actions->append(new OrderSetTag()); + } // $actions->append(new CreateOrderPackage()); }); $grid->filter(function (Grid\Filter $filter) { $filter->panel(); $filter->equal('sn')->width(3); + $filter->where('tags', function ($query) { + $query->whereHas('tags', function ($q) { + $q->whereIn('tags.id', $this->input); + }); + }, '标签')->multipleSelect(Tag::orderTag()->pluck('name', 'id'))->width(3); }); }); } diff --git a/app/Admin/Controllers/OrderPackageController.php b/app/Admin/Controllers/OrderPackageController.php index 75f48ca3..9f8b622c 100644 --- a/app/Admin/Controllers/OrderPackageController.php +++ b/app/Admin/Controllers/OrderPackageController.php @@ -4,11 +4,13 @@ namespace App\Admin\Controllers; use App\Admin\Actions\Grid\KuaidiInfo; use App\Admin\Actions\Grid\OrderPackageFailed; +use App\Admin\Actions\Grid\OrderPackageSetTag; use App\Admin\Renderable\PackageProductSimpleTable; use App\Admin\Repositories\OrderPackage; use App\Exceptions\BizException; use App\Models\Order; use App\Models\OrderPackage as OrderPackageModel; +use App\Models\Tag; use Dcat\Admin\Admin; use Dcat\Admin\Form; use Dcat\Admin\Grid; @@ -25,10 +27,17 @@ class OrderPackageController extends AdminController */ protected function grid() { - $builder = OrderPackage::with('order'); + $builder = OrderPackage::with(['order', 'tags']); return Grid::make($builder, function (Grid $grid) { // $grid->column('id')->sortable(); $grid->column('order.sn'); + $grid->column('tags', '标签')->display(function ($tags) { + $array = []; + foreach ($this->tags as $key => $tag) { + $array[] = $tag->name; + } + return $array; + })->label(); $grid->column('order.consignee_name'); $grid->column('order.consignee_telephone'); $grid->column('address', '收货地址')->display(function () { @@ -85,9 +94,15 @@ class OrderPackageController extends AdminController $grid->actions(function (Grid\Displayers\Actions $actions) { $actions->disableDelete(Admin::user()->cannot('dcat.admin.order_packages.destroy')); $actions->disableQuickEdit(Admin::user()->cannot('dcat.admin.order_packages.edit')); - if (!$actions->row->is_failed && !in_array($actions->row->status, [OrderPackageModel::STATUS_CHECK, OrderPackageModel::STATUS_AUTOCHECK])) { + if (!$actions->row->is_failed + && !in_array($actions->row->status, [OrderPackageModel::STATUS_CHECK, OrderPackageModel::STATUS_AUTOCHECK]) + && Admin::user()->can('dcat.admin.order_packages.failed') + ) { $actions->append(new OrderPackageFailed()); } + if (Admin::user()->can('dcat.admin.order_packages.tags')) { + $actions->append(new OrderPackageSetTag()); + } }); /** 查询 **/ @@ -95,6 +110,11 @@ class OrderPackageController extends AdminController $filter->panel(); $filter->like('order.sn')->width(3); $filter->like('shipping_number')->width(3); + $filter->where('tags', function ($query) { + $query->whereHas('tags', function ($q) { + $q->whereIn('tags.id', $this->input); + }); + }, '标签')->multipleSelect(Tag::orderPackageTag()->pluck('name', 'id'))->width(3); }); }); } diff --git a/app/Admin/Controllers/TagController.php b/app/Admin/Controllers/TagController.php new file mode 100644 index 00000000..e66087c9 --- /dev/null +++ b/app/Admin/Controllers/TagController.php @@ -0,0 +1,111 @@ +column('id')->sortable(); + $grid->column('type')->using([ + 1=>'订单', + 2=>'货运', + 3=>'售后', + ])->label(); + $grid->column('name'); + $grid->column('created_at')->sortable(); + + // dd(Request::Input('type', 0)); + /** 操作 **/ + $grid->model()->setConstraints([ + 'type' => Request::Input('type', 0), + ]); + //新增 + if (Admin::user()->can('dcat.admin.tags.create')) { + $grid->disableCreateButton(false); + $grid->enableDialogCreate(); + } + //修改 + $grid->showQuickEditButton(Admin::user()->can('dcat.admin.tags.edit')); + //删除以及自定义操作 + $grid->actions(function (Grid\Displayers\Actions $actions) { + $actions->disableDelete(Admin::user()->cannot('dcat.admin.tags.destroy')); + }); + + $grid->filter(function (Grid\Filter $filter) { + $filter->panel(); + $filter->expand(false); + $filter->equal('type')->select([ + 1=>'订单', + 2=>'货运', + 3=>'售后', + ])->width(3); + }); + }); + } + + /** + * Make a show builder. + * + * @param mixed $id + * + * @return Show + */ + protected function detail($id) + { + return Show::make($id, new Tag(), function (Show $show) { + $show->field('id'); + $show->field('type'); + $show->field('name'); + $show->field('created_at'); + $show->field('updated_at'); + }); + } + + /** + * Make a form builder. + * + * @return Form + */ + protected function form() + { + return Form::make(new Tag(), function (Form $form) { + $type = Request::Input('type', 0); + $form->display('id'); + $form->radio('type')->options([ + 1=>'订单', + 2=>'货运', + 3=>'售后', + ])->default($type)->required(); + $form->text('name')->required(); + + $form->display('created_at'); + $form->display('updated_at'); + }); + } + + public function destroy($id) + { + //如果有子分类或者分类下有文章则不允许删除 + if (Taggable::where('tag_id', $id)->count() > 0) { + throw new BizException('当前标签还在使用,无法删除'); + } + return parent::destroy($id); + } +} diff --git a/app/Admin/Forms/Tags/OrderPackageTag.php b/app/Admin/Forms/Tags/OrderPackageTag.php new file mode 100644 index 00000000..2a6d398e --- /dev/null +++ b/app/Admin/Forms/Tags/OrderPackageTag.php @@ -0,0 +1,15 @@ +can('dcat.admin.packages.tags'); + } +} diff --git a/app/Admin/Forms/Tags/OrderTag.php b/app/Admin/Forms/Tags/OrderTag.php new file mode 100644 index 00000000..55da970b --- /dev/null +++ b/app/Admin/Forms/Tags/OrderTag.php @@ -0,0 +1,15 @@ +can('dcat.admin.orders.tags'); + } +} diff --git a/app/Admin/Forms/Tags/Tag.php b/app/Admin/Forms/Tags/Tag.php new file mode 100644 index 00000000..5fc78218 --- /dev/null +++ b/app/Admin/Forms/Tags/Tag.php @@ -0,0 +1,55 @@ +$type, + ]; + }, $input['tags']); + $type::findOrFail($input['id'])->tags()->sync($a); + return $this->response() + ->success(__('admin.update_succeeded')) + ->refresh(); + } + + /** + * Build a form here. + */ + public function form() + { + $id = $this->payload['id'] ?? 0; + $type = $this->payload['type']; + $tags = Taggable::where('taggable_id', $id)->where('taggable_type', $type)->get(); + $scopeTag = lcfirst(class_basename($type)).'Tag'; + $this->multipleSelect('tags') + ->options(TagModel::$scopeTag()->pluck('name', 'id')) + ->customFormat(function () use ($tags) { + return array_column($tags->toArray(), 'tag_id'); + }); + $this->hidden('id')->value($id); + $this->hidden('type')->value($type); + } +} diff --git a/app/Admin/Repositories/Tag.php b/app/Admin/Repositories/Tag.php new file mode 100644 index 00000000..f55032e8 --- /dev/null +++ b/app/Admin/Repositories/Tag.php @@ -0,0 +1,16 @@ +names('share_bgs'); + $router->resource('tags', 'TagController')->only([ + 'index', 'create', 'store', 'edit', 'update', 'destroy', + ]); + /** api接口 **/ $router->get('api/product-categories', 'ProductCategoryController@categories')->name('api.product_categories'); $router->get('api/product-group-details', 'ProductGroupController@details')->name('api.product_group_details'); diff --git a/app/Models/Order.php b/app/Models/Order.php index 54eeb694..9fbf50fb 100644 --- a/app/Models/Order.php +++ b/app/Models/Order.php @@ -141,6 +141,14 @@ class Order extends Model return $this->hasMany(OrderRefundLog::class); } + /** + * 属于此订单的标签 + */ + public function tags() + { + return $this->belongsToMany(Tag::class, 'taggables', 'taggable_id', 'tag_id')->wherePivot('taggable_type', self::class)->withTimestamps(); + } + /** * 此订单是否待付款 * diff --git a/app/Models/OrderPackage.php b/app/Models/OrderPackage.php index 1fb92773..ed0e7f39 100644 --- a/app/Models/OrderPackage.php +++ b/app/Models/OrderPackage.php @@ -79,6 +79,14 @@ class OrderPackage extends Model return $this->belongsToMany(OrderProduct::class, 'order_package_products', 'order_package_id', 'order_product_id'); } + /** + * 属于此货运单单的标签 + */ + public function tags() + { + return $this->belongsToMany(Tag::class, 'taggables', 'taggable_id', 'tag_id')->wherePivot('taggable_type', self::class)->withTimestamps(); + } + /** * 确认此包裹是否已签收 * diff --git a/app/Models/Tag.php b/app/Models/Tag.php new file mode 100644 index 00000000..2f5fe43e --- /dev/null +++ b/app/Models/Tag.php @@ -0,0 +1,41 @@ +morphedByMany(Order::class, 'taggable'); + // } + + // /** + // * 标签下的包裹 + // * + // */ + // public function packages() + // { + // return $this->morphedByMany(OrderPackage::class, 'taggable'); + // } + + public function scopeOrderTag() + { + return $this->where('type', 1); + } + + public function scopeOrderPackageTag() + { + return $this->where('type', 2); + } +} diff --git a/app/Models/Taggable.php b/app/Models/Taggable.php new file mode 100644 index 00000000..c9887ca3 --- /dev/null +++ b/app/Models/Taggable.php @@ -0,0 +1,16 @@ +belongsTo(Tag::class); + } +} diff --git a/database/migrations/2021_12_23_184621_create_tags_table.php b/database/migrations/2021_12_23_184621_create_tags_table.php new file mode 100644 index 00000000..3996454d --- /dev/null +++ b/database/migrations/2021_12_23_184621_create_tags_table.php @@ -0,0 +1,33 @@ +id(); + $table->unsignedBigInteger('type')->comment('标签分类:1订单,2货运,3售后'); + $table->string('name')->comment('标签名称'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tags'); + } +} diff --git a/database/migrations/2021_12_23_192752_create_taggables_table.php b/database/migrations/2021_12_23_192752_create_taggables_table.php new file mode 100644 index 00000000..f0e92bb4 --- /dev/null +++ b/database/migrations/2021_12_23_192752_create_taggables_table.php @@ -0,0 +1,36 @@ +id(); + $table->unsignedBigInteger('tag_id')->comment('标签ID'); + $table->unsignedBigInteger('taggable_id')->comment('模型ID'); + $table->string('taggable_type')->comment('模型名称'); + $table->timestamps(); + + $table->index(['taggable_id', 'tag_id']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('taggables'); + } +} diff --git a/database/seeders/AdminMenuSeeder.php b/database/seeders/AdminMenuSeeder.php index bcaba81d..cfcc5e44 100644 --- a/database/seeders/AdminMenuSeeder.php +++ b/database/seeders/AdminMenuSeeder.php @@ -166,6 +166,11 @@ class AdminMenuSeeder extends Seeder 'icon' => '', 'uri' => 'orders', ], + [ + 'title' =>'订单标签', + 'icon' => '', + 'uri' => 'tags?type=1', + ], [ 'title' =>'调价范围权限', 'icon' => '', @@ -183,6 +188,11 @@ class AdminMenuSeeder extends Seeder 'icon' => '', 'uri' => 'order-packages', ], + [ + 'title' =>'货运标签', + 'icon' => '', + 'uri' => 'tags?type=2', + ], ], ], [ diff --git a/database/seeders/AdminPermissionSeeder.php b/database/seeders/AdminPermissionSeeder.php index b59946db..c726020d 100644 --- a/database/seeders/AdminPermissionSeeder.php +++ b/database/seeders/AdminPermissionSeeder.php @@ -197,6 +197,7 @@ class AdminPermissionSeeder extends Seeder 'remark'=>['name' =>'订单备注'], 'consignee'=>['name' =>'修改地址'], 'create_package'=>['name' =>'发货'], + 'tags'=>['name' =>'标签设置'], ], ], 'order_reduce_ranges'=>[ @@ -208,6 +209,7 @@ class AdminPermissionSeeder extends Seeder 'curd' =>['index', 'edit', 'update', 'destroy'], 'children' => [ 'failed' => ['name' =>'作废'], + 'tags'=>['name' =>'标签设置'], ], ], 'app_versions'=>[ @@ -218,6 +220,10 @@ class AdminPermissionSeeder extends Seeder 'name'=>'分享背景', 'curd' => ['index', 'create', 'store', 'edit', 'update', 'destroy'], ], + 'tags'=>[ + 'name' =>'标签管理', + 'curd' => ['index', 'create', 'store', 'edit', 'update', 'destroy'], + ], ]; try { DB::begintransaction(); diff --git a/dcat_admin_ide_helper.php b/dcat_admin_ide_helper.php index 414800f8..1dcb2ced 100644 --- a/dcat_admin_ide_helper.php +++ b/dcat_admin_ide_helper.php @@ -49,6 +49,7 @@ namespace Dcat\Admin { * @property Grid\Column|Collection image * @property Grid\Column|Collection jump_link * @property Grid\Column|Collection jump_type + * @property Grid\Column|Collection remarks * @property Grid\Column|Collection sort * @property Grid\Column|Collection after_sale_id * @property Grid\Column|Collection desc @@ -57,7 +58,6 @@ namespace Dcat\Admin { * @property Grid\Column|Collection num * @property Grid\Column|Collection order_id * @property Grid\Column|Collection order_product_id - * @property Grid\Column|Collection remarks * @property Grid\Column|Collection sn * @property Grid\Column|Collection state * @property Grid\Column|Collection tracking_number @@ -122,6 +122,7 @@ namespace Dcat\Admin { * @property Grid\Column|Collection gift_for_sku_id * @property Grid\Column|Collection reduced_amount * @property Grid\Column|Collection remain_quantity + * @property Grid\Column|Collection sales_value * @property Grid\Column|Collection sell_price * @property Grid\Column|Collection sku_id * @property Grid\Column|Collection specs @@ -157,6 +158,7 @@ namespace Dcat\Admin { * @property Grid\Column|Collection reviewer_id * @property Grid\Column|Collection buynote_id * @property Grid\Column|Collection cost_price + * @property Grid\Column|Collection growth_value * @property Grid\Column|Collection market_price * @property Grid\Column|Collection media * @property Grid\Column|Collection release_at @@ -176,6 +178,9 @@ namespace Dcat\Admin { * @property Grid\Column|Collection template_id * @property Grid\Column|Collection expires_at * @property Grid\Column|Collection phone + * @property Grid\Column|Collection tag_id + * @property Grid\Column|Collection tag_log_id + * @property Grid\Column|Collection tag_log_type * @property Grid\Column|Collection m_cid * @property Grid\Column|Collection u_cid * @property Grid\Column|Collection coupon_amount @@ -186,7 +191,6 @@ namespace Dcat\Admin { * @property Grid\Column|Collection gender * @property Grid\Column|Collection inviter_id * @property Grid\Column|Collection nickname - * @property Grid\Column|Collection growth_value * @property Grid\Column|Collection vip_id * @property Grid\Column|Collection email * @property Grid\Column|Collection email_verified_at @@ -195,6 +199,16 @@ namespace Dcat\Admin { * @property Grid\Column|Collection phone_verified_at * @property Grid\Column|Collection register_ip * @property Grid\Column|Collection status_remark + * @property Grid\Column|Collection action + * @property Grid\Column|Collection before_balance + * @property Grid\Column|Collection fee + * @property Grid\Column|Collection loggable_id + * @property Grid\Column|Collection loggable_type + * @property Grid\Column|Collection wallet_id + * @property Grid\Column|Collection balance + * @property Grid\Column|Collection total_expenses + * @property Grid\Column|Collection total_revenue + * @property Grid\Column|Collection withdrawable * * @method Grid\Column|Collection created_at(string $label = null) * @method Grid\Column|Collection dimensions(string $label = null) @@ -234,6 +248,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection image(string $label = null) * @method Grid\Column|Collection jump_link(string $label = null) * @method Grid\Column|Collection jump_type(string $label = null) + * @method Grid\Column|Collection remarks(string $label = null) * @method Grid\Column|Collection sort(string $label = null) * @method Grid\Column|Collection after_sale_id(string $label = null) * @method Grid\Column|Collection desc(string $label = null) @@ -242,7 +257,6 @@ namespace Dcat\Admin { * @method Grid\Column|Collection num(string $label = null) * @method Grid\Column|Collection order_id(string $label = null) * @method Grid\Column|Collection order_product_id(string $label = null) - * @method Grid\Column|Collection remarks(string $label = null) * @method Grid\Column|Collection sn(string $label = null) * @method Grid\Column|Collection state(string $label = null) * @method Grid\Column|Collection tracking_number(string $label = null) @@ -307,6 +321,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection gift_for_sku_id(string $label = null) * @method Grid\Column|Collection reduced_amount(string $label = null) * @method Grid\Column|Collection remain_quantity(string $label = null) + * @method Grid\Column|Collection sales_value(string $label = null) * @method Grid\Column|Collection sell_price(string $label = null) * @method Grid\Column|Collection sku_id(string $label = null) * @method Grid\Column|Collection specs(string $label = null) @@ -342,6 +357,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection reviewer_id(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 growth_value(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) @@ -361,6 +377,9 @@ namespace Dcat\Admin { * @method Grid\Column|Collection template_id(string $label = null) * @method Grid\Column|Collection expires_at(string $label = null) * @method Grid\Column|Collection phone(string $label = null) + * @method Grid\Column|Collection tag_id(string $label = null) + * @method Grid\Column|Collection tag_log_id(string $label = null) + * @method Grid\Column|Collection tag_log_type(string $label = null) * @method Grid\Column|Collection m_cid(string $label = null) * @method Grid\Column|Collection u_cid(string $label = null) * @method Grid\Column|Collection coupon_amount(string $label = null) @@ -371,7 +390,6 @@ namespace Dcat\Admin { * @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 growth_value(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) @@ -380,6 +398,16 @@ namespace Dcat\Admin { * @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) + * @method Grid\Column|Collection action(string $label = null) + * @method Grid\Column|Collection before_balance(string $label = null) + * @method Grid\Column|Collection fee(string $label = null) + * @method Grid\Column|Collection loggable_id(string $label = null) + * @method Grid\Column|Collection loggable_type(string $label = null) + * @method Grid\Column|Collection wallet_id(string $label = null) + * @method Grid\Column|Collection balance(string $label = null) + * @method Grid\Column|Collection total_expenses(string $label = null) + * @method Grid\Column|Collection total_revenue(string $label = null) + * @method Grid\Column|Collection withdrawable(string $label = null) */ class Grid {} @@ -424,6 +452,7 @@ namespace Dcat\Admin { * @property Show\Field|Collection image * @property Show\Field|Collection jump_link * @property Show\Field|Collection jump_type + * @property Show\Field|Collection remarks * @property Show\Field|Collection sort * @property Show\Field|Collection after_sale_id * @property Show\Field|Collection desc @@ -432,7 +461,6 @@ namespace Dcat\Admin { * @property Show\Field|Collection num * @property Show\Field|Collection order_id * @property Show\Field|Collection order_product_id - * @property Show\Field|Collection remarks * @property Show\Field|Collection sn * @property Show\Field|Collection state * @property Show\Field|Collection tracking_number @@ -497,6 +525,7 @@ namespace Dcat\Admin { * @property Show\Field|Collection gift_for_sku_id * @property Show\Field|Collection reduced_amount * @property Show\Field|Collection remain_quantity + * @property Show\Field|Collection sales_value * @property Show\Field|Collection sell_price * @property Show\Field|Collection sku_id * @property Show\Field|Collection specs @@ -532,6 +561,7 @@ namespace Dcat\Admin { * @property Show\Field|Collection reviewer_id * @property Show\Field|Collection buynote_id * @property Show\Field|Collection cost_price + * @property Show\Field|Collection growth_value * @property Show\Field|Collection market_price * @property Show\Field|Collection media * @property Show\Field|Collection release_at @@ -551,6 +581,9 @@ namespace Dcat\Admin { * @property Show\Field|Collection template_id * @property Show\Field|Collection expires_at * @property Show\Field|Collection phone + * @property Show\Field|Collection tag_id + * @property Show\Field|Collection tag_log_id + * @property Show\Field|Collection tag_log_type * @property Show\Field|Collection m_cid * @property Show\Field|Collection u_cid * @property Show\Field|Collection coupon_amount @@ -561,7 +594,6 @@ namespace Dcat\Admin { * @property Show\Field|Collection gender * @property Show\Field|Collection inviter_id * @property Show\Field|Collection nickname - * @property Show\Field|Collection growth_value * @property Show\Field|Collection vip_id * @property Show\Field|Collection email * @property Show\Field|Collection email_verified_at @@ -570,6 +602,16 @@ namespace Dcat\Admin { * @property Show\Field|Collection phone_verified_at * @property Show\Field|Collection register_ip * @property Show\Field|Collection status_remark + * @property Show\Field|Collection action + * @property Show\Field|Collection before_balance + * @property Show\Field|Collection fee + * @property Show\Field|Collection loggable_id + * @property Show\Field|Collection loggable_type + * @property Show\Field|Collection wallet_id + * @property Show\Field|Collection balance + * @property Show\Field|Collection total_expenses + * @property Show\Field|Collection total_revenue + * @property Show\Field|Collection withdrawable * * @method Show\Field|Collection created_at(string $label = null) * @method Show\Field|Collection dimensions(string $label = null) @@ -609,6 +651,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection image(string $label = null) * @method Show\Field|Collection jump_link(string $label = null) * @method Show\Field|Collection jump_type(string $label = null) + * @method Show\Field|Collection remarks(string $label = null) * @method Show\Field|Collection sort(string $label = null) * @method Show\Field|Collection after_sale_id(string $label = null) * @method Show\Field|Collection desc(string $label = null) @@ -617,7 +660,6 @@ namespace Dcat\Admin { * @method Show\Field|Collection num(string $label = null) * @method Show\Field|Collection order_id(string $label = null) * @method Show\Field|Collection order_product_id(string $label = null) - * @method Show\Field|Collection remarks(string $label = null) * @method Show\Field|Collection sn(string $label = null) * @method Show\Field|Collection state(string $label = null) * @method Show\Field|Collection tracking_number(string $label = null) @@ -682,6 +724,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection gift_for_sku_id(string $label = null) * @method Show\Field|Collection reduced_amount(string $label = null) * @method Show\Field|Collection remain_quantity(string $label = null) + * @method Show\Field|Collection sales_value(string $label = null) * @method Show\Field|Collection sell_price(string $label = null) * @method Show\Field|Collection sku_id(string $label = null) * @method Show\Field|Collection specs(string $label = null) @@ -717,6 +760,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection reviewer_id(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 growth_value(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) @@ -736,6 +780,9 @@ namespace Dcat\Admin { * @method Show\Field|Collection template_id(string $label = null) * @method Show\Field|Collection expires_at(string $label = null) * @method Show\Field|Collection phone(string $label = null) + * @method Show\Field|Collection tag_id(string $label = null) + * @method Show\Field|Collection tag_log_id(string $label = null) + * @method Show\Field|Collection tag_log_type(string $label = null) * @method Show\Field|Collection m_cid(string $label = null) * @method Show\Field|Collection u_cid(string $label = null) * @method Show\Field|Collection coupon_amount(string $label = null) @@ -746,7 +793,6 @@ namespace Dcat\Admin { * @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 growth_value(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) @@ -755,6 +801,16 @@ namespace Dcat\Admin { * @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) + * @method Show\Field|Collection action(string $label = null) + * @method Show\Field|Collection before_balance(string $label = null) + * @method Show\Field|Collection fee(string $label = null) + * @method Show\Field|Collection loggable_id(string $label = null) + * @method Show\Field|Collection loggable_type(string $label = null) + * @method Show\Field|Collection wallet_id(string $label = null) + * @method Show\Field|Collection balance(string $label = null) + * @method Show\Field|Collection total_expenses(string $label = null) + * @method Show\Field|Collection total_revenue(string $label = null) + * @method Show\Field|Collection withdrawable(string $label = null) */ class Show {} diff --git a/resources/lang/zh_CN/models.php b/resources/lang/zh_CN/models.php index c97efc01..f95ae728 100644 --- a/resources/lang/zh_CN/models.php +++ b/resources/lang/zh_CN/models.php @@ -22,4 +22,5 @@ return [ OrderProduct::class => '订单商品', AfterSale::class => '售后订单', Article::class => '文章', + OrderPackage::class => '包裹', ]; diff --git a/resources/lang/zh_CN/tag.php b/resources/lang/zh_CN/tag.php new file mode 100644 index 00000000..417c09ca --- /dev/null +++ b/resources/lang/zh_CN/tag.php @@ -0,0 +1,14 @@ + [ + 'Tag' => '标签管理', + 'tags' => '标签管理', + ], + 'fields' => [ + 'type' => '标签分类', + 'name' => '标签名称', + ], + 'options' => [ + ], +];