From cb0730e0a76abca81d9d62993d319c99f552e6e6 Mon Sep 17 00:00:00 2001 From: lemon <15040771@qq.com> Date: Thu, 26 Aug 2021 17:32:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=95=86=20=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E5=B8=82=E5=9C=BA=20=E5=90=8E=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DemandBiddingController.php | 86 ++++++++ .../Controllers/DemandController.php | 208 ++++++++++++++++++ .../Controllers/MyDemandController.php | 132 +++++++++++ app/AdminAgent/Lazys/DemandBiddingLazys.php | 47 ++++ app/AdminAgent/Repositories/Demand.php | 16 ++ app/AdminAgent/Repositories/DemandBidding.php | 16 ++ app/AdminAgent/routes.php | 6 + app/Models/Agent.php | 15 ++ app/Models/Demand.php | 25 +++ app/Models/DemandBidding.php | 19 ++ app/Models/Guide.php | 15 ++ app/Models/Supplier.php | 15 ++ app/Traits/DemandTraits.php | 31 +++ app/Traits/ResponseHelper.php | 50 +++++ .../2021_08_24_164921_create_demand_table.php | 45 ++++ ..._24_165029_create_demand_bidding_table.php | 36 +++ dcat_admin_ide_helper.php | 96 +++++--- resources/lang/zh_CN/demand-bidding.php | 13 ++ resources/lang/zh_CN/demand.php | 21 ++ resources/lang/zh_CN/my-demand.php | 21 ++ 20 files changed, 885 insertions(+), 28 deletions(-) create mode 100755 app/AdminAgent/Controllers/DemandBiddingController.php create mode 100755 app/AdminAgent/Controllers/DemandController.php create mode 100755 app/AdminAgent/Controllers/MyDemandController.php create mode 100644 app/AdminAgent/Lazys/DemandBiddingLazys.php create mode 100755 app/AdminAgent/Repositories/Demand.php create mode 100755 app/AdminAgent/Repositories/DemandBidding.php create mode 100755 app/Models/Demand.php create mode 100755 app/Models/DemandBidding.php create mode 100644 app/Traits/DemandTraits.php create mode 100644 app/Traits/ResponseHelper.php create mode 100644 database/migrations/2021_08_24_164921_create_demand_table.php create mode 100644 database/migrations/2021_08_24_165029_create_demand_bidding_table.php create mode 100755 resources/lang/zh_CN/demand-bidding.php create mode 100755 resources/lang/zh_CN/demand.php create mode 100755 resources/lang/zh_CN/my-demand.php diff --git a/app/AdminAgent/Controllers/DemandBiddingController.php b/app/AdminAgent/Controllers/DemandBiddingController.php new file mode 100755 index 0000000..c05d223 --- /dev/null +++ b/app/AdminAgent/Controllers/DemandBiddingController.php @@ -0,0 +1,86 @@ +model()->where(['bidding_user_id' => Admin::user()->id,'bidding_user_type' => Arr::first(DemandTraits::$col)]); + $grid->column('id')->sortable(); + $grid->column('price'); + $grid->column('comment'); + $grid->column('created_at'); + $grid->column('updated_at')->sortable(); + $grid->disableDeleteButton(); + $grid->disableEditButton(); + $grid->disableQuickEditButton(); + $grid->disableViewButton(); + $grid->disableCreateButton(); + $grid->disableActions(); + $grid->filter(function (Grid\Filter $filter) { + $filter->equal('id'); + + }); + }); + } + + /** + * Make a show builder. + * + * @param mixed $id + * + * @return Show + */ + protected function detail($id) + { + return Show::make($id, new DemandBidding(), function (Show $show) { + $show->field('id'); + $show->field('price'); + $show->field('comment'); + $show->field('created_at'); + $show->field('updated_at'); + }); + } + + /** + * Make a form builder. + * + * @return Form + */ + protected function form() + { + return Form::make(new DemandBidding(), function (Form $form) { + $form->display('id'); + $form->text('price'); + $form->text('comment'); + $form->hidden('demand_id')->value(request('demand_id',0)); + $form->hidden('bidding_user_type'); + $form->hidden('bidding_user_id'); + $form->saving(function (Form $form) { + // 判断是否是新增操作 + if ($form->isCreating()) { + //发布人身份 + $form->bidding_user_type = 'App\models\Agent'; + $form->bidding_user_id = Admin::user()->id; + } + }); + }); + } +} diff --git a/app/AdminAgent/Controllers/DemandController.php b/app/AdminAgent/Controllers/DemandController.php new file mode 100755 index 0000000..c5a42d3 --- /dev/null +++ b/app/AdminAgent/Controllers/DemandController.php @@ -0,0 +1,208 @@ +column('id')->sortable(); + $grid->column('title'); + $grid->column('detail','内容')->display('查看')->modal('详情',function ($modal) { + $modal->xl(); + return $this->comment; + }); + $grid->column('images','图片')->display(function ($image) { + return json_decode($image,true); + })->image(); + $grid->column('deadline'); + $grid->column('publisher.name','发布人'); + $grid->column('publisher_type')->using(DemandTraits::$polymorphic); + $grid->column('biddingUser.name','中标人'); + $grid->column('bidding_user_type','竞标用户类型')->using(DemandTraits::$polymorphic); + $grid->column('price'); + $grid->column('stock'); + $grid->column('state')->using(DemandTraits::$state)->dot( + [ + 1 => 'yellow', + 2 => 'success', + 3 => 'danger', + ] + ); + + $grid->column('bidding','竞标') + ->if(function (){ + return $this->state == 1 && $this->bidding_user_type == Arr::first(DemandTraits::$col); + }) + ->then(function (Grid\Column $column) { + $column->append('发起竞标'); + }); + $grid->column('created_at')->sortable(); + $grid->disableDeleteButton(); + $grid->disableEditButton(); + $grid->disableQuickEditButton(); + $grid->disableViewButton(); + $grid->disableActions(); + $grid->filter(function (Grid\Filter $filter) { + $filter->equal('id'); + $filter->equal('bidding_user_type','竞标用户类型')->select(DemandTraits::$polymorphic); + }); + }); + } + + /** + * Make a show builder. + * + * @param mixed $id + * + * @return Show + */ + protected function detail($id) + { + return Show::make($id, new Demand(['publisher','biddingUser']), function (Show $show) { + $show->field('id'); + $show->field('title'); + $show->field('comment'); + $show->field('images')->image(); + $show->field('deadline'); + $show->field('bidding_user_type','竞标用户类型')->using(DemandTraits::$polymorphic); + $show->field('price'); + $show->field('stock'); + $show->field('publisher_type')->using(DemandTraits::$polymorphic); + $show->field('publisher.name','发布人'); + $show->field('state')->using(DemandTraits::$state)->dot( + [ + 1 => 'yellow', + 2 => 'danger', + 3 => 'success', + ] + );; + $show->field('created_at'); + }); + } + + /** + * Make a form builder. + * + * @return Form + */ + protected function form() + { + return Form::make(new Demand(), function (Form $form) { + $form->disableEditingCheck(); + $form->disableCreatingCheck(); + $form->disableViewCheck(); + $form->display('id'); + $form->text('title'); + $form->text('comment'); + $form->multipleImage('images','图片')->limit(5)->saving(function ($path) { + return json_encode($path); + }); + $form->hidden('deadline'); + $form->select('bidding_user_type','竞标用户类型') + ->when([2],function (Form $form){ + $form->select('product_id','产品')->options(function (){ + return Product::query()->whereIn('agent_id',[0,Admin::user()->id])->pluck('title','id'); + }); + }) + ->options([ + 1 => '供应商', + 2 => '地接' + ]) + ->default(1); + $form->decimal('price'); + $form->number('stock'); + $form->hidden('publisher_type'); + $form->hidden('publisher_id'); + $form->saving(function (Form $form) { + // 判断是否是新增操作 + if ($form->isCreating()) { + if ($form->bidding_user_type != 2) { + $form->product_id = 0; + } + $form->bidding_user_type = DemandTraits::$col[$form->bidding_user_type]; + //处理流拍时间 + $form->deadline = now()->addDays(5); + //发布人身份 + $form->publisher_type = DemandTraits::$col[0]; + $form->publisher_id = Admin::user()->id; + } + }); + }); + } + + public function binding() + { + $demandBiddingId = request('demand_bidding_id',0); + $demandBidding = DemandBidding::find($demandBiddingId); + if (empty($demandBidding)) { + return false; + } + + $demand = \App\Models\Demand::find($demandBidding->demand_id); + + if (empty($demand)) { + return false; + } + + DB::beginTransaction(); + try { + //新建供应商订单 + $product = new Product(); + $product->agent_id = $demand->publisher_id; + $product->title = $demand->title; + $product->pictures = $demand->images; + $product->price = $demand->price; + $product->original_price = $demand->price; + $product->stock = $demand->stock; + $product->state = 0; + $product->save(); + //处理代理商订单 + $agentProduct = new AgentProduct(); + $agentProduct->agent_id = $demand->publisher_id; + $agentProduct->product_id = $product->id; + $agentProduct->stock = $demand->stock; + $agentProduct->price = $demand->price; + $agentProduct->original_price = $demand->price; + $agentProduct->state = 0; + $agentProduct->save(); + //改变订单状态 + $demand->bidding_id = $demandBidding->id; + $demand->bidding_user_id = $demandBidding->bidding_user_id; + $demand->state = DemandTraits::$stateKey[1]; + $demand->save(); + DB::commit(); + } catch (\Exception $e) { + Log::error('选中竞标失败::'.$e->getTraceAsString()); + DB::rollBack(); + return $this->jsonFail(1001,'选中竞标失败,稍后重试或联系管理员!'.$e->getMessage()); + } + return back(); + } +} diff --git a/app/AdminAgent/Controllers/MyDemandController.php b/app/AdminAgent/Controllers/MyDemandController.php new file mode 100755 index 0000000..42242da --- /dev/null +++ b/app/AdminAgent/Controllers/MyDemandController.php @@ -0,0 +1,132 @@ +model()->where(['publisher_id' => Admin::user()->id,'publisher_type' => Arr::first(DemandTraits::$col)]); + $grid->column('id')->sortable(); + $grid->column('title'); + $grid->column('detail','内容')->display('查看')->modal('详情',function ($modal) { + $modal->xl(); + return $this->comment; + }); + $grid->column('images','图片')->display(function ($image) { + return json_decode($image,true); + })->image(); + $grid->column('deadline'); + $grid->column('biddingUser.name','中标人'); + $grid->column('bidding_user_type','竞标用户类型')->using(DemandTraits::$polymorphic); + $grid->column('price'); + $grid->column('stock'); + $grid->column('state')->using(DemandTraits::$state)->dot( + [ + 1 => 'yellow', + 2 => 'success', + 3 => 'danger', + ] + ); + + $grid->column('bidding','竞标明细') + ->display(function (){ + return '竞标数 : '. DemandBidding::query()->where('demand_id',$this->id)->count(); + }) + ->modal('竞标明细',function () { + return DemandBiddingLazys::make(['demand_id' => $this->id]); + }); + + $grid->column('created_at')->sortable(); + $grid->disableDeleteButton(); + $grid->disableEditButton(); + $grid->disableQuickEditButton(); + $grid->disableViewButton(); + $grid->disableActions(); + $grid->filter(function (Grid\Filter $filter) { + $filter->equal('id'); + $filter->equal('bidding_user_type','竞标用户类型')->select(DemandTraits::$polymorphic); + }); + }); + } + + /** + * Make a show builder. + * + * @param mixed $id + * + * @return Show + */ + protected function detail($id) + { + return Show::make($id, new Demand(['publisher','biddingUser']), function (Show $show) { + $show->field('id'); + $show->field('title'); + $show->field('comment'); + $show->field('images')->image(); + $show->field('deadline'); + $show->field('bidding_user_type','竞标用户类型')->using(DemandTraits::$polymorphic); + $show->field('price'); + $show->field('stock'); + $show->field('state')->using(DemandTraits::$state)->dot( + [ + 1 => 'yellow', + 2 => 'danger', + 3 => 'success', + ] + );; + $show->field('created_at'); + }); + } + + /** + * Make a form builder. + * + * @return Form + */ + protected function form() + { + return Form::make(new Demand(), function (Form $form) { + $form->display('id'); + $form->text('title'); + $form->text('comment'); + $form->multipleImage('images','图片'); + $form->hidden('deadline'); + $form->select('bidding_user_type','竞标用户类型')->options([ + 'App\models\Supplier' => '供应商', + 'App\models\Guides' => '地接' + ]); + $form->decimal('price'); + $form->number('stock'); + $form->hidden('publisher_type'); + $form->hidden('publisher_id'); + $form->saving(function (Form $form) { + // 判断是否是新增操作 + if ($form->isCreating()) { + //处理流拍时间 + $form->deadline = now()->addDays(5); + //发布人身份 + $form->publisher_type = 'App\models\Agent'; + $form->publisher_id = Admin::user()->id; + } + }); + }); + } +} diff --git a/app/AdminAgent/Lazys/DemandBiddingLazys.php b/app/AdminAgent/Lazys/DemandBiddingLazys.php new file mode 100644 index 0000000..6ace0f9 --- /dev/null +++ b/app/AdminAgent/Lazys/DemandBiddingLazys.php @@ -0,0 +1,47 @@ +model()->where('demand_id',$demandId); + $grid->column('id'); + $grid->column('price','出价'); + $grid->column('comment','内容'); + $grid->column('biddingUser.name','竞拍人'); + $grid->column('bidding','竞标') + ->if(function () use ($demand){ + return $demand->state == 1; + }) + ->then(function (Grid\Column $column) { + $column->append('选中竞标'); + }) + ->if(function () use ($demand){ + return $demand->state == 2; + }) + ->then(function (Grid\Column $column) use ($demand){ + if ($demand->bidding_id == $this->id) { + $column->append('已中标'); + } else { + $column->append('未中标'); + } + }); + $grid->column('created_at'); + $grid->disableActions(); + $grid->disableRowSelector(); + }); + } +} diff --git a/app/AdminAgent/Repositories/Demand.php b/app/AdminAgent/Repositories/Demand.php new file mode 100755 index 0000000..4cb5fb1 --- /dev/null +++ b/app/AdminAgent/Repositories/Demand.php @@ -0,0 +1,16 @@ +resource('slide/list', 'SlideController'); $router->resource('special/list', 'SpecialController'); $router->resource('waterfall_ad/list', 'WaterfallAdController'); + $router->resource('demand', 'DemandController'); + $router->resource('demand_bidding', 'DemandBiddingController'); + $router->resource('my_demand', 'MyDemandController'); + + //api + $router->any('/api/demand/binding', 'DemandController@binding'); }); diff --git a/app/Models/Agent.php b/app/Models/Agent.php index 87e1555..5ab58ad 100644 --- a/app/Models/Agent.php +++ b/app/Models/Agent.php @@ -26,4 +26,19 @@ class Agent extends BaseModel { return $this->hasMany(AgentProduct::class); } + + public function demand() + { + return $this->morphOne('App\Models\Demand', 'publisher'); + } + + public function demandUser() + { + return $this->morphOne('App\Models\Demand', 'biddingUser'); + } + + public function demandBidding() + { + return $this->morphOne('App\Models\DemandBidding', 'biddingUser'); + } } diff --git a/app/Models/Demand.php b/app/Models/Demand.php new file mode 100755 index 0000000..48930b0 --- /dev/null +++ b/app/Models/Demand.php @@ -0,0 +1,25 @@ +morphTo(); + } + + public function biddingUser() + { + return $this->morphTo(); + } +} diff --git a/app/Models/DemandBidding.php b/app/Models/DemandBidding.php new file mode 100755 index 0000000..fe75024 --- /dev/null +++ b/app/Models/DemandBidding.php @@ -0,0 +1,19 @@ +morphTo(); + } +} diff --git a/app/Models/Guide.php b/app/Models/Guide.php index 0489b4d..310ea5d 100644 --- a/app/Models/Guide.php +++ b/app/Models/Guide.php @@ -16,4 +16,19 @@ class Guide extends BaseModel $this->attributes['password'] = password_hash($value, PASSWORD_BCRYPT); } } + + public function demand() + { + return $this->morphOne('App\Models\Demand', 'publisher'); + } + + public function demandUser() + { + return $this->morphOne('App\Models\Demand', 'biddingUser'); + } + + public function demandBidding() + { + return $this->morphOne('App\Models\DemandBidding', 'biddingUser'); + } } diff --git a/app/Models/Supplier.php b/app/Models/Supplier.php index 0fc9f08..0d4a9c9 100644 --- a/app/Models/Supplier.php +++ b/app/Models/Supplier.php @@ -16,4 +16,19 @@ class Supplier extends BaseModel $this->attributes['password'] = password_hash($value, PASSWORD_BCRYPT); } } + + public function demand() + { + return $this->morphOne('App\Models\Demand', 'publisher'); + } + + public function demandUser() + { + return $this->morphOne('App\Models\Demand', 'biddingUser'); + } + + public function demandBidding() + { + return $this->morphOne('App\Models\DemandBidding', 'biddingUser'); + } } diff --git a/app/Traits/DemandTraits.php b/app/Traits/DemandTraits.php new file mode 100644 index 0000000..a0c8ae2 --- /dev/null +++ b/app/Traits/DemandTraits.php @@ -0,0 +1,31 @@ + '代理商', + 'App\models\Supplier' => '供应商', + 'App\models\Guide' => '地接', + ]; + + public static $stateKey = [ + 1, + 2, + 3, + ]; + + public static $state = [ + 1 => '待竞标' , + 2 => '已竞标' , + 3 => '流拍' + ]; +} diff --git a/app/Traits/ResponseHelper.php b/app/Traits/ResponseHelper.php new file mode 100644 index 0000000..b77986e --- /dev/null +++ b/app/Traits/ResponseHelper.php @@ -0,0 +1,50 @@ + $code, + 'msg' => $msg, + 'data' => $data, + 'metal_data' => $metalData, + ]); + } + + public function jsonFail($code = 0, $msg = 'fail', $data = [], $metalData = []) + { + return Response::json([ + 'code' => $code, + 'msg' => $msg, + 'data' => $data, + 'metal_data' => $metalData, + ]); + } + + public function jsonFailValidated($msg = 'validate fail', $code = 5000, $data = [], $metalData = []) + { + return Response::json([ + 'code' => $code, + 'msg' => $msg, + 'data' => $data, + 'metal_data' => $metalData, + ]); + } + + public function jsonException(Throwable $e, $statusCode = 200) + { + return Response::json([ + 'code' => $e->getCode() ?: $statusCode, + 'msg' => $e->getMessage(), + 'data' => [], + 'metal_data' => [], + ], 500); + } +} diff --git a/database/migrations/2021_08_24_164921_create_demand_table.php b/database/migrations/2021_08_24_164921_create_demand_table.php new file mode 100644 index 0000000..a99e372 --- /dev/null +++ b/database/migrations/2021_08_24_164921_create_demand_table.php @@ -0,0 +1,45 @@ +id(); + $table->string('title')->comment('标题')->default(''); + $table->string('comment')->comment('内容')->default(''); + $table->dateTime('deadline')->comment('流拍时间')->nullable(); + $table->decimal('price')->comment('起拍价格')->default(0); + $table->integer('stock')->comment('库存')->default(0); + $table->string('publisher_type')->comment('发布人身份 类型 关联模型')->default(''); + $table->bigInteger('publisher_id')->index()->comment('发布人身份id 根据类型查不同的表')->default(1); + $table->tinyInteger('state')->comment('状态 1 待竞标 2 已竞标 3 流拍')->default(1); + $table->string('bidding_user_type')->comment('竞拍人 关联模型')->default(1); + $table->bigInteger('bidding_user_id')->index()->comment('竞拍成功人用户id 关联竞标表')->default(0); + $table->bigInteger('bidding_id')->index()->comment('竞拍成功id 关联竞标表')->default(0); + $table->string('images')->index()->comment('图片')->default(''); + $table->dateTime('created_at')->nullable(); + $table->dateTime('updated_at')->nullable(); + $table->dateTime('deleted_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('demand'); + } +} diff --git a/database/migrations/2021_08_24_165029_create_demand_bidding_table.php b/database/migrations/2021_08_24_165029_create_demand_bidding_table.php new file mode 100644 index 0000000..03740c1 --- /dev/null +++ b/database/migrations/2021_08_24_165029_create_demand_bidding_table.php @@ -0,0 +1,36 @@ +id(); + $table->decimal('price')->comment('报价')->default(0); + $table->string('comment')->comment('内容 解决方案')->default(''); + $table->bigInteger('demand_id')->index()->comment('市场需求表id 关联需求表表')->default(0); + $table->dateTime('created_at')->nullable(); + $table->dateTime('updated_at')->nullable(); + $table->dateTime('deleted_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('demand_bidding'); + } +} diff --git a/dcat_admin_ide_helper.php b/dcat_admin_ide_helper.php index 9bdf614..7cc58be 100644 --- a/dcat_admin_ide_helper.php +++ b/dcat_admin_ide_helper.php @@ -11,9 +11,6 @@ namespace Dcat\Admin { use Illuminate\Support\Collection; /** - * @property Grid\Column|Collection product_id - * @property Grid\Column|Collection know - * @property Grid\Column|Collection content * @property Grid\Column|Collection id * @property Grid\Column|Collection name * @property Grid\Column|Collection type @@ -40,14 +37,12 @@ namespace Dcat\Admin { * @property Grid\Column|Collection avatar * @property Grid\Column|Collection remember_token * @property Grid\Column|Collection agent_id - * @property Grid\Column|Collection picture - * @property Grid\Column|Collection tag - * @property Grid\Column|Collection desc * @property Grid\Column|Collection about * @property Grid\Column|Collection reg_protocol * @property Grid\Column|Collection buy_protocol - * @property Grid\Column|Collection agent_product_id * @property Grid\Column|Collection supplier_id + * @property Grid\Column|Collection agent_product_id + * @property Grid\Column|Collection product_id * @property Grid\Column|Collection product_ids * @property Grid\Column|Collection price * @property Grid\Column|Collection original_price @@ -72,11 +67,23 @@ namespace Dcat\Admin { * @property Grid\Column|Collection rate * @property Grid\Column|Collection author * @property Grid\Column|Collection image + * @property Grid\Column|Collection content * @property Grid\Column|Collection pid * @property Grid\Column|Collection sort * @property Grid\Column|Collection template + * @property Grid\Column|Collection tag * @property Grid\Column|Collection start_at * @property Grid\Column|Collection end_at + * @property Grid\Column|Collection comment + * @property Grid\Column|Collection deadline + * @property Grid\Column|Collection publisher_type + * @property Grid\Column|Collection publisher_id + * @property Grid\Column|Collection state + * @property Grid\Column|Collection bidding_user_type + * @property Grid\Column|Collection bidding_user_id + * @property Grid\Column|Collection bidding_id + * @property Grid\Column|Collection images + * @property Grid\Column|Collection demand_id * @property Grid\Column|Collection uuid * @property Grid\Column|Collection connection * @property Grid\Column|Collection queue @@ -88,6 +95,7 @@ namespace Dcat\Admin { * @property Grid\Column|Collection order_no * @property Grid\Column|Collection num * @property Grid\Column|Collection mobile + * @property Grid\Column|Collection picture * @property Grid\Column|Collection pay_type * @property Grid\Column|Collection coupon_id * @property Grid\Column|Collection paid_money @@ -97,19 +105,18 @@ namespace Dcat\Admin { * @property Grid\Column|Collection email * @property Grid\Column|Collection token * @property Grid\Column|Collection pictures + * @property Grid\Column|Collection know * @property Grid\Column|Collection url * @property Grid\Column|Collection picture_ad * @property Grid\Column|Collection channels * @property Grid\Column|Collection money * @property Grid\Column|Collection order_id + * @property Grid\Column|Collection desc * @property Grid\Column|Collection transaction_id * @property Grid\Column|Collection nickname * @property Grid\Column|Collection openid * @property Grid\Column|Collection unionid * - * @method Grid\Column|Collection product_id(string $label = null) - * @method Grid\Column|Collection know(string $label = null) - * @method Grid\Column|Collection content(string $label = null) * @method Grid\Column|Collection id(string $label = null) * @method Grid\Column|Collection name(string $label = null) * @method Grid\Column|Collection type(string $label = null) @@ -136,14 +143,12 @@ namespace Dcat\Admin { * @method Grid\Column|Collection avatar(string $label = null) * @method Grid\Column|Collection remember_token(string $label = null) * @method Grid\Column|Collection agent_id(string $label = null) - * @method Grid\Column|Collection picture(string $label = null) - * @method Grid\Column|Collection tag(string $label = null) - * @method Grid\Column|Collection desc(string $label = null) * @method Grid\Column|Collection about(string $label = null) * @method Grid\Column|Collection reg_protocol(string $label = null) * @method Grid\Column|Collection buy_protocol(string $label = null) - * @method Grid\Column|Collection agent_product_id(string $label = null) * @method Grid\Column|Collection supplier_id(string $label = null) + * @method Grid\Column|Collection agent_product_id(string $label = null) + * @method Grid\Column|Collection product_id(string $label = null) * @method Grid\Column|Collection product_ids(string $label = null) * @method Grid\Column|Collection price(string $label = null) * @method Grid\Column|Collection original_price(string $label = null) @@ -168,11 +173,23 @@ namespace Dcat\Admin { * @method Grid\Column|Collection rate(string $label = null) * @method Grid\Column|Collection author(string $label = null) * @method Grid\Column|Collection image(string $label = null) + * @method Grid\Column|Collection content(string $label = null) * @method Grid\Column|Collection pid(string $label = null) * @method Grid\Column|Collection sort(string $label = null) * @method Grid\Column|Collection template(string $label = null) + * @method Grid\Column|Collection tag(string $label = null) * @method Grid\Column|Collection start_at(string $label = null) * @method Grid\Column|Collection end_at(string $label = null) + * @method Grid\Column|Collection comment(string $label = null) + * @method Grid\Column|Collection deadline(string $label = null) + * @method Grid\Column|Collection publisher_type(string $label = null) + * @method Grid\Column|Collection publisher_id(string $label = null) + * @method Grid\Column|Collection state(string $label = null) + * @method Grid\Column|Collection bidding_user_type(string $label = null) + * @method Grid\Column|Collection bidding_user_id(string $label = null) + * @method Grid\Column|Collection bidding_id(string $label = null) + * @method Grid\Column|Collection images(string $label = null) + * @method Grid\Column|Collection demand_id(string $label = null) * @method Grid\Column|Collection uuid(string $label = null) * @method Grid\Column|Collection connection(string $label = null) * @method Grid\Column|Collection queue(string $label = null) @@ -184,6 +201,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection order_no(string $label = null) * @method Grid\Column|Collection num(string $label = null) * @method Grid\Column|Collection mobile(string $label = null) + * @method Grid\Column|Collection picture(string $label = null) * @method Grid\Column|Collection pay_type(string $label = null) * @method Grid\Column|Collection coupon_id(string $label = null) * @method Grid\Column|Collection paid_money(string $label = null) @@ -193,11 +211,13 @@ namespace Dcat\Admin { * @method Grid\Column|Collection email(string $label = null) * @method Grid\Column|Collection token(string $label = null) * @method Grid\Column|Collection pictures(string $label = null) + * @method Grid\Column|Collection know(string $label = null) * @method Grid\Column|Collection url(string $label = null) * @method Grid\Column|Collection picture_ad(string $label = null) * @method Grid\Column|Collection channels(string $label = null) * @method Grid\Column|Collection money(string $label = null) * @method Grid\Column|Collection order_id(string $label = null) + * @method Grid\Column|Collection desc(string $label = null) * @method Grid\Column|Collection transaction_id(string $label = null) * @method Grid\Column|Collection nickname(string $label = null) * @method Grid\Column|Collection openid(string $label = null) @@ -208,9 +228,6 @@ namespace Dcat\Admin { class MiniGrid extends Grid {} /** - * @property Show\Field|Collection product_id - * @property Show\Field|Collection know - * @property Show\Field|Collection content * @property Show\Field|Collection id * @property Show\Field|Collection name * @property Show\Field|Collection type @@ -237,14 +254,12 @@ namespace Dcat\Admin { * @property Show\Field|Collection avatar * @property Show\Field|Collection remember_token * @property Show\Field|Collection agent_id - * @property Show\Field|Collection picture - * @property Show\Field|Collection tag - * @property Show\Field|Collection desc * @property Show\Field|Collection about * @property Show\Field|Collection reg_protocol * @property Show\Field|Collection buy_protocol - * @property Show\Field|Collection agent_product_id * @property Show\Field|Collection supplier_id + * @property Show\Field|Collection agent_product_id + * @property Show\Field|Collection product_id * @property Show\Field|Collection product_ids * @property Show\Field|Collection price * @property Show\Field|Collection original_price @@ -269,11 +284,23 @@ namespace Dcat\Admin { * @property Show\Field|Collection rate * @property Show\Field|Collection author * @property Show\Field|Collection image + * @property Show\Field|Collection content * @property Show\Field|Collection pid * @property Show\Field|Collection sort * @property Show\Field|Collection template + * @property Show\Field|Collection tag * @property Show\Field|Collection start_at * @property Show\Field|Collection end_at + * @property Show\Field|Collection comment + * @property Show\Field|Collection deadline + * @property Show\Field|Collection publisher_type + * @property Show\Field|Collection publisher_id + * @property Show\Field|Collection state + * @property Show\Field|Collection bidding_user_type + * @property Show\Field|Collection bidding_user_id + * @property Show\Field|Collection bidding_id + * @property Show\Field|Collection images + * @property Show\Field|Collection demand_id * @property Show\Field|Collection uuid * @property Show\Field|Collection connection * @property Show\Field|Collection queue @@ -285,6 +312,7 @@ namespace Dcat\Admin { * @property Show\Field|Collection order_no * @property Show\Field|Collection num * @property Show\Field|Collection mobile + * @property Show\Field|Collection picture * @property Show\Field|Collection pay_type * @property Show\Field|Collection coupon_id * @property Show\Field|Collection paid_money @@ -294,19 +322,18 @@ namespace Dcat\Admin { * @property Show\Field|Collection email * @property Show\Field|Collection token * @property Show\Field|Collection pictures + * @property Show\Field|Collection know * @property Show\Field|Collection url * @property Show\Field|Collection picture_ad * @property Show\Field|Collection channels * @property Show\Field|Collection money * @property Show\Field|Collection order_id + * @property Show\Field|Collection desc * @property Show\Field|Collection transaction_id * @property Show\Field|Collection nickname * @property Show\Field|Collection openid * @property Show\Field|Collection unionid * - * @method Show\Field|Collection product_id(string $label = null) - * @method Show\Field|Collection know(string $label = null) - * @method Show\Field|Collection content(string $label = null) * @method Show\Field|Collection id(string $label = null) * @method Show\Field|Collection name(string $label = null) * @method Show\Field|Collection type(string $label = null) @@ -333,14 +360,12 @@ namespace Dcat\Admin { * @method Show\Field|Collection avatar(string $label = null) * @method Show\Field|Collection remember_token(string $label = null) * @method Show\Field|Collection agent_id(string $label = null) - * @method Show\Field|Collection picture(string $label = null) - * @method Show\Field|Collection tag(string $label = null) - * @method Show\Field|Collection desc(string $label = null) * @method Show\Field|Collection about(string $label = null) * @method Show\Field|Collection reg_protocol(string $label = null) * @method Show\Field|Collection buy_protocol(string $label = null) - * @method Show\Field|Collection agent_product_id(string $label = null) * @method Show\Field|Collection supplier_id(string $label = null) + * @method Show\Field|Collection agent_product_id(string $label = null) + * @method Show\Field|Collection product_id(string $label = null) * @method Show\Field|Collection product_ids(string $label = null) * @method Show\Field|Collection price(string $label = null) * @method Show\Field|Collection original_price(string $label = null) @@ -365,11 +390,23 @@ namespace Dcat\Admin { * @method Show\Field|Collection rate(string $label = null) * @method Show\Field|Collection author(string $label = null) * @method Show\Field|Collection image(string $label = null) + * @method Show\Field|Collection content(string $label = null) * @method Show\Field|Collection pid(string $label = null) * @method Show\Field|Collection sort(string $label = null) * @method Show\Field|Collection template(string $label = null) + * @method Show\Field|Collection tag(string $label = null) * @method Show\Field|Collection start_at(string $label = null) * @method Show\Field|Collection end_at(string $label = null) + * @method Show\Field|Collection comment(string $label = null) + * @method Show\Field|Collection deadline(string $label = null) + * @method Show\Field|Collection publisher_type(string $label = null) + * @method Show\Field|Collection publisher_id(string $label = null) + * @method Show\Field|Collection state(string $label = null) + * @method Show\Field|Collection bidding_user_type(string $label = null) + * @method Show\Field|Collection bidding_user_id(string $label = null) + * @method Show\Field|Collection bidding_id(string $label = null) + * @method Show\Field|Collection images(string $label = null) + * @method Show\Field|Collection demand_id(string $label = null) * @method Show\Field|Collection uuid(string $label = null) * @method Show\Field|Collection connection(string $label = null) * @method Show\Field|Collection queue(string $label = null) @@ -381,6 +418,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection order_no(string $label = null) * @method Show\Field|Collection num(string $label = null) * @method Show\Field|Collection mobile(string $label = null) + * @method Show\Field|Collection picture(string $label = null) * @method Show\Field|Collection pay_type(string $label = null) * @method Show\Field|Collection coupon_id(string $label = null) * @method Show\Field|Collection paid_money(string $label = null) @@ -390,11 +428,13 @@ namespace Dcat\Admin { * @method Show\Field|Collection email(string $label = null) * @method Show\Field|Collection token(string $label = null) * @method Show\Field|Collection pictures(string $label = null) + * @method Show\Field|Collection know(string $label = null) * @method Show\Field|Collection url(string $label = null) * @method Show\Field|Collection picture_ad(string $label = null) * @method Show\Field|Collection channels(string $label = null) * @method Show\Field|Collection money(string $label = null) * @method Show\Field|Collection order_id(string $label = null) + * @method Show\Field|Collection desc(string $label = null) * @method Show\Field|Collection transaction_id(string $label = null) * @method Show\Field|Collection nickname(string $label = null) * @method Show\Field|Collection openid(string $label = null) diff --git a/resources/lang/zh_CN/demand-bidding.php b/resources/lang/zh_CN/demand-bidding.php new file mode 100755 index 0000000..22e5e19 --- /dev/null +++ b/resources/lang/zh_CN/demand-bidding.php @@ -0,0 +1,13 @@ + [ + 'DemandBidding' => '我的竞标', + 'demand-bidding' => '我的竞标', + ], + 'fields' => [ + 'price' => '价格', + 'comment' => '内容', + ], + 'options' => [ + ], +]; diff --git a/resources/lang/zh_CN/demand.php b/resources/lang/zh_CN/demand.php new file mode 100755 index 0000000..5fb3854 --- /dev/null +++ b/resources/lang/zh_CN/demand.php @@ -0,0 +1,21 @@ + [ + 'Demand' => '市场需求', + 'demand' => '市场需求', + ], + 'fields' => [ + 'title' => '标题', + 'comment' => '内容', + 'deadline' => '流拍时间', + 'type' => '类型', + 'price' => '价格', + 'stock' => '库存', + 'publisher_type' => '发布人身份', + 'publisher_id' => '发布人', + 'state' => '状态', + 'bidding_id' => '竞拍成功id 关联竞标表', + ], + 'options' => [ + ], +]; diff --git a/resources/lang/zh_CN/my-demand.php b/resources/lang/zh_CN/my-demand.php new file mode 100755 index 0000000..03a4e7b --- /dev/null +++ b/resources/lang/zh_CN/my-demand.php @@ -0,0 +1,21 @@ + [ + 'MyDemand' => '我的需求', + 'my_demand' => '我的需求', + ], + 'fields' => [ + 'title' => '标题', + 'comment' => '内容', + 'deadline' => '流拍时间', + 'type' => '类型', + 'price' => '价格', + 'stock' => '库存', + 'publisher_type' => '发布人身份', + 'publisher_id' => '发布人', + 'state' => '状态', + 'bidding_id' => '竞拍成功id 关联竞标表', + ], + 'options' => [ + ], +];