新增接单模板价格同步

This commit is contained in:
yml2213
2026-08-20 20:24:00 +08:00
parent 6539e0fb21
commit e05a6797a3
9 changed files with 437 additions and 3 deletions
@@ -230,6 +230,16 @@ export function formatWorkOrderEvent(event: WorkOrderEvent): EventNodeStyle {
return { title: '更改了订单信息', color: 'default' }
case 'sharing_config_updated':
return { title: '更新了拼单配置', color: 'default' }
case 'price_synced_from_rule': {
const rewardAmount = Number(readPayload(event, 'rewardAmount') || 0)
const unitReward = Number(readPayload(event, 'sharingUnitReward') || 0)
return {
title: unitReward > 0 ? '从接单模板同步了拼单剩余份额价格' : '从接单模板同步了接单价格',
description:
rewardAmount > 0 ? `同步后预计总报酬:${(rewardAmount / 100).toFixed(2)}` : undefined,
color: 'default',
}
}
case 'sharing_share_cancelled_by_admin': {
const workerId = readPayload(event, 'workerId')
const quantity = readPayload(event, 'quantity')