fix: 优化买入订单分组的卖出状态文案显示

- 当完全成交数为0时,显示'未卖出'而不是'部分成交 (0/X)'
- 统一状态文案:'部分成交'改为'部分卖出','全部成交'改为'全部卖出'
- 更新中英文和繁体中文的多语言配置
- 优化筛选选项中的状态文案,与分组显示保持一致
This commit is contained in:
WrBug
2026-01-20 11:44:33 +08:00
parent db8471bb16
commit 45734c051e
4 changed files with 24 additions and 19 deletions
+3 -2
View File
@@ -1109,8 +1109,9 @@
"groupByMarket": "Group by Market",
"expandAll": "Expand All",
"collapseAll": "Collapse All",
"allFullyMatched": "All Fully Matched",
"partiallyMatched": "Partially Matched",
"allFullyMatched": "All Fully Sold",
"notSold": "Not Sold",
"partiallyMatched": "Partially Sold",
"orderCount": "Order Count",
"totalAmount": "Total Amount",
"totalPnl": "Total PnL",
+5 -4
View File
@@ -1080,8 +1080,8 @@
"sellStatus": "卖出状态",
"status": "状态",
"statusFilled": "未成交",
"statusPartiallySold": "部分成交",
"statusFullySold": "全部成交",
"statusPartiallySold": "部分卖出",
"statusFullySold": "全部卖出",
"realizedPnl": "已实现盈亏",
"createdAt": "创建时间",
"matchedAt": "匹配时间",
@@ -1110,8 +1110,9 @@
"groupByMarket": "按市场分组",
"expandAll": "展开全部",
"collapseAll": "折叠全部",
"allFullyMatched": "全部成交",
"partiallyMatched": "部分成交",
"allFullyMatched": "全部卖出",
"notSold": "未卖出",
"partiallyMatched": "部分卖出",
"orderCount": "订单数",
"totalAmount": "总金额",
"statusBreakdown": "状态",
+5 -4
View File
@@ -1080,8 +1080,8 @@
"sellStatus": "賣出狀態",
"status": "狀態",
"statusFilled": "已完成",
"statusPartiallySold": "部分成交",
"statusFullySold": "全部成交",
"statusPartiallySold": "部分賣出",
"statusFullySold": "全部賣出",
"realizedPnl": "已實現盈虧",
"createdAt": "創建時間",
"matchedAt": "匹配時間",
@@ -1109,8 +1109,9 @@
"groupByMarket": "按市場分組",
"expandAll": "展開全部",
"collapseAll": "折疊全部",
"allFullyMatched": "全部成交",
"partiallyMatched": "部分成交",
"allFullyMatched": "全部賣出",
"notSold": "未賣出",
"partiallyMatched": "部分賣出",
"orderCount": "訂單數",
"totalAmount": "總金額",
"totalPnl": "總盈虧",
@@ -373,10 +373,12 @@ const BuyOrdersTab: React.FC<BuyOrdersTabProps> = ({ copyTradingId, active = fal
</span>
)}
{group.stats.fullyMatched ? (
<Tag color="success">{t('copyTradingOrders.allFullyMatched') || '全部成交'}</Tag>
<Tag color="success">{t('copyTradingOrders.allFullySold') || '全部卖出'}</Tag>
) : group.stats.fullyMatchedCount === 0 ? (
<Tag color="default">{t('copyTradingOrders.notSold') || '未卖出'}</Tag>
) : (
<Tag color="warning">
{t('copyTradingOrders.partiallyMatched') || '部分成交'} ({group.stats.fullyMatchedCount}/{group.stats.count})
{t('copyTradingOrders.partiallySold') || '部分卖出'} ({group.stats.fullyMatchedCount}/{group.stats.count})
</Tag>
)}
</div>
@@ -384,10 +386,10 @@ const BuyOrdersTab: React.FC<BuyOrdersTabProps> = ({ copyTradingId, active = fal
<span>{t('copyTradingOrders.orderCount') || '订单数'}: {group.stats.count}</span>
<span>{t('copyTradingOrders.totalAmount') || '总金额'}: {formatUSDC(group.stats.totalAmount)} USDC</span>
<span>
{t('copyTradingOrders.statusBreakdown') || '状态'}:
{group.stats.fullyMatchedCount > 0 && ` ${t('copyTradingOrders.statusFullySold') || '全部成交'} ${group.stats.fullyMatchedCount}`}
{group.stats.partiallyMatchedCount > 0 && ` ${t('copyTradingOrders.statusPartiallySold') || '部分成交'} ${group.stats.partiallyMatchedCount}`}
{group.stats.filledCount > 0 && ` ${t('copyTradingOrders.statusFilled') || '未成交'} ${group.stats.filledCount}`}
{t('copyTradingOrders.statusBreakdown') || '状态'}:
{group.stats.fullyMatchedCount > 0 && ` ${t('copyTradingOrders.allFullySold') || '全部卖出'} ${group.stats.fullyMatchedCount}`}
{group.stats.partiallyMatchedCount > 0 && ` ${t('copyTradingOrders.partiallySold') || '部分卖出'} ${group.stats.partiallyMatchedCount}`}
{group.stats.filledCount > 0 && ` ${t('copyTradingOrders.notSold') || '未卖出'} ${group.stats.filledCount}`}
</span>
</div>
</div>
@@ -668,9 +670,9 @@ const BuyOrdersTab: React.FC<BuyOrdersTabProps> = ({ copyTradingId, active = fal
value={filters.status}
onChange={(value) => setFilters({ ...filters, status: value || undefined })}
>
<Option value="filled">{t('copyTradingOrders.statusFilled') || '未成交'}</Option>
<Option value="partially_matched">{t('copyTradingOrders.statusPartiallySold') || '部分成交'}</Option>
<Option value="fully_matched">{t('copyTradingOrders.statusFullySold') || '全部成交'}</Option>
<Option value="filled">{t('copyTradingOrders.notSold') || '未卖出'}</Option>
<Option value="partially_matched">{t('copyTradingOrders.partiallySold') || '部分卖出'}</Option>
<Option value="fully_matched">{t('copyTradingOrders.allFullySold') || '全部卖出'}</Option>
</Select>
<Space>