diff --git a/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs b/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs index d27f0f8e..8996b016 100644 --- a/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs +++ b/YLErpDAL/Modules/ExchangeTradeModule/ExchangeTradeQueryService.cs @@ -70,7 +70,7 @@ namespace YLErp.Modules.ExchangeTradeModule BookId = o.BookId, PositionCount = o.Position, OptionCode = o.InstrumentCode, - //PositionCost = o.PositionCost, + PositionCost = o.PositionCost, PositionType = o.PositionType == PositionTypeFlag.Long ? "多头" : "空头", UnderlyingCode = o.UnderlyingCode, ValueDate = o.UpdateTime, @@ -123,8 +123,9 @@ namespace YLErp.Modules.ExchangeTradeModule { item.Position = item.PositionCount / Underlying.ContractSize * Underlying.CountRatio; } - item.UnderlyingPrice = Underlying.Price.OtcFormat(OtcFormatFlag.marginRate); - item.PositionCost = item.PositionCount * Underlying.CountRatio; + var price = item.Position==0?0: item.PositionCost / item.Position; + item.UnderlyingPrice = (price*100).OtcFormat(OtcFormatFlag.umprice); + //item.PositionCost = item.PositionCount * Underlying.CountRatio; item.CountRatio = Underlying.CountRatio; } diff --git a/YLErpWeb/wwwroot/Scripts/app/trade/exchange/positionList.js b/YLErpWeb/wwwroot/Scripts/app/trade/exchange/positionList.js index 24552a1f..e2b39e55 100644 --- a/YLErpWeb/wwwroot/Scripts/app/trade/exchange/positionList.js +++ b/YLErpWeb/wwwroot/Scripts/app/trade/exchange/positionList.js @@ -212,7 +212,7 @@ function getColModelGrid() { label: '交易方向' }, { name: 'UnderlyingPrice', - label: '标的现价' + label: '标的均价' } ]; }