From 7aa19f22df9cc23e5c24837800aacf0d05095a98 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Thu, 1 Aug 2024 14:01:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=BC=80=E7=A5=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BC=98=E5=8C=96=20=E6=96=B0=E5=A2=9E=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/InvoiceIssuance.php | 1 + app/validate/InvoiceIssuanceValidate.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controller/api/InvoiceIssuance.php b/app/controller/api/InvoiceIssuance.php index 90b6554..846a1db 100644 --- a/app/controller/api/InvoiceIssuance.php +++ b/app/controller/api/InvoiceIssuance.php @@ -44,6 +44,7 @@ class InvoiceIssuance extends Base $data['expire_time'] = strtotime($params['expire_time']); $data['mobile'] = $params['mobile']; $data['email'] = $params['email']; + $data['amount'] = $params['amount']; //验证 、 新建抬头、获取抬头id validate(InvoiceHeadValidate::class)->scene('type')->check($data); diff --git a/app/validate/InvoiceIssuanceValidate.php b/app/validate/InvoiceIssuanceValidate.php index ca53015..4ff2aa0 100644 --- a/app/validate/InvoiceIssuanceValidate.php +++ b/app/validate/InvoiceIssuanceValidate.php @@ -16,6 +16,7 @@ class InvoiceIssuanceValidate extends Validate 'expire_time|到期时间' => 'require', 'mobile|手机号' => 'require|mobile', 'email|邮箱' => 'require|email', + 'amount|开票金额' => 'require', 'id|发票编号' => 'require|number' ]; @@ -35,8 +36,8 @@ class InvoiceIssuanceValidate extends Validate * 验证场景. */ protected $scene = [ - 'add' => ['project_id', 'merge', 'pucode_id', 'expire_time', 'mobile', 'email'], - 'edit' => ['project_id', 'merge', 'pucode_id', 'expire_time', 'mobile', 'email', 'id'], + 'add' => ['project_id', 'merge', 'pucode_id', 'expire_time', 'mobile', 'email', 'amount'], + 'edit' => ['project_id', 'merge', 'pucode_id', 'expire_time', 'mobile', 'email', 'amount', 'id'], 'delete' => ['id'] ];