fix: 修复审批后消息卡片更新和多行程显示问题

1. 审批人审批后,自己的消息卡片也更新为显示查看详情按钮
   - 新增 updateActorMessageCard() 方法更新操作人自己的卡片
   - 审批通过/拒绝时同时更新操作人和其他审批人的卡片

2. 多行程路线在审批详情中正确显示
   - 特殊处理 itineraries 字段,展示每个行程的详细信息
   - 添加行程列表样式,包括目的地、日期、费用等

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-01 12:46:41 +08:00
parent b90f901fd9
commit f8524d333c
4 changed files with 236 additions and 0 deletions
+30
View File
@@ -134,6 +134,16 @@ class ApprovalService
$approvedCount = count($approvedRecords);
if ($this->notificationService) {
// 更新操作人自己的消息卡片
$this->notificationService->setAppByUser($approverId);
$this->notificationService->updateActorMessageCard(
$order->id,
$currentNode->id,
$approverId,
'approved'
);
// 更新其他审批人的消息卡片
$this->notificationService->updateMessageCardsForPartialApprove(
$order->id,
$currentNode->id,
@@ -152,6 +162,16 @@ class ApprovalService
$approverName = $approver ? $approver->name : '未知';
if ($this->notificationService) {
// 更新操作人自己的消息卡片
$this->notificationService->setAppByUser($approverId);
$this->notificationService->updateActorMessageCard(
$order->id,
$currentNode->id,
$approverId,
'approved'
);
// 更新其他审批人的消息卡片
$this->notificationService->updateMessageCards(
$order->id,
$currentNode->id,
@@ -239,6 +259,16 @@ class ApprovalService
}
if ($currentNode) {
// 更新操作人自己的消息卡片
$this->notificationService->setAppByUser($approverId);
$this->notificationService->updateActorMessageCard(
$order->id,
$currentNode->id,
$approverId,
'rejected'
);
// 更新其他审批人的消息卡片
$this->notificationService->updateMessageCards(
$order->id,
$currentNode->id,