Files
zszq-trs/YLErpWeb/Views/underlying_manager/underlying_managerView.cshtml
T

238 lines
8.7 KiB
Plaintext

@model UnderlyingManagerDto
@{
ViewBag.Title = "标的管理|查看";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
UnderlyingBond bond = null;
if (Model.IsBond())
{
bond = JsonHelper.Deserialize<UnderlyingBond>(Model.ExJson) ?? new UnderlyingBond();
}
var pageObj = new
{
showDeltaS_S = PS.Config.Is长江
};
}
@section JS{
<script type="text/javascript">
function deleteunderlying_manager(id) {
main.confirmPost("确定删除吗?", "/underlying_manager/Deleteunderlying_manager", { id: id, d: new Date() })
.done(function () {
window.parent.location.reload();
});
}
</script>
}
<div class="toolbarDiv">
@if (CurUser.基础参数管理.标的资产编辑)
{
@MyControls.Btn("修改", "window.location.href=('/underlying_manager/underlying_managerEdit/?enid=" + Model.EncryptId + "');")
}
@MyControls.Btn("关闭", "layer.closeMe();")
</div> @Html.HiddenFor(model => model.id)
<div class="yc-panel">
<table class="table table-bordered table-hover">
<colgroup>
<col span="1" width="200" />
</colgroup>
<tbody>
<tr>
@Html.MyDisplayFor(m => m.MarketName)
@Html.MyDisplayFor(m => m.UnderlyingInstrumentTypeCn)
</tr>
<tr>
@Html.MyDisplayFor(m => m.UnderlyingCode)
@Html.MyDisplayFor(m => m.UnderlyingName)
</tr>
<tr>
@Html.MyDisplayFor(m => m.UnderlyingEnName)
@Html.MyDisplayFor(m => m.BBGTicker)
</tr>
@if (Model.UnderlyingInstrumentType == ConsGlobal.InstrumentType.Fund)
{
<tr>
@Html.MyDisplayFor(m => m.InvestAdvisorName)
@Html.MyDisplayFor(m => m.EtfSubType)
</tr>
}
<tr>
@Html.MyDisplayFor(m => m.UnderlyingType)
@if (pageObj.showDeltaS_S)
{
<th class="tdRight">DeltaS/S</th>
<td>@Model.DeltaS_S.OtcFormatPercent()</td>
}
else
{
<td></td>
<td></td>
}
</tr>
<tr>
@Html.MyDisplayFor(m => m.MaturityDate, Utilities.ShowValidDatetime(Model.MaturityDate))
@Html.MyDisplayFor(m => m.CloseDate, Utilities.ShowValidDatetime(Model.CloseDate))
</tr>
@if (Model.UnderlyingInstrumentType == "Stock")
{
<tr>
@Html.MyDisplayFor(m => m.DividendRate)
@Html.MyDisplayFor(m => m.UnderlyingStatus)
</tr>
}
<tr>
@Html.MyDisplayFor(m => m.TradeCode)
@Html.MyDisplayFor(m => m.VolatilityRate)
</tr>
<tr>
@Html.MyDisplayFor(m => m.UpDownLimit)
@Html.MyDisplayFor(m => m.MarginRate)
</tr>
<tr>
@Html.MyDisplayFor(m => m.ContractSize)
@Html.MyDisplayFor(m => m.OpenDate, Utilities.ShowValidDatetime(Model.OpenDate))
</tr>
<tr>
<th class="tdRight">资产状态</th>
<td>@(Model.GetUnderlyingStateDesc())</td>
@Html.MyDisplayFor(m => m.UnderlyingDesc)
</tr>
<tr>
@Html.MyDisplayFor(m => m.OptName)
@Html.MyDisplayFor(m => m.OptDate, Utilities.ShowValidDatetime(Model.OptDate))
</tr>
@if (Model.UnderlyingInstrumentType == "Stock")
{
<tr>
<th class="tdRight">板块性质1</th>
<td>@ViewData["block" + Model.Block1]</td>
<th class="tdRight">板块性质2</th>
<td>@ViewData["block" + Model.Block2]</td>
</tr>
<tr>
<th class="tdRight">板块性质3</th>
<td>@ViewData["block" + Model.Block3]</td>
<th class="tdRight">板块性质4</th>
<td>@ViewData["block" + Model.Block4]</td>
</tr>
<tr>
<th class="tdRight">板块性质5</th>
<td>@ViewData["block" + Model.Block5]</td>
<td colspan="2"></td>
</tr>
}
<tr>
@Html.MyDisplayFor(m => m.Spread)
@Html.MyDisplayFor(m => m.SpreadM)
</tr>
<tr>
@Html.MyDisplayFor(m => m.VolumeMin)
@Html.MyDisplayFor(m => m.VolumeMax)
</tr>
<tr>
@Html.MyDisplayFor(m => m.VolumeStep)
@Html.MyDisplayFor(m => m.VolumeLimit)
</tr>
@if (bond != null)
{
<tr>
<th class="tdRight">债券全称</th>
<td>@(bond.UnderlyingFullName)</td>
<th class="tdRight"></th>
<td></td>
</tr>
<tr>
<th class="tdRight">发行货币</th>
<td>@(bond.Currency)</td>
<th class="tdRight">首次付息日</th>
<td>@(bond.FirstDate.OtcFormatDate())</td>
</tr>
<tr>
<th class="tdRight">利息类型</th>
<td>@(bond.CouponType)</td>
<th class="tdRight">票面利率</th>
<td>@(bond.CouponRate.OtcFormatPercent())</td>
</tr>
<tr>
<th class="tdRight">付息频率</th>
<td>@(bond.PaymentFrequency)</td>
<th class="tdRight">计息日历规则</th>
<td>@(bond.DayCount)</td>
</tr>
<tr>
<th class="tdRight">假日调整规则</th>
<td>@(bond.HolidayAdjustRule)</td>
<th class="tdRight">标的证券发行人</th>
<td>@(bond.UnderlyingIssuer)</td>
</tr>
<tr>
<th class="tdRight">一级分类</th>
<td>@(bond.SecurityIndustrySuperType)</td>
<th class="tdRight">二级分类</th>
<td>@(bond.SecurityIndustryType)</td>
</tr>
<tr>
<th class="tdRight">发行规模(亿)</th>
<td>@(bond.IssueSize.OtcFormatMoney())</td>
@Html.MyDisplayFor(m => m.Price)
</tr>
<tr>
<th class="tdRight">债券期限</th>
<td>@(bond.BondTerm)</td>
<th class="tdRight"></th>
<td></td>
</tr>
}
<tr>
<th class="tdRight">增值税率</th>
<td>@(Model.ValueAddedTax.OtcFormatPercent())</td>
</tr>
</tbody>
</table>
</div>
@{
var arr = new[] { "最低预付金", nameof(MarginParamModel.MarginRate), "Span涨跌幅度", nameof(MarginParamModel.UpDownLimit), "Span波动率变动", nameof(MarginParamModel.VolatilityRate) };
for (var i = 0; i < 6; i += 2)
{
var desc = arr[i];
var type = arr[i + 1];
<div class="yc-panel">
<div class="mb-2">
<strong>@(desc)变动记录</strong>
</div>
<table class="table table-bordered">
<thead>
<tr>
<th>变动日期</th>
<th>@(desc)</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.HisDataList)
{
if (item.ValueType == type)
{
<tr>
<td>@(item.ValueDate.ToShortDateString())</td>
@if (item.ValueFlag == "N")
{
<td>NAN</td>
}
else
{
<td>@(item.ValueType!= nameof(MarginParamModel.UpDownLimit) || item.ValueFlag=="%"? item.Value.ToString("P2") : item.Value.ToString("F2"))</td>
}
</tr>
}
}
</tbody>
</table>
</div>
}
}