116 lines
5.1 KiB
Plaintext
116 lines
5.1 KiB
Plaintext
@{
|
|
ViewBag.Title = "预付金系数列表";
|
|
Layout = "~/Views/Shared/_MainLayout.cshtml";
|
|
}
|
|
|
|
@section JS{
|
|
<script type="text/javascript">
|
|
var g_grid = {};
|
|
$(function () {
|
|
@Html.Raw(JqGridSimple.OutGrid("/margin_ratio/margin_ratioGroupQuery"));
|
|
g_grid = jQuery('#listGrid');
|
|
function keyEnter(event) {
|
|
try {
|
|
var e = event ? event : (window.event ? window.event : null);
|
|
(e.keyCode == 13) && SearchClick(true);
|
|
} catch (e) { }
|
|
}
|
|
document.onkeydown = keyEnter;
|
|
});
|
|
|
|
function percentFmt(cellvalue, options, rowObject) {
|
|
return cellvalue ? (cellvalue * 100).toFixed(2) + '%' : '';
|
|
}
|
|
|
|
var colModelGrid = [{
|
|
name: '', label: '操作', index: '', width: 130, formatter: showToolName,sortable:false
|
|
}, {
|
|
name: 'id', label: 'id', index: 'id', width: 1, hidden: true
|
|
}, {
|
|
name: 'EncryptId', label: 'EncryptId', index: 'EncryptId', width: 1, hidden: true
|
|
}, {
|
|
name: 'ValueDate', label: '日期', index: 'ValueDate', width: 90, formatter: 'date'
|
|
}, {
|
|
name: 'NormalInitialMarginRatio', label: '初始预付金率', index: 'NormalInitialMarginRatio', width: 120, formatter: percentFmt
|
|
}, {
|
|
name: 'NormalMarginRatio1', label: '临时预付金率1', index: 'NormalMarginRatio1', width: 120, formatter: percentFmt
|
|
}, {
|
|
name: 'NormalMarginRatio2', label: '临时预付金率2', index: 'NormalMarginRatio2', width: 120, formatter: percentFmt
|
|
}, {
|
|
name: 'NormalMarginRatio3', label: '临时预付金率3', index: 'NormalMarginRatio3', width: 120, formatter: percentFmt
|
|
}, {
|
|
name: 'RedeemRatio1', label: '个股预付金率', index: 'RedeemRatio1', width: 120, formatter: percentFmt
|
|
}, {
|
|
name: 'RedeemRatio2', label: '指数预付金率', index: 'RedeemRatio2', width: 120, formatter: percentFmt
|
|
}, {
|
|
name: 'RedeemPriceLimit1', label: '个股触发追保跌幅', index: 'RedeemPriceLimit1', width: 120, formatter: percentFmt
|
|
}, {
|
|
name: 'RedeemPriceLimit2', label: '指数触发追保跌幅', index: 'RedeemPriceLimit2', width: 120, formatter: percentFmt
|
|
}, {
|
|
name: 'GroupRatio', label: '组合预付金率', index: 'GroupRatio', width: 120, formatter: percentFmt
|
|
}, {
|
|
name: 'StockEqvNotional', label: '总持仓名义本金', index: 'StockEqvNotional', width: 130
|
|
}, {
|
|
name: 'SingleStockEqvNotional', label: '单一标的持仓名义本金', index: 'SingleStockEqvNotional', width: 150
|
|
}, {
|
|
name: 'PositionUnderlyingAmount', label: '持仓标的分散程度', index: 'PositionUnderlyingAmount', width: 130
|
|
}, {
|
|
name: 'RedeemPositionUnderlyingAmount', label: '持仓标的分散程度(自动赎回)', index: 'RedeemPositionUnderlyingAmount', width: 180
|
|
}];
|
|
|
|
function showToolName(cellValue, options, rowObject) {
|
|
var imageHtml ="<input type=\"button\" class=\"wentiEdit\" onclick=\"startmargin_ratioView('{0}')\" value=\"{1}\" />".template(rowObject.EncryptId, "查看")
|
|
imageHtml += "<input type=\"button\" value=\"删除\" class=\"wentiEdit\" onclick=\"deletemargin_ratio('" + rowObject.EncryptId + "');\" />";
|
|
return imageHtml;
|
|
}
|
|
|
|
function startAddmargin_ratio() {
|
|
var addurl = "/margin_ratio/margin_ratioEdit/0";
|
|
main.infopage("新增预付金系数", addurl, { area: ['540px', '80%'] });
|
|
}
|
|
function startmargin_ratioView(id) {
|
|
var srcurl = "/margin_ratio/margin_ratioView/?enid=" + id;
|
|
main.infopage("查看预付金系数", srcurl,{ area: ['540px', '80%'] });
|
|
}
|
|
|
|
function deletemargin_ratio(encryptId) {
|
|
if (confirm("确定删除吗?")) {
|
|
$.ajax({
|
|
type: "Post",
|
|
url: "/margin_ratio/Deletemargin_ratio",
|
|
data: { encryptId: encryptId },
|
|
success: function (data) {
|
|
showmiddlemessage(data.msg);
|
|
if (data.success == true) {
|
|
$('#listGrid').trigger('reloadGrid');
|
|
}
|
|
},
|
|
error: function (msg) {
|
|
alert("error:" + msg);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function reloadmargin_ratio() {
|
|
//重新加载
|
|
SearchClick();
|
|
}
|
|
|
|
function SearchClick(isSearchclick) {
|
|
var listGrid = $('#listGrid');
|
|
|
|
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
|
|
//点击搜索时默认第一页
|
|
listGrid.jqGrid('setGridParam', {page: 1});
|
|
}
|
|
listGrid.trigger('reloadGrid');
|
|
}
|
|
</script>
|
|
}
|
|
|
|
<div class="searchdiv">
|
|
@MyControls.SearchBtn()
|
|
@MyControls.Btn("新增", "startAddmargin_ratio()")
|
|
</div>
|
|
@Html.Raw(JqGridSimple.OutTable()) |