diff --git a/ft-app/app/templates/trades.html b/ft-app/app/templates/trades.html index a961dec..b99e3f8 100644 --- a/ft-app/app/templates/trades.html +++ b/ft-app/app/templates/trades.html @@ -166,7 +166,7 @@ {% set p = t.pnl %} {% if p is not none %} - + {% if p > 0 %}+{% endif %}{{ p }} - 盈亏合计 {% if ns.total_pnl > 0 %}+{% endif %}{{ '%.2f'|format(ns.total_pnl) }} + 盈亏合计 {% if ns.total_pnl > 0 %}+{% endif %}{{ '%.2f'|format(ns.total_pnl) }} | 开仓手续费 {{ '%.2f'|format(ns.total_open_fee) }} | @@ -306,7 +306,7 @@ function showPnlDrawer(title, direction, openPrice, closePrice, openFee, closeFe html += '开仓手续费-' + openFee.toFixed(2) + ''; html += '平仓手续费-' + closeFee.toFixed(2) + ''; document.getElementById('pnlTable').innerHTML = html; - document.getElementById('pnlResult').innerHTML = '盈亏 = ' + gross.toFixed(2) + ' - ' + openFee.toFixed(2) + ' - ' + closeFee.toFixed(2) + ' = ' + (result > 0 ? '+' : '') + result.toFixed(2) + ''; + document.getElementById('pnlResult').innerHTML = '盈亏 = ' + gross.toFixed(2) + ' - ' + openFee.toFixed(2) + ' - ' + closeFee.toFixed(2) + ' = ' + (result > 0 ? '+' : '') + result.toFixed(2) + ''; document.getElementById('pnlOverlay').style.display = 'block'; document.getElementById('pnlBox').style.display = 'block'; }