This commit is contained in:
Your Name
2026-12-02 09:27:53 +08:00
parent 1e165a7894
commit 91e35cb905
21 changed files with 1780 additions and 421 deletions
@@ -47,6 +47,7 @@ class PrescriptionOrderValidate extends BaseValidate
'patient_name' => 'require|max:50',
'phone' => 'require|max:20',
'phone_tail' => 'max:20|regex:/^\\d*$/',
'order_no' => 'alphaDash|max:50',
];
protected $message = [
@@ -73,7 +74,6 @@ class PrescriptionOrderValidate extends BaseValidate
'is_follow_up', 'prev_staff', 'service_channel', 'service_package',
'tracking_number', 'express_company', 'ship_mode', 'fee_type', 'amount', 'remark_extra', 'remark_assistant', 'pay_order_ids',
],
'detail' => ['id'],
'editTime' => ['id', 'create_time'],
'edit' => [
'id', 'recipient_name', 'recipient_phone', 'shipping_address',
@@ -106,6 +106,30 @@ class PrescriptionOrderValidate extends BaseValidate
'confirmGancaoSubmission' => ['id', 'resolution', 'remote_order_no', 'note'],
];
public function sceneAttachReceipt(): PrescriptionOrderValidate
{
return $this->only(['id', 'pay_order_id'])
->append('id', 'require|integer|gt:0')
->append('pay_order_id', 'require|integer|gt:0');
}
public function sceneDetail(): PrescriptionOrderValidate
{
return $this->only(['id', 'prescription_id'])
->remove('prescription_id', 'require')
->append('prescription_id', 'gt:0');
}
public function scenePrescriptionOrdersForBinding(): PrescriptionOrderValidate
{
return $this->only(['prescription_id', 'order_no'])->append('prescription_id', 'gt:0');
}
public function sceneBindPrescription(): PrescriptionOrderValidate
{
return $this->only(['id', 'prescription_id'])->append('id', 'gt:0')->append('prescription_id', 'gt:0');
}
public function sceneUnlinkPayOrder(): PrescriptionOrderValidate
{
return $this->only(['id', 'pay_order_id'])