From 969a27944471b55ebddaf05f9a61e0ef95243e14 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Tue, 18 Jan 2022 11:00:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=8E=E5=8F=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Forms/Settings/Dealer.php | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/app/Admin/Forms/Settings/Dealer.php b/app/Admin/Forms/Settings/Dealer.php index b9ec39fd..e56a7b3a 100644 --- a/app/Admin/Forms/Settings/Dealer.php +++ b/app/Admin/Forms/Settings/Dealer.php @@ -19,6 +19,7 @@ class Dealer extends Form */ public function handle(array $input) { + // dd($input); Setting::where('key', 'dealer')->updateOrCreate([ 'key' => 'dealer', ], ['value' => $input]); @@ -41,7 +42,49 @@ class Dealer extends Form $this->currency('upgrade_amount_'.DealerLvl::Contracted->value, '签约门槛')->symbol('¥'); $this->currency('upgrade_amount_'.DealerLvl::Special->value, '特邀门槛')->symbol('¥'); $this->currency('upgrade_amount_'.DealerLvl::Gold->value, '金牌门槛')->symbol('¥'); + $this->number('order_auto_allocate_times', '订单自动分配时间(小时)')->min(1); + + $this->divider('签约->签约->签约'); + $this->currency('channel_rules.'.DealerLvl::Contracted->value.'_'.DealerLvl::Contracted->value.'.'.DealerLvl::Contracted->value.'_0', '签约0')->symbol('¥'); + $this->currency('channel_rules.'.DealerLvl::Contracted->value.'_'.DealerLvl::Contracted->value.'.'.DealerLvl::Contracted->value.'_1', '签约1')->symbol('¥'); + $this->divider('签约->特邀->签约->签约'); + $this->currency('channel_rules.'.DealerLvl::Contracted->value.'_'.DealerLvl::Special->value.'.'.DealerLvl::Special->value.'_0', '特邀0')->symbol('¥'); + $this->currency('channel_rules.'.DealerLvl::Contracted->value.'_'.DealerLvl::Special->value.'.'.DealerLvl::Contracted->value.'_1', '签约1')->symbol('¥'); + $this->currency('channel_rules.'.DealerLvl::Contracted->value.'_'.DealerLvl::Special->value.'.'.DealerLvl::Contracted->value.'_2', '签约2')->symbol('¥'); + $this->divider('特邀->特邀->特邀'); + $this->currency('channel_rules.'.DealerLvl::Special->value.'_'.DealerLvl::Special->value.'.'.DealerLvl::Special->value.'_0', '特邀0')->symbol('¥'); + $this->currency('channel_rules.'.DealerLvl::Special->value.'_'.DealerLvl::Special->value.'.'.DealerLvl::Special->value.'_1', '特邀1')->symbol('¥'); + $this->divider('特邀->金牌->特邀->特邀'); + $this->currency('channel_rules.'.DealerLvl::Special->value.'_'.DealerLvl::Gold->value.'.'.DealerLvl::Gold->value.'_0', '金牌0')->symbol('¥'); + $this->currency('channel_rules.'.DealerLvl::Special->value.'_'.DealerLvl::Gold->value.'.'.DealerLvl::Special->value.'_1', '特邀1')->symbol('¥'); + $this->currency('channel_rules.'.DealerLvl::Special->value.'_'.DealerLvl::Gold->value.'.'.DealerLvl::Special->value.'_2', '特邀2')->symbol('¥'); + $this->divider('金牌->金牌'); + $this->currency('channel_rules.'.DealerLvl::Gold->value.'_'.DealerLvl::Gold->value.'.'.DealerLvl::Gold->value.'_0', '金牌0')->symbol('¥'); + + + // $this->embeds('channel_rules.'.DealerLvl::Contracted->value.'_'.DealerLvl::Contracted->value, '渠道补贴规则(签约->签约->签约)', function ($form) { + // $form->currency(DealerLvl::Contracted->value.'_0', '签约0')->symbol('¥'); + // $form->currency(DealerLvl::Contracted->value.'_1', '签约1')->symbol('¥'); + // }); + // $this->embeds('channel_rules.'.DealerLvl::Contracted->value.'_'.DealerLvl::Special->value, '渠道补贴规则(签约->特邀->签约->签约)', function ($form) { + // $form->currency(DealerLvl::Special->value.'_0', '特邀0')->symbol('¥'); + // $form->currency(DealerLvl::Contracted->value.'_1', '签约1')->symbol('¥'); + // $form->currency(DealerLvl::Contracted->value.'_2', '签约2')->symbol('¥'); + // }); + // $this->embeds('channel_rules.'.DealerLvl::Special->value.'_'.DealerLvl::Special->value, '渠道补贴规则(特邀->特邀->特邀)', function ($form) { + // $form->currency(DealerLvl::Special->value.'_0', '特邀0')->symbol('¥'); + // $form->currency(DealerLvl::Special->value.'_1', '特邀1')->symbol('¥'); + // }); + // $this->embeds('channel_rules.'.DealerLvl::Special->value.'_'.DealerLvl::Gold->value, '渠道补贴规则(特邀->金牌->特邀->特邀)', function ($form) { + // $form->currency(DealerLvl::Gold->value.'_0', '金牌0')->symbol('¥'); + // $form->currency(DealerLvl::Special->value.'_1', '特邀1')->symbol('¥'); + // $form->currency(DealerLvl::Special->value.'_2', '特邀2')->symbol('¥'); + // }); + // $this->embeds('channel_rules.'.DealerLvl::Gold->value.'_'.DealerLvl::Gold->value, '渠道补贴规则(金牌->金牌)', function ($form) { + // $form->currency(DealerLvl::Gold->value.'_0', '金牌0')->symbol('¥'); + // }); + $this->table('purchase_rules', '进货补贴规则', function ($table) { $table->number('price', '阶梯(万)'); $table->currency('rate', '比例(百分比)')->symbol('%'); @@ -93,6 +136,7 @@ class Dealer extends Form 'alipay'=>$dealerSettings['alipay'] ?? [], 'wechat' =>$dealerSettings['wechat'] ?? [], 'purchase_rules'=>$dealerSettings['purchase_rules'] ?? [], + 'channel_rules'=>$dealerSettings['channel_rules'] ?? [], ]; } }