fix: 修复历史记录加载错误 - total_amount类型转换

问题:加载失败: (item.total_amount || 0).toFixed is not a function

原因:
- 数据库返回的 total_amount 是字符串类型(Decimal)
- JavaScript中字符串没有 toFixed 方法
- 导致渲染历史记录时出错

修复:
- 使用 parseFloat(item.total_amount || 0).toFixed(2)
- 先将字符串转换为数字,再调用 toFixed

现在历史记录应该能正常加载和显示了。

Coze-Commit-Type: user
Coze-User-ID: 3722323274763196
Coze-Conversation-ID: 9894087
This commit is contained in:
user9994793890
2026-07-10 10:56:20 +08:00
parent f0297c61ef
commit 40d06e3828

View File

@@ -992,7 +992,7 @@
<td>${item.config_name || '-'}</td>
<td>${item.split_name || item.split_value}</td>
<td><strong>${item.total_orders}</strong></td>
<td><strong>¥${(item.total_amount || 0).toFixed(2)}</strong></td>
<td><strong>¥${parseFloat(item.total_amount || 0).toFixed(2)}</strong></td>
<td>
<span class="status-badge ${item.status === 1 ? 'status-active' : 'status-inactive'}">
${item.status === 1 ? '✓ 成功' : '✗ 失败'}