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); } } },