Files
zszq-trs/YLErpWeb/Views/ExchangeTrade/TradeView.cshtml
T

123 lines
4.0 KiB
Plaintext

@model ExchangeTradeDto
@{
ViewBag.Title = "对冲交易信息 | 查看";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
var pageObj = new
{
syncFromExchange = Model.TradeSource == "下单同步",
isReloadData = !string.IsNullOrWhiteSpace(Context.Request.Query["reload"])
};
}
@section JS
{
<script>
var page = @Json.Serialize(pageObj);
function deletetrade(enid) {
let msg = (page.syncFromExchange ? '这是下单系统同步来的交易,' : '') + "确认删除此交易?";
main.confirmPost(msg, '/ExchangeTrade/InValidTrade?enid=' + enid).done(function () {
main.alert('删除交易成功!', layer.closeMe.bind(this,'reloadData'));
});
}
function editTrade(enid) {
function loadEdit() {
window.location.href = '/ExchangeTrade/tradeEdit?enid=' + enid + (page.isReloadData?"&reload=1":"");
}
if (page.syncFromExchange) {
main.confirm("这是下单系统同步来的交易。 确认修改此交易?", loadEdit);
} else {
loadEdit();
}
}
function tradeOperationHistory(encryptId) {
main.open("操作历史", `/trade/tradeOperationHistory?encryptId=${encryptId}&IsExchange=true`);
}
</script>
}
<div class="toolbarDiv">
@if (CurUser.交易管理_标的交易编辑)
{
<button class="btn btn-primary " type="button" onclick="editTrade('@(Model.EncryptId)');">修改</button>
}
@if (CurUser.交易管理_标的交易删除)
{
<button class="btn btn-primary " type="button" onclick="deletetrade('@(Model.EncryptId)');">删除</button>
}
@*@if (UserInfo.交易管理_交易操作历史)
{
<button class="btn btn-primary " type="button" onclick="tradeOperationHistory('@(Model.EncryptId)');">操作历史</button>
}*@
<button class="btn btn-primary " type="button" onclick="layer.closeMe('@(pageObj.isReloadData?"reloadData":"")');">关闭</button>
</div>
<div class="yc-panel">
<table class="table table-bordered">
<tr>
<th>交易类型</th>
<td>@(Model.TradeType)</td>
<th>交易编号</th>
<td>@(Model.TradeNumber)</td>
</tr>
<tr>
<th>标的代码</th>
<td>@(Model.UnderlyingCode)</td>
<th>买卖方向 </th>
<td>@(Model.TradeSide)</td>
<th style="display:none">资产类型</th>
<td style="display:none">@(ConsGlobal.InstrumentType.GetDesc(Model.InstrumentType))</td>
</tr>
<tr>
<th>交易员</th>
<td>@(Model.TraderName)</td>
<th>簿记账户</th>
<td>@(Model.AssetBookName)</td>
</tr>
<tr>
<th>成交日期</th>
<td>@(Model.TradeDate.ToString("yyyy-MM-dd"))</td>
<th>成交单价</th>
<td>@(Model.TradeSinglePrice*100)</td>
</tr>
<tr>
<th>成交手数</th>
<td>@(Model.TradeLots)</td>
<th>成交数量/张数</th>
<td>@(Model.TradeAmount*0.01)</td>
</tr>
<tr>
<th>对冲账户</th>
<td>@(Model.ExchangeAccountCode)</td>
<th>有效性</th>
<td>@(Model.IsValid?"有效":"无效")</td>
</tr>
<tr>
<th>手续费</th>
<td>
@if (Model.CommissionType == CommissionType.不收取)
{
<span>不收取</span>
}
else if (Model.CommissionType == CommissionType.系统计算)
{
<span>系统计算</span>
}
else
{
<span>@(Model.Commission)</span>
}
</td>
<th>备注</th>
<td>@(Model.Comments)</td>
</tr>
</table>
</div>