@model TradeViewModel @using YLErp.Modules.CalculationModule @{ Layout = null; var tradeModel = Model.Trade; var isPremiumRate = tradeModel.IsUsePremiumRate == true; var risky = tradeModel.trade_risky_option; var isMoneyness = tradeModel.IsMoneynessOption == "是"; var rebatFmt = isPremiumRate ? OtcFormatFlag.premiumRateP : OtcFormatFlag.tradeSinglePrice; var volFmt = PS.Config.IsTradeVol && PS.Config.ErpElement.VolMoreAccurate ? OtcFormatFlag.percent4 : OtcFormatFlag.percent; var salesNames = String.Join(",", Model.SalesCommission.Select(n => n.SalesmanName).ToArray()); var isJd = tradeModel.UnderlyingCode?.Trim().ToUpper().StartsWith("JD") ?? false; tradeModel.TradeUnit = PS.Config.IsUseDisplayNotional ? (tradeModel.QuoteUnit == "500千克" ? "半吨" : (isJd ? "吨" : tradeModel.QuoteUnit)) : tradeModel.TradeUnit; }
@if (isPremiumRate) { } else { } @if (!string.IsNullOrEmpty(Model.OriginalStockEqvNotionalV2MultipleExchangeRate)) { } @if (PS.Config.IsTradeVol) { } @if (PS.Config.IsTradeVol) { } else { } @{ tradeModel.MetaDic.TryGetValue("AnnualizeFactor", out var factor); } @if (!string.IsNullOrEmpty(tradeModel.QuoteCurrency) && tradeModel.QuoteCurrency != "CNY") { } @if (Model.showInitialMargin) { } @if (AppHelper.UseFutureVersion("销售提成", "V2")) { } @{ tradeModel.MetaDic.TryGetValue(YLErp.DBModels.Consts.ConsTradeMetaKey.ClearingAgency, out var clearingAgency); tradeModel.MetaDic.TryGetValue(YLErp.DBModels.Consts.ConsTradeMetaKey.TradingPlace, out var tradingPlace); tradeModel.MetaDic.TryGetValue(YLErp.DBModels.Consts.ConsTradeMetaKey.MainProtocolCode, out var mainProtocolCode); tradeModel.MetaDic.TryGetValue(YLErp.DBModels.Consts.ConsTradeMetaKey.SupProtocolCode, out var supProtocolCode); } @if (!PS.Config.Is润和) { } @if (PS.Config.ErpElement.SecuritiesEnvironment) { } @if (!PS.Config.Is润和) { } else { } @if (!PS.Config.ErpElement.SecuritiesEnvironment) { } @if (CurUser.交易管理_交易标签查看权限) { }
簿记账户 @(tradeModel.AssetBookName)期权费率 @(tradeModel.PremiumRate.OtcFormat(OtcFormatFlag.premiumRateP)) 权利金 @(tradeModel.TradeSinglePrice.OtcFormat(OtcFormatFlag.tradeSinglePrice)) @if (tradeModel.TradeSinglePrice != null) { @(tradeModel.QuoteUnitSingle) }
交易员 @(tradeModel.TraderName) 成交数量 @(TradeCalcHelper.GetTradeAmountV(tradeModel).OtcFormatNotional(tradeModel.CountRatio, PS.Config.IsUseDisplayNotional)) @(tradeModel.TradeUnit)
交易对手方 @(tradeModel.ClientName) 成交总额 @(tradeModel.TradePrice.OtcFormatMoney())
交易编号 @(tradeModel.TradeNumber) 名义本金 @(tradeModel.OriginalStockEqvNotionalV2.OtcFormat(OtcFormatFlag.StockEqvNotional))
交易方向 @(tradeModel.BuySell) 期权类型 @(tradeModel.ExerciseModeCn) @(tradeModel.TradeType.Replace("期权", ""))@(tradeModel.OptionType)
名义本金(结算币种) @Model.OriginalStockEqvNotionalV2MultipleExchangeRate
标的代码 @(tradeModel.UnderlyingCode) 持仓数量 @(TradeCalcHelper.GetTradeAmountV(tradeModel, tradeModel.Notional).OtcFormatNotional(tradeModel.CountRatio, PS.Config.IsUseDisplayNotional))
期初标的价格 @(tradeModel.SpotPrice.OtcFormat(OtcFormatFlag.umprice)) 执行价格1 @(risky?.Strike1.OtcFormatUmPrice(isMoneyness))
执行价格2 @(risky?.Strike2.OtcFormatUmPrice(isMoneyness)) 执行价格3 @(risky?.Strike3.OtcFormatUmPrice(isMoneyness))
成交波动率 @(tradeModel.TradeOpenVolatility.OtcFormat(volFmt)) 目标波动率 @(tradeModel.TradeCloseVolatility.OtcFormat(volFmt))
成交日期 @(tradeModel.TradeDate.OtcFormatDate())平滑过渡天数 @(tradeModel.NumOfSmoothingDays)
权利金应付日 @(tradeModel.PremiumPayDate.OtcFormatDate())
保底收益 @if (isPremiumRate) { @(tradeModel.PrincipalRateWrite.OtcFormatPercent()) } else { @(tradeModel.SinglePrincipalWrite.OtcFormatMoney()) if (tradeModel.TradeSinglePrice != null) { @(tradeModel.QuoteUnitSingle) } } 保底收益总额 @(tradeModel.OriginalPrincipalSum.OtcFormatMoney())
到期日期 @(tradeModel.ExerciseDate.OtcFormatDate()) 无风险利率 @(tradeModel.NoRiskRate.OtcFormatPercent())
结算日期 @(tradeModel.SettlementDate.OtcFormatDate()) 分红率 @(tradeModel.DividendRate.OtcFormatPercent())
参与率1 @(risky?.ParticipationRate1.OtcFormatPercent()) 参与率2 @(risky?.ParticipationRate2.OtcFormatPercent())
参与率3 @(risky?.ParticipationRate3.OtcFormatPercent()) 收益结算 @(tradeModel.SettlementTypeDesc)
期权年化 @(tradeModel.IsAnnualized ? '是' : '否') 年化系数 @(factor)
交易状态 @(tradeModel.TradeStatus)
预付金模板 @tradeModel.MarginTemplateName 预付金算法 @(YLErp.Helpers.EnumHelper.GetDescriptionByName(tradeModel.MarginType))
计价币种 @tradeModel.QuoteCurrency 汇率 @(tradeModel.MetaDic.ContainsKey("ExchangeRate") ? tradeModel.MetaDic["ExchangeRate"] : "")
初始预付金率 @(tradeModel.MarginType <= MarginTypeEnum.NONE ? "" : tradeModel.MarginRate.OtcFormat(OtcFormatFlag.marginRateP)) 持仓预付金率 @(tradeModel.MarginType == MarginTypeEnum.FIXED || tradeModel.MarginType == MarginTypeEnum.FLOATP ? tradeModel.PositionMarginRate.OtcFormat(OtcFormatFlag.marginRateP) : "")
初始预付金 @(tradeModel.InitialMargin.OtcFormatMoney())
@(PS.Config.ErpElement.SaleMode == YLErp.Configuration.Enums.SaleMode.SaleMen ? "销售员" : "客户经理") @(salesNames) 销售提成 @(Model.SalesCommission.FirstOrDefault()?.CommissionString())
交易场所 @(tradingPlace) 清算机构 @(clearingAgency)
主协议编号 @(mainProtocolCode) 补充协议编号 @(supProtocolCode)
是否有效 @(tradeModel.ValidState == "InValid" ? "否" : "是")交易对手方 @(tradeModel.OpponentRole ?? "乙方")
中央对手方清算 @{ tradeModel.MetaDic.TryGetValue(YLErp.DBModels.Consts.ConsTradeMetaKey.IsCentralClearing, out var isCentralClearing); } @(isCentralClearing == "Y" ? "是" : isCentralClearing == "I" ? "计划中央对手方清算" : "否") 中央清算平台 @{ tradeModel.MetaDic.TryGetValue(YLErp.DBModels.Consts.ConsTradeMetaKey.CentralClearingPaltform, out var centralClearingPaltform); } @centralClearingPaltform
交易平台 @{ tradeModel.MetaDic.TryGetValue(YLErp.DBModels.Consts.ConsTradeMetaKey.TradingPaltform, out var tradingPaltform); } @tradingPaltform
备注 @if (tradeModel.RemarkInfo != null && tradeModel.RemarkInfo.StartsWith("http://")) { @(tradeModel.RemarkInfo) } else { @(tradeModel.RemarkInfo) }
标签
@if (Model.Tags != null && Model.Tags.Any()) { foreach (var tag in Model.Tags) { @tag.Name @if (CurUser.交易管理_交易标签调整权限) { x } } } @if (CurUser.交易管理_交易标签调整权限) { + }
@if (tradeModel.Propertys != null) { var i = 0; var length = tradeModel.Propertys.Count; var preProperty = new ExtendInfoModel(); @foreach (var property in tradeModel.Propertys) { i++; if (i % 2 == 1) { preProperty = property; if (i == length) { } } else { } }
@property.name @property.value
@preProperty.name @preProperty.value @property.name @property.value
}
@if (Model.unWindTradeCashList != null) { var index = 1;
@foreach (var tradeCash in Model.unWindTradeCashList) { if (tradeCash.Action == "系统操作-行权费") { @if (isPremiumRate) { } else { }
提前终止序号 @(index++)行权比例 @(tradeCash.NotionalPercent.OtcFormatPercent())行权数量 @(tradeCash.TradeAmount.OtcFormatNotional(tradeModel.CountRatio, PS.Config.IsUseDisplayNotional))
行权日期 @(tradeCash.ValueDate.OtcFormatDate()) 收益总额 @(tradeCash.Amount.OtcFormatMoney())
行权收益 @(tradeCash.SingleWinPrice.OtcFormat(OtcFormatFlag.tradeSinglePrice)) 实现盈亏 @(tradeCash.WinLoss)
行权标的价格 @(tradeCash.FinalPrice.OtcFormat(OtcFormatFlag.umprice))
} else { @if (isPremiumRate) { } else { } @if (isPremiumRate) { } else { }
提前终止序号 @(index++)平仓单价 @(tradeCash.UnwindPricePercentRate.OtcFormat(OtcFormatFlag.premiumRateP))平仓单价 @(tradeCash.UnwindPrice.OtcFormat(OtcFormatFlag.tradeSinglePrice))
平仓日期 @(tradeCash.ValueDate.OtcFormatDate())平仓比例 @(tradeCash.UnwindPercentRate.OtcFormatPercent())平仓数量 @(tradeCash.UnwindTradeAmount.OtcFormatNotional(tradeModel.CountRatio, PS.Config.IsUseDisplayNotional))
平仓标的价格 @(tradeCash.FinalPrice.OtcFormat(OtcFormatFlag.umprice)) 平仓总额 @(tradeCash.Amount.OtcFormatMoney())
平仓波动率 @(tradeCash.UnwindVol.OtcFormat(volFmt)) 实现盈亏 @(tradeCash.WinLoss)
} }
} @if (Model.maturityTradeCash != null) { var mtc = Model.maturityTradeCash; var asianStrikeType = tradeModel.TradeType != "亚式期权" ? string.Empty : (tradeModel.trade_asian_option?.StrikeType == "Floating" ? "Floating" : "Fixed");
@if (isPremiumRate) { } else { } @if (isPremiumRate && mtc.Action != "系统操作-行权费") { } else { } @if (!string.IsNullOrEmpty(asianStrikeType)) { @if (asianStrikeType == "Fixed") { } else { } }
到期日期 @(mtc.ValueDateString)到期比例 @(mtc.NotionalPercent.OtcFormatPercent())到期数量 @(mtc.TradeAmount.OtcFormatNotional(tradeModel.CountRatio, PS.Config.IsUseDisplayNotional))
到期收益 @(mtc.SingleWinPricePercent.OtcFormat(OtcFormatFlag.premiumRateP))到期收益 @(mtc.SingleWinPrice.OtcFormat(OtcFormatFlag.tradeSinglePrice))实现盈亏 @(mtc.WinLoss)
@(asianStrikeType == "Fixed" ? "到期标的均价" : "到期标的价格") @(mtc.FinalPrice.OtcFormat(OtcFormatFlag.umprice)) 收益总额 @(mtc.Amount.OtcFormatMoney())
到期标的价格 @(mtc.SpotPrice.OtcFormat(OtcFormatFlag.umprice))浮动行权价 @(mtc.Strike.OtcFormat(OtcFormatFlag.umprice))
} @if (Model.tradeMarginTemplates != null && Model.tradeMarginTemplates.Any()) {
@foreach (var tradeMarginTemplate in Model.tradeMarginTemplates) { }
模板名称 预付金规则 规则类型 生效日期 操作时间 规则说明
@(tradeMarginTemplate.MarginTemplateName) @(tradeMarginTemplate.MarginRuleTypeName) @(tradeMarginTemplate.MarginTypeName) @(tradeMarginTemplate.ValueDate.ToString("yyyy-MM-dd")) @(tradeMarginTemplate.OptDate) @(tradeMarginTemplate.Comments)
} @if (ConsTrade.TradeStatusAfterConfirmed.Contains(Model.Trade.TradeStatus)) {
@if (CurUser.交易管理_交易资金维护 && (!Model.IsOnlyCloseButton || Context.Request.Query["fromZiJinMingXi"] == "1")) { } @if ((CurUser.交易管理_交易资金维护 || CurUser.交易管理_已确认交易资金维护) && (!Model.IsOnlyCloseButton || Context.Request.Query["fromZiJinMingXi"] == "1")) { }
}