125 lines
3.6 KiB
Plaintext
125 lines
3.6 KiB
Plaintext
@model List<eod_forward_margin>
|
|
@{
|
|
ViewBag.Title = "预付金成本明细";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
}
|
|
@section CSS
|
|
{
|
|
|
|
<style>
|
|
.ui-jqgrid-bdiv {
|
|
overflow: hidden !important;
|
|
}
|
|
</style>
|
|
}
|
|
|
|
@section JS{
|
|
<script type="text/javascript">
|
|
var g_grid = {};
|
|
$(document).ready(function() {
|
|
var PostData = {};
|
|
@Html.Raw(JqGridSimple.OutGrid("/forwardtrade/SingleMarginCost?enid=" + @ViewBag.tradeId));
|
|
g_grid = jQuery('#listGrid');
|
|
|
|
|
|
function AfterInsertRow(rowid, aData) {
|
|
}
|
|
});
|
|
function rowclick(id) {
|
|
}
|
|
function SearchClick(isSearchclick) {
|
|
}
|
|
var i = 0;
|
|
var colModelGrid = [
|
|
{
|
|
name: 'ValueDate',
|
|
label: '日期',
|
|
index: 'ValueDate',
|
|
sortIndex: i++,
|
|
width: 240,
|
|
align: 'left',
|
|
formatter: 'date'
|
|
}, {
|
|
name: 'InterestDays',
|
|
label: '计息天数',
|
|
index: 'InterestDays',
|
|
sortIndex: i++,
|
|
width: 140,
|
|
align: 'left'
|
|
}, {
|
|
name: 'AnnualRate',
|
|
label: '年化成本',
|
|
index: 'AnnualRate',
|
|
sortIndex: i++,
|
|
width: 140,
|
|
align: 'left',
|
|
formatter: PercentFormat
|
|
}, {
|
|
name: 'TradeAmount',
|
|
label: '持仓数量',
|
|
index: 'TradeAmount',
|
|
sortIndex: i++,
|
|
width: 140,
|
|
align: 'left',
|
|
sortable: false,
|
|
}, {
|
|
name: 'SettlePrice',
|
|
label: '结算价',
|
|
index: 'SettlePrice',
|
|
sortIndex: i++,
|
|
width: 140,
|
|
align: 'left'
|
|
}, {
|
|
name: 'MarginRate',
|
|
label: '预付金比率',
|
|
index: 'MarginRate ',
|
|
width: 140,
|
|
align: 'left',
|
|
sortable: false,
|
|
sortIndex: i++,
|
|
formatter: PercentFormat
|
|
}, {
|
|
name: 'MarginCost',
|
|
label: '预付金占用成本',
|
|
index: 'MarginCost',
|
|
sortIndex: i++,
|
|
width: 160,
|
|
align: 'left',
|
|
formatter: TwoFormat
|
|
}
|
|
];
|
|
|
|
function PercentFormat(cellValue, options, rowObject) {
|
|
if (cellValue) {
|
|
var num = new Number(cellValue) * 100;
|
|
return num.toFixed(2) + "%";
|
|
} else {
|
|
return "0%";
|
|
}
|
|
}
|
|
|
|
function TwoFormat(cellValue, options, rowObject) {
|
|
return cellValue ? numeral(cellValue).format("0.00") : "0.00";
|
|
}
|
|
|
|
function exportTrade() {
|
|
var dateTemp = new Date().Format("yyyyMMddhhmmss");
|
|
var fileName = "远期交易(" + $("#tradenum").val()+")预付金占用成本" + dateTemp;
|
|
main.toExcel("listGrid", fileName, "xls");
|
|
}
|
|
</script>
|
|
}
|
|
<div class="yc-panel">
|
|
@MyControls.Btn("导出Excel", "exportTrade()")
|
|
<div style="height: 30px;">
|
|
<span style="
|
|
margin: 15px;
|
|
font-weight: 800;
|
|
padding-top: 6px;
|
|
display: inherit;
|
|
text-align:left;
|
|
">预付金占用成本累计:@(ViewBag.MarginCostTotal == null ? 0 : ViewBag.MarginCostTotal)</span> <input id="tradenum" type="hidden" value="@ViewBag.TradeNum" />
|
|
</div>
|
|
@Html.Raw(JqGridSimple.OutTable())
|
|
</div>
|