From 2e21d799dc62107bbd034f8ea8a8c96a3d58f7dd Mon Sep 17 00:00:00 2001 From: "zheng.zhang" Date: Wed, 17 Jun 2026 17:22:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor(tradeEdit):=20use=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=96=B9=E6=B3=95=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=90=8D=E4=B9=89=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/Scripts/app/trade/forwardTradeEditV2.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/YLErpWeb/wwwroot/Scripts/app/trade/forwardTradeEditV2.js b/YLErpWeb/wwwroot/Scripts/app/trade/forwardTradeEditV2.js index fbe333b7..e93a9764 100644 --- a/YLErpWeb/wwwroot/Scripts/app/trade/forwardTradeEditV2.js +++ b/YLErpWeb/wwwroot/Scripts/app/trade/forwardTradeEditV2.js @@ -606,15 +606,15 @@ var vue = new Vue({ }, //变更交易手数 changeLots() { - this.trade.Notional = this.trade.Lots * this.viewState.underlying.ContractSize; + this.trade.Notional = consFormat.notional(this.trade.Lots * this.viewState.underlying.ContractSize); this.trade.OriginalNotional = this.trade.Notional; - this.trade.TradeAmount = this.trade.Notional / this.viewState.underlying.CountRatio; + this.trade.TradeAmount = consFormat.notional(this.trade.Lots * this.viewState.underlying.ContractSize / this.viewState.underlying.CountRatio); this.resetTradePrice(true); }, //变更交易数量 changeTradeAmount() { - this.trade.Lots = this.trade.TradeAmount * this.viewState.underlying.CountRatio / this.viewState.underlying.ContractSize; - this.trade.Notional = this.trade.Lots * this.viewState.underlying.ContractSize; + this.trade.Lots = _.round(this.trade.TradeAmount * this.viewState.underlying.CountRatio / this.viewState.underlying.ContractSize, InputFormatLots.precision); + this.trade.Notional = consFormat.notional(this.trade.TradeAmount * this.viewState.underlying.CountRatio); this.trade.OriginalNotional = this.trade.Notional; this.resetTradePrice(true); }, @@ -711,9 +711,9 @@ var vue = new Vue({ let SpotPrice1 = parseFloat(this.trade.SpotPrice1 || 0); let SpotPrice2 = parseFloat(this.trade.SpotPrice2 || 0); if (SpotPrice1 > SpotPrice2) { - this.trade.StockEqvNotional = this.trade.SpotPrice1 * this.trade.Notional; + this.trade.StockEqvNotional = consFormat.StockEqvNotional(this.trade.SpotPrice1 * this.trade.Notional); } else { - this.trade.StockEqvNotional = this.trade.SpotPrice2 * this.trade.Notional; + this.trade.StockEqvNotional = consFormat.StockEqvNotional(this.trade.SpotPrice2 * this.trade.Notional); } } },