diff --git a/app/Http/Controllers/Business/CourierAgreementSignatures.php b/app/Http/Controllers/Business/CourierAgreementSignatures.php index 13e908ce..1547be58 100644 --- a/app/Http/Controllers/Business/CourierAgreementSignatures.php +++ b/app/Http/Controllers/Business/CourierAgreementSignatures.php @@ -91,7 +91,7 @@ class CourierAgreementSignatures extends Controller // signing_subject identifies our initiating company. The E-sign // organization must be the counterparty that receives this request. $data['organization_name'] = $this->counterpartyOrganizationName($data); - $data['operator_name'] = $data['operator_name'] ?? $data['courier_name']; + $data['operator_name'] = trim((string) ($data['operator_name'] ?? '')) ?: null; $data['operator_account'] = $data['esign_account']; $data['payload'] = $this->payload($data); @@ -282,7 +282,8 @@ class CourierAgreementSignatures extends Controller 'signing_deadline' => $date, 'esign_account' => ['required', 'string', 'max:255'], 'secondary_esign_account' => ['required_if:document_type,entity-change,cooperation-contract,authorization', 'nullable', 'string', 'max:255'], - 'operator_name' => ['nullable', 'string', 'max:100'], + 'operator_name' => ['required_if:document_type,account-proof,account-change', 'nullable', 'string', 'min:2', 'max:100'], + 'counterparty_organization_name' => ['required_if:document_type,account-proof,account-change', 'nullable', 'string', 'min:2', 'max:255'], 'archive_mode' => ['required', 'in:auto,manual'], 'account_proof_effective_date' => ['required_if:document_type,account-proof', 'date'], 'account_proof_account_name' => ['required_if:document_type,account-proof', 'string', 'max:255'], @@ -369,8 +370,7 @@ class CourierAgreementSignatures extends Controller private function counterpartyOrganizationName(array $data): string { return match ($data['document_type']) { - 'account-proof' => trim((string) $data['account_proof_account_name']), - 'account-change' => trim((string) $data['new_account_name']), + 'account-proof', 'account-change' => trim((string) $data['counterparty_organization_name']), 'shared-contract' => trim((string) (($data['shared_courier_names'][0] ?? null) ?: ($data['shared_courier_name'] ?? $data['courier_name']))), 'entity-change' => trim((string) ($data['former_company_name'] ?? $data['courier_name'])), 'authorization' => trim((string) ($data['principal_name'] ?? $data['courier_name'])), diff --git a/app/Support/CourierAgreementSignatureService.php b/app/Support/CourierAgreementSignatureService.php index 49149f11..f17fe566 100644 --- a/app/Support/CourierAgreementSignatureService.php +++ b/app/Support/CourierAgreementSignatureService.php @@ -285,15 +285,10 @@ final class CourierAgreementSignatureService $payload = $signature->payload ?? []; if (in_array($signature->document_type, ['account-proof', 'account-change'], true)) { - $name = $signature->organization_name; - $isOrganization = $this->looksLikeOrganization($name); - return [[ - 'signer_type' => $isOrganization ? 1 : 0, - 'organization_name' => $isOrganization ? $name : null, - 'operator_name' => $isOrganization - ? ($signature->operator_name ?: $signature->courier_name) - : $name, + 'signer_type' => 1, + 'organization_name' => $signature->organization_name, + 'operator_name' => $signature->operator_name, 'operator_account' => $signature->operator_account, ]]; } @@ -352,11 +347,6 @@ final class CourierAgreementSignatureService return [$primary]; } - private function looksLikeOrganization(string $name): bool - { - return preg_match('/公司|有限公司|有限责任|企业|集团|合作社|事务所|中心|厂/u', $name) === 1; - } - private function safeTitle(string $title): string { $title = preg_replace('/[^\p{Han}\p{L}\p{N}_ -]/u', '-', $title) ?: '协议签署'; diff --git a/resources/views/business/pages/courier-payables/agreement-signing.blade.php b/resources/views/business/pages/courier-payables/agreement-signing.blade.php index b3158a7c..1602d7f7 100644 --- a/resources/views/business/pages/courier-payables/agreement-signing.blade.php +++ b/resources/views/business/pages/courier-payables/agreement-signing.blade.php @@ -1427,9 +1427,15 @@

选择快递公司后自动带出工作平台的“电子签章经办人”(dzqzjbr);如资料未维护,可手工填写对方在 E 签宝实名绑定的手机号或邮箱。

+
+ + +

必须与对方 E 签宝企业认证名称一致;这是签署主体,不要求与银行卡持卡人姓名一致。

+
- - + + +

仅用于 E 签宝身份核验,不是收款人姓名;收款人姓名请填写在下方账户资料中。