去掉标的现价,展示标的均价

This commit is contained in:
吴方海
2025-04-25 16:06:03 +08:00
parent fe4b431faf
commit 2eb6617129
2 changed files with 5 additions and 4 deletions
@@ -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;
}
@@ -212,7 +212,7 @@ function getColModelGrid() {
label: '交易方向'
}, {
name: 'UnderlyingPrice',
label: '标的价'
label: '标的价'
}
];
}