554 lines
24 KiB
JavaScript
554 lines
24 KiB
JavaScript
const configcolumn_data = {
|
|
"敲出交易": 0,
|
|
"敲入交易": 1,
|
|
"票息累积": 2,
|
|
"自定义交易": 3,
|
|
"互换观察日": 10,
|
|
"延期结算": 11
|
|
};
|
|
|
|
function GetGridColModes() {
|
|
var middleColLabel = "";
|
|
if (tabSelect === "敲出交易") {
|
|
middleColLabel = "敲出日期";
|
|
} else if (tabSelect === "敲入交易") {
|
|
middleColLabel = "敲入日期";
|
|
}
|
|
else if (tabSelect === "互换观察日") {
|
|
middleColLabel = "互换观察日";
|
|
}
|
|
else {
|
|
middleColLabel = "敲入敲出日期";
|
|
}
|
|
var colModelGrid = [
|
|
{
|
|
name: 'id', label: 'id', hidden: true, optionHide: true
|
|
},
|
|
{
|
|
name: 'EncryptId', label: 'EncryptId', hidden: true, optionHide: true
|
|
},
|
|
{
|
|
name: 'CouponPaidStatus', label: 'CouponPaidStatus', hidden: true, optionHide: true
|
|
},
|
|
{
|
|
name: 'trade.OptionType', label: '看涨看跌', hidden: true, optionHide: true
|
|
},
|
|
{
|
|
name: 'trade.TradeNumber', label: '交易编号',
|
|
},
|
|
{
|
|
name: 'trade.TradeStatus', label: '交易状态',
|
|
},
|
|
{
|
|
name: 'ObservationStatus', label: '观察状态',
|
|
},
|
|
{
|
|
name: 'trade.TradeType', label: '结构类型',
|
|
},
|
|
{
|
|
name: 'konckInOutDate', label: middleColLabel,
|
|
formatter: function (cellValue, options, rowObject) {
|
|
if (tabSelect == "敲入交易" && rowObject['ObservationStatus'] == "已敲入") {
|
|
return main.toDate(cellValue)
|
|
}
|
|
if (tabSelect == "敲出交易" && rowObject['ObservationStatus'] == "已敲出") {
|
|
return main.toDate(cellValue)
|
|
}
|
|
}
|
|
},
|
|
{
|
|
name: 'trade.ClientName', label: '交易对手方',
|
|
},
|
|
{
|
|
name: 'trade.TradeDate', label: '成交日期', formatter: 'date'
|
|
},
|
|
{
|
|
name: 'trade.ExerciseDate', label: '到期日期', formatter: 'date'
|
|
},
|
|
{
|
|
name: 'trade.BuySell', label: '买卖方向',
|
|
},
|
|
{
|
|
name: 'trade.UnderlyingCode', label: '标的代码',
|
|
},
|
|
{
|
|
name: 'BarrierLow', label: '障碍价格',
|
|
formatter: function (cellValue, options, rowObject) {
|
|
return main.formatNumber(cellValue);
|
|
},
|
|
},
|
|
{
|
|
name: 'BarrierHigh', label: '高障碍价格',
|
|
formatter: function (cellValue, options, rowObject) {
|
|
return main.formatNumber(cellValue);
|
|
},
|
|
},
|
|
{
|
|
name: 'trade.UnderlyingPrice', label: '标的最新价格',
|
|
formatter: function (cellValue, options, rowObject) {
|
|
return main.formatNumber(cellValue);
|
|
},
|
|
},
|
|
];
|
|
if (tabSelect === "互换观察日") {
|
|
colModelGrid = [
|
|
{
|
|
name: 'id', label: 'id', hidden: true, optionHide: true
|
|
}, {
|
|
name: 'EncryptId', label: 'EncryptId', hidden: true, optionHide: true
|
|
}, {
|
|
name: 'UnwindDate', label: 'UnwindDate', hidden: true, optionHide: true
|
|
}, {
|
|
name: 'TradeStatus', label: '交易状态',
|
|
}, {
|
|
name: 'TradeNumber', label: '交易编号',
|
|
}
|
|
, {
|
|
name: 'AssetBookName', label: '簿记账户',
|
|
},
|
|
{
|
|
name: 'ClientName', label: '交易对手方',
|
|
}, {
|
|
name: 'TradeDate', label: '成交日期', formatter: 'date'
|
|
}, {
|
|
name: 'ExerciseDate', label: '到期日期', formatter: 'date'
|
|
}, {
|
|
name: 'TradeType', label: '结构类型',
|
|
}, {
|
|
name: 'trade_cash.ValueDate', label: "互换观察日", formatter: 'date', sortable: false
|
|
}, {
|
|
name: 'eod_trade.RoundedPv', label: "持仓市值", formatter: function (cellValue, options, rowObject) {
|
|
return main.formatNumber(cellValue);
|
|
}, sortable: false
|
|
}, {
|
|
name: 'eod_trade.RoundedPnl', label: "持仓盈亏", formatter: function (cellValue, options, rowObject) {
|
|
return main.formatNumber(cellValue);
|
|
}, sortable: false
|
|
}, {
|
|
name: 'eod_trade.PositionRelizedAmount', label: "实现盈亏", formatter: function (cellValue, options, rowObject) {
|
|
return main.formatNumber(cellValue);
|
|
}, sortable: false
|
|
},
|
|
];
|
|
} else if (tabSelect === "延期结算") {
|
|
colModelGrid = [
|
|
{
|
|
name: 'id', label: 'id', hidden: true, optionHide: true
|
|
}, {
|
|
name: 'EncryptId', label: 'EncryptId', hidden: true, optionHide: true
|
|
}, {
|
|
name: 'UnwindDate', label: 'UnwindDate', hidden: true, optionHide: true
|
|
}, {
|
|
name: 'TradeNumber', label: '交易编号', align: 'center',
|
|
}, {
|
|
name: 'TradeStatus', label: '交易状态', align: 'center',
|
|
}, {
|
|
name: 'TradeType', label: '结构类型', align: 'center',
|
|
}, {
|
|
name: 'UnderlyingCode', label: '标的代码', align: 'center',
|
|
}, {
|
|
name: 'ClientName', label: '交易对手方', align: 'center',
|
|
}, {
|
|
name: 'TradeDate', label: '成交日期', formatter: 'date', align: 'center',
|
|
}, {
|
|
name: 'ExerciseDate', label: '到期日期', formatter: 'date', align: 'center',
|
|
}, {
|
|
name: 'SettlementDate', label: '结算日期', formatter: 'date', align: 'center',
|
|
}, {
|
|
name: 'BuySell', label: '交易方向', align: 'center',
|
|
}, {
|
|
name: 'SettlementFlagDate', label: '延期操作时间', formatter: 'date', align: 'center',
|
|
}, {
|
|
name: 'SettlementFlagOptName', label: '操作人', align: 'center', sortable: false,
|
|
}
|
|
];
|
|
}
|
|
|
|
return colModelGrid;
|
|
}
|
|
|
|
$(function () {
|
|
var PostData = {};
|
|
if (settleDate) {
|
|
$("#DateValueDate").val(settleDate);
|
|
PostData.ValueDate = settleDate;
|
|
}
|
|
$(".datepicker").datepicker({
|
|
changeMonth: true,
|
|
changeYear: true,
|
|
showButtonPanel: true,
|
|
showOtherMonths: true,
|
|
selectOtherMonths: true
|
|
});
|
|
colModelGrid = GetGridColModes();
|
|
var url = "/risk/ObservationEventTradeQuery";
|
|
if (tabSelect == "互换观察日") {
|
|
url = "/swapTrade/TradeQuery";
|
|
}
|
|
else if (tabSelect == "延期结算") {
|
|
var url = "/risk/DelaySettlementQuery";
|
|
}
|
|
|
|
PostData.TabIndex = configcolumn_data[tabSelect];
|
|
|
|
grid = jQuery('#listGrid').jqGrid({
|
|
url: url,
|
|
datatype: 'json',
|
|
//multiselect: true,
|
|
height: 'auto',
|
|
width: '96%',
|
|
autowidth: false,
|
|
shrinkToFit: false,
|
|
viewrecords: true,
|
|
jsonReader: { repeatitems: false },
|
|
caption: '',
|
|
mtype: 'POST',
|
|
postData: PostData,
|
|
colModel: colModelGrid,
|
|
pager: jQuery('#pagerGrid'),
|
|
pagerpos: 'left',
|
|
ondblClickRow: rowdblclick,
|
|
rowNum: 20,
|
|
rowList: [20, 30, 50, 200, 10000],
|
|
footerrow: false,
|
|
loadComplete: gridComplete,
|
|
grouping: true
|
|
});
|
|
|
|
function keyEnter(event) {
|
|
try {
|
|
var e = event || window.event || {};
|
|
if (e.keyCode === 13) {
|
|
SearchClick(true);
|
|
}
|
|
} catch (e) {
|
|
//
|
|
}
|
|
}
|
|
|
|
document.onkeydown = keyEnter;
|
|
let underlyingCtrl = new tradeHelper.UnderlyingSelectCtrl('#UnderlyingId').setFlag(tradeHelper.UnderlyingSelectFlag.OtcTrade);
|
|
});
|
|
|
|
function setGridPostData() {
|
|
var listGrid = $('#listGrid');
|
|
|
|
|
|
if (tabSelect == "互换观察日") {
|
|
listGrid.appendPostData({ TraderNames: !$("#TraderName").val() ? "" : $("#TraderName").val().join(",") });
|
|
listGrid.appendPostData({ TradeNumber: $("#TradeNumber").val() });
|
|
listGrid.appendPostData({ AssetIds: !$("#AssetId").val() ? "" : $("#AssetId").val().join(",") });
|
|
listGrid.appendPostData({ AssetIdGroupList: $("#GroupId").val() });
|
|
listGrid.appendPostData({ ClientIds: !$("#ClientId").val() ? "" : $("#ClientId").val().join(",") });
|
|
listGrid.appendPostData({
|
|
UnderlyingIds: !$("#UnderlyingId").val() ? "" : $("#UnderlyingId").val().join(",")
|
|
});
|
|
listGrid.appendPostData({ TradeDateStart: $("#DateFromTradeDate").val() });
|
|
listGrid.appendPostData({ TradeDateEnd: $("#DateToTradeDate").val() });
|
|
listGrid.appendPostData({ ExerciseDateStart: $("#DateFromExerciseDate").val() });
|
|
listGrid.appendPostData({ ExerciseDateEnd: $("#DateToExerciseDate").val() });
|
|
listGrid.appendPostData({ ValueDate: $("#DateValueDate").val() });
|
|
listGrid.appendPostData({ TradeStatus: $("#TradeStatus").val() });
|
|
} else {
|
|
listGrid.appendPostData({ ClientIds: $("#ClientId").val() });
|
|
listGrid.appendPostData({ TradeTypes: $("#TradeTypes").val() });
|
|
listGrid.appendPostData({ AssetIds: $("#AssetId").val() });
|
|
listGrid.appendPostData({ AssetIdGroupList: $("#GroupId").val() });
|
|
listGrid.appendPostData({ TraderIds: $("#TraderId").val() });
|
|
listGrid.appendPostData({ UnderlyingIds: $("#UnderlyingId").val() });
|
|
listGrid.appendPostData({ TradeDateStart: $("#DateFromTradeDate").val() });
|
|
listGrid.appendPostData({ TradeDateEnd: $("#DateToTradeDate").val() });
|
|
listGrid.appendPostData({ TradeStatus: $("#TradeStatus").val() });
|
|
listGrid.appendPostData({ ExerciseDateStart: $("#DateFromExerciseDate").val() });
|
|
listGrid.appendPostData({ ExerciseDateEnd: $("#DateToExerciseDate").val() });
|
|
listGrid.appendPostData({ ObservationStatus: $("#ObservationStatus").val() });
|
|
listGrid.appendPostData({ ValueDate: $("#DateValueDate").val() });
|
|
}
|
|
|
|
listGrid.appendPostData({ TabIndex: configcolumn_data[tabSelect] });
|
|
}
|
|
|
|
function rowdblclick(rowid) {
|
|
var rowData = $(this).getRowData(rowid);
|
|
starttradeView(rowData.EncryptId, rowData.TradeType);
|
|
}
|
|
|
|
function rowclick(id) {
|
|
|
|
}
|
|
|
|
function starttradeView(id, tradeType) {
|
|
main.open("查看交易", "/trade/tradeView/?enid={0}".template(id));
|
|
}
|
|
|
|
function gridComplete() {
|
|
var jgrid = $(this);
|
|
|
|
var newHeight = $(window).height() - 400;
|
|
$(".ui-jqgrid .ui-jqgrid-bdiv").css("cssText", "height: " + newHeight + "px!important;");
|
|
$('.ui-jqgrid-bdiv', '#gbox_listGrid').floatingScroll();
|
|
|
|
$(".selftooltip").tooltip({ html: true, show: 50000, trigger: "hover" });
|
|
|
|
var rowIds = jgrid.jqGrid('getDataIDs');
|
|
|
|
for (var i = 0; i < rowIds.length; i++) {
|
|
var rowId = rowIds[i];
|
|
var rowdata = jgrid.getRowData(rowId);
|
|
var rateLow = Math.abs((rowdata['trade.UnderlyingPrice'] - rowdata['BarrierLow']) / rowdata['BarrierLow']);
|
|
var rateHigh;
|
|
if (rowdata['BarrierHigh']) {
|
|
rateHigh = Math.abs((rowdata['trade.UnderlyingPrice'] - rowdata['BarrierHigh']) / rowdata['BarrierHigh']);
|
|
}
|
|
if (tabSelect === "互换观察日") {
|
|
if (rowdata['TradeStatus'] === "已平仓" || rowdata['TradeStatus'] === "已执行" || rowdata['TradeStatus'] === "已到期") {
|
|
$('#' + rowIds[i]).addClass("UnwindBg");
|
|
} else {
|
|
var exerciseDate = main.toDate(rowdata['ExerciseDate']);
|
|
var today = main.toDate(new Date());
|
|
if (exerciseDate === today && (rowdata['TradeStatus'] != "已到期" || rowdata['TradeStatus'] != "已平仓")) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
}
|
|
|
|
} else if (tabSelect === "延期结算") {
|
|
if (rowdata['TradeStatus'] === "已平仓" || rowdata['TradeStatus'] === "已执行" || rowdata['TradeStatus'] === "已到期") {
|
|
$('#' + rowIds[i]).addClass("UnwindBg");
|
|
}
|
|
} else {
|
|
if (rowdata['trade.TradeStatus'] === "已平仓" || rowdata['trade.TradeStatus'] === "已执行" || rowdata['trade.TradeStatus'] === "已到期") {
|
|
$('#' + rowIds[i]).addClass("UnwindBg");
|
|
}
|
|
else {
|
|
if (tabSelect === "票息累积") {
|
|
if (parseInt(rowdata.CouponPaidStatus) === 1) {
|
|
$('#' + rowIds[i]).addClass("HasPaidCouponBg");
|
|
} else if (parseInt(rowdata.CouponPaidStatus) === 2) {
|
|
$('#' + rowIds[i]).addClass("WillPayCouponBg");
|
|
}
|
|
}
|
|
else {
|
|
if (rowdata['trade.TradeType'] === "障碍期权") {
|
|
if (rowdata['ObservationStatus'] === "已敲入") {
|
|
$('#' + rowIds[i]).addClass("KnockInBg");
|
|
}
|
|
|
|
if (rowdata['trade.TradeStatus'] !== "已平仓"
|
|
&& rowdata['ObservationStatus'] !== "已敲入"
|
|
&& rowdata['ObservationStatus'] !== "已敲出"
|
|
&& tabSelect === "敲入交易"
|
|
) {
|
|
if (rowdata['trade_barrier_option.BarrierType'] === "上升敲入" && rowdata['trade.UnderlyingPrice'] >= rowdata['BarrierLow']
|
|
|| rowdata['trade_barrier_option.BarrierType'] === "下降敲入" && rowdata['trade.UnderlyingPrice'] <= rowdata['BarrierLow']
|
|
|| rowdata['trade_barrier_option.BarrierType'] === "双障碍敲入" && (rowdata['trade.UnderlyingPrice'] <= rowdata['BarrierLow'] || rowdata['trade.UnderlyingPrice'] >= rowdata['BarrierHigh'])) {
|
|
$('#' + rowIds[i]).addClass("WillKnockInBg");
|
|
} else if (rateLow < AlertLineKonckInLimit || (rateHigh && rateHigh < AlertLineKonckInLimit)) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
|
|
}
|
|
else if (rowdata['trade.TradeStatus'] !== "已平仓"
|
|
&& rowdata['ObservationStatus'] !== "已敲入"
|
|
&& rowdata['ObservationStatus'] !== "已敲出"
|
|
&& tabSelect === "敲出交易"
|
|
|
|
) {
|
|
if (rowdata['trade_barrier_option.BarrierType'] === "上升敲出" && rowdata['trade.UnderlyingPrice'] * 1 >= rowdata['BarrierLow']
|
|
|| rowdata['trade_barrier_option.BarrierType'] === "下降敲出" && rowdata['trade.UnderlyingPrice'] * 1 <= rowdata['BarrierLow']
|
|
|| rowdata['trade_barrier_option.BarrierType'] === "双障碍敲出" && (rowdata['trade.UnderlyingPrice'] * 1 <= rowdata['BarrierLow'] || rowdata['trade.UnderlyingPrice'] * 1 >= rowdata['BarrierHigh'])) {
|
|
$('#' + rowIds[i]).addClass("WillKnockOutBg");
|
|
} else if (rateLow < AlertLineKonckOutLimit || (rateHigh && rateHigh < AlertLineKonckOutLimit)) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
if (rowdata['trade.TradeType'] === "双鲨期权") {
|
|
if (rowdata.TradeStatus !== "已平仓"
|
|
&& rowdata['ObservationStatus'] !== "已敲入"
|
|
&& rowdata['ObservationStatus'] !== "已敲出"
|
|
&& tabSelect === "敲出交易"
|
|
) {
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 <= rowdata['BarrierLow'] || rowdata['trade.UnderlyingPrice'] * 1 >= rowdata['BarrierHigh']) {
|
|
$('#' + rowIds[i]).addClass("WillKnockOutBg");
|
|
} else if (rateLow < AlertLineKonckOutLimit || (rateHigh && rateHigh < AlertLineKonckOutLimit)) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
if (rowdata['trade.TradeType'] === "凤凰期权") {
|
|
if (rowdata['ObservationStatus'] === "已敲入") {
|
|
$('#' + rowIds[i]).addClass("KnockInBg");
|
|
}
|
|
|
|
if (rowdata['trade.TradeStatus'] !== "已平仓"
|
|
&& rowdata['ObservationStatus'] !== "已敲入"
|
|
&& rowdata['ObservationStatus'] !== "已敲出"
|
|
&& tabSelect === "敲入交易"
|
|
) {
|
|
if (rowdata["trade.OptionType"] === "看涨") {
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 <= rowdata['BarrierLow']) {
|
|
$('#' + rowIds[i]).addClass("WillKnockInBg");
|
|
} else if (rateLow < AlertLineKonckInLimit) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
} else { //看跌时向上敲入
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 >= rowdata['BarrierLow']) {
|
|
$('#' + rowIds[i]).addClass("WillKnockInBg");
|
|
} else if (rateHigh && rateHigh < AlertLineKonckInLimit) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
}
|
|
|
|
}
|
|
else if (rowdata['trade.TradeStatus'] !== "已平仓"
|
|
&& rowdata['ObservationStatus'] !== "已敲出"
|
|
&& tabSelect === "敲出交易"
|
|
) {
|
|
if (rowdata["trade.OptionType"] === "看涨") {
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 >= rowdata['BarrierHigh']) {
|
|
$('#' + rowIds[i]).addClass("WillKnockOutBg");
|
|
} else if (rateHigh && rateHigh < AlertLineKonckOutLimit) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
} else { //看跌时向下敲出
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 <= rowdata['BarrierHigh']) {
|
|
$('#' + rowIds[i]).addClass("WillKnockOutBg");
|
|
} else if (rateLow < AlertLineKonckOutLimit) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (rowdata['trade.TradeType'] === "雪球期权") {
|
|
if (rowdata['ObservationStatus'] === "已敲入") {
|
|
$('#' + rowIds[i]).addClass("KnockInBg");
|
|
}
|
|
|
|
if (rowdata['trade.TradeStatus'] !== "已平仓"
|
|
&& rowdata['ObservationStatus'] !== "已敲入"
|
|
&& rowdata['ObservationStatus'] !== "已敲出"
|
|
&& tabSelect === "敲入交易"
|
|
) {
|
|
if (rowdata["trade.OptionType"] === "看涨") {
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 <= rowdata['BarrierLow']) {
|
|
$('#' + rowIds[i]).addClass("WillKnockInBg");
|
|
} else if (rateLow < AlertLineKonckInLimit) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
} else { //看跌时向上敲入
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 >= rowdata['BarrierLow']) {
|
|
$('#' + rowIds[i]).addClass("WillKnockInBg");
|
|
} else if (rateHigh && rateHigh < AlertLineKonckInLimit) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
}
|
|
}
|
|
else if (rowdata['trade.TradeStatus'] !== "已平仓"
|
|
&& rowdata['ObservationStatus'] !== "已敲出"
|
|
&& tabSelect === "敲出交易"
|
|
) {
|
|
if (rowdata["trade.OptionType"] === "看涨") {
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 >= rowdata['BarrierHigh']) {
|
|
$('#' + rowIds[i]).addClass("WillKnockOutBg");
|
|
} else if (rateHigh && rateHigh < AlertLineKonckOutLimit) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
} else { //看跌时向下敲出
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 <= rowdata['BarrierLow']) {
|
|
$('#' + rowIds[i]).addClass("WillKnockOutBg");
|
|
} else if (rateLow < AlertLineKonckOutLimit) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (rowdata['trade.TradeType'] === "二元期权") {
|
|
if (rowdata['ObservationStatus'] === "已敲入") {
|
|
$('#' + rowIds[i]).addClass("KnockInBg");
|
|
}
|
|
|
|
if (rowdata['trade.TradeStatus'] !== "已平仓"
|
|
&& rowdata['ObservationStatus'] !== "已敲入"
|
|
&& rowdata['ObservationStatus'] !== "已敲出"
|
|
&& tabSelect === "敲出交易"
|
|
|
|
) {
|
|
if (rowdata['trade.UnderlyingPrice'] * 1 <= rowdata['BarrierLow'] || (rowdata['BarrierHigh'] && rowdata['trade.UnderlyingPrice'] * 1 >= rowdata['BarrierHigh'])) {
|
|
$('#' + rowIds[i]).addClass("WillKnockOutBg");
|
|
} else if (rateLow < AlertLineKonckOutLimit || (rateHigh && rateHigh < AlertLineKonckOutLimit)) {
|
|
$('#' + rowIds[i]).addClass("AlertLineBg");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
var column = "风险管理-观察事件" + "-" + tabSelect;
|
|
main.setcolumnChooser(jgrid, column);
|
|
}
|
|
|
|
function showcolumnChooser() {
|
|
var jgrid = jQuery('#listGrid');
|
|
var column = "风险管理-观察事件" + "-" + tabSelect;
|
|
main.showcolumnChooser(jgrid, column);
|
|
}
|
|
|
|
function SearchClick(isSearchclick) {
|
|
|
|
setGridPostData();
|
|
if (isSearchclick) {
|
|
//点击搜索时默认第一页
|
|
$('#listGrid').jqGrid('setGridParam', { page: 1 });
|
|
}
|
|
main.isSearching = true;
|
|
$('#listGrid').trigger('reloadGrid');
|
|
}
|
|
|
|
function setAlertLine() {
|
|
$('#AlertLineModal').modal('show');
|
|
}
|
|
|
|
function SaveAlertLine() {
|
|
var knockInLimit = $("#AlertLineKonckInLimit").val() / 100;
|
|
var knockOutLimit = $("#AlertLineKonckOutLimit").val() / 100;
|
|
main.confirm("确定更新触碰预警设置?", function () {
|
|
main.post("/valuedate/SaveAlertLine", { AlertLineKonckInLimit: knockInLimit, AlertLineKonckOutLimit: knockOutLimit }).done();
|
|
});
|
|
AlertLineKonckInLimit = knockInLimit;
|
|
AlertLineKonckOutLimit = knockOutLimit;
|
|
}
|
|
|
|
function turnKnockOut() {
|
|
window.location.href = "/risk/KonckOutList?settleDate=" + $("#DateValueDate").val();
|
|
}
|
|
|
|
function turnKnockIn() {
|
|
window.location.href = "/risk/KonckInList?settleDate=" + $("#DateValueDate").val();
|
|
}
|
|
|
|
function turnCoupon() {
|
|
window.location.href = "/risk/CouponList?settleDate=" + $("#DateValueDate").val();
|
|
}
|
|
|
|
function turnCustom() {
|
|
window.location.href = "/risk/CustomList?settleDate=" + $("#DateValueDate").val();
|
|
}
|
|
|
|
function turnObservation() {
|
|
window.location.href = "/risk/ObservationList?observationDate=" + $("#DateValueDate").val();
|
|
}
|
|
|
|
function turnDelaySettlement() {
|
|
window.location.href = "/risk/DelaySettlement?settleDate=" + $("#DateValueDate").val();
|
|
}
|