From 3b67f1b4dc09083d19af74190706aa8387ab84ea Mon Sep 17 00:00:00 2001 From: lemon <15040771@qq.com> Date: Thu, 23 Sep 2021 17:06:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/AgentProductController.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/AdminAgent/Controllers/AgentProductController.php b/app/AdminAgent/Controllers/AgentProductController.php index 51ec79e..3a7d626 100644 --- a/app/AdminAgent/Controllers/AgentProductController.php +++ b/app/AdminAgent/Controllers/AgentProductController.php @@ -280,12 +280,17 @@ class AgentProductController extends AdminController $options = Channel::selectOptions(fn($query) => $query->where('agent_id', $agent_id)); $form->multipleSelect('channel_id')->options(array_slice($options, 1, null, true)); - $form->currency('earnest')->symbol('¥') - ->default(0)->help('单位:元。不输入或输入 0 则不支持定金支付,必须和定金超时时间同时设置才会生效'); + $form->decimal('earnest','价格')->rules('required|numeric|min:0|not_in:0',[ + '*' => '金额为必填字段且必须大于0', + ]); + $form->number('earnest_timeout')->min(0) ->default(0)->help('单位:分钟。超过这个时间未支付尾款,订单将自动关闭,且定金不退'); - $form->currency('deposit')->symbol('¥') - ->default(0)->help('单位:元。不输入或输入 0 则不支持订金支付,必须和订金超时时间同时设置才会生效'); + + $form->decimal('deposit','价格')->rules('required|numeric|min:0|not_in:0',[ + '*' => '金额为必填字段且必须大于0', + ]); + $form->number('deposit_timeout')->min(0) ->default(0)->help('单位:分钟。超过这个时间未支付尾款,订单将自动关闭,且订金不退');