2135 lines
72 KiB
JavaScript
2135 lines
72 KiB
JavaScript
var varieties = [{ id: 0, Name: '全部' }].concat(ylotc.varieties);
|
|
var remarkDict = {};
|
|
var valueDateShowStatus = true;
|
|
$(function () {
|
|
$("#DateValueDate").val(page.ValueDate);
|
|
$('#ClientId,#ClientNumber').val('').selectpicker({
|
|
liveSearch: true,
|
|
});
|
|
$("#myTab li a").on("click", function (e) {
|
|
setSummaryType($(e.target).text());
|
|
});
|
|
new tradeHelper.UnderlyingSelectCtrl('#UnderlyingId').setFlag(tradeHelper.UnderlyingSelectFlag.OtcTrade);
|
|
main.setTradeDatePicker(moment(page.ValueDate));
|
|
$(".datepicker").datepicker({
|
|
changeMonth: true,
|
|
changeYear: true,
|
|
showButtonPanel: true,
|
|
showOtherMonths: true,
|
|
selectOtherMonths: true
|
|
});
|
|
$("#DateValueDate").change(function () {
|
|
var dateVal = $(this).val();
|
|
valueDateShowStatus = page.ValueDate == dateVal;
|
|
SearchClick(true);
|
|
//var tab = $('#myTab .active a').text();
|
|
//if (tab == "整体业务汇总") {
|
|
// if (valueDateShowStatus) {
|
|
// $("#PvPercent").parents('.search-group').show();
|
|
// } else {
|
|
// $("#PvPercent").parents('.search-group').hide();
|
|
// }
|
|
//}
|
|
});
|
|
$("#UseValid,#confriomStatus").attr("setting", "");
|
|
setSummaryType(page.SummaryType)//这个方法应该在最后调用,否则可能会影响页面展示效果
|
|
if (getRequest().SummaryType != undefined) {
|
|
setSummaryType(getRequest().SummaryType);
|
|
}
|
|
});
|
|
function getRequest() {
|
|
var url = location.search; //获取url中"?"符后的字串
|
|
var theRequest = new Object();
|
|
if (url.indexOf("?") != -1) {
|
|
var str = url.substr(1);
|
|
var strs = str.split("&");
|
|
for (var i = 0; i < strs.length; i++) {
|
|
theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
|
|
}
|
|
}
|
|
return theRequest;
|
|
}
|
|
|
|
Array.prototype.removeObj = function (callback) {
|
|
if (callback) {
|
|
for (let i = 0; i < this.length; i++) {
|
|
if (callback(this[i])) {
|
|
this.splice(i, 1)
|
|
i--;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function showWindow(windowType, postData) {
|
|
switch (windowType) {
|
|
case "设置":
|
|
var url = "/risk/QuotaSetting/";
|
|
main.infopage("规则设置", url, { area: ['52%', '600px'] });
|
|
break;
|
|
case "历史":
|
|
if (log_grid == null) {
|
|
var obj = {
|
|
url: '/risk/QuotaSettingHistory',
|
|
datatype: 'json',
|
|
multiselect: true,
|
|
height: 'auto',
|
|
width: '96%',
|
|
autowidth: false,
|
|
shrinkToFit: false,
|
|
viewrecords: true,
|
|
jsonReader: { repeatitems: false },
|
|
caption: '',
|
|
mtype: 'POST',
|
|
postData: postData,
|
|
colModel: colModel_Log,
|
|
pager: jQuery('#pagerGrid1'),
|
|
pagerpos: 'left',
|
|
rowNum: 20,
|
|
rowList: [20, 30, 50, 200, 10000],
|
|
footerrow: false,
|
|
onPaging: onJqgridPaging
|
|
};
|
|
log_grid = jQuery('#listGrid1').jqGrid(obj);
|
|
}
|
|
else {
|
|
log_grid.appendPostData(postData || { TypeId: null });
|
|
log_grid.trigger("reloadGrid");
|
|
}
|
|
layer.open({
|
|
type: 1,
|
|
title: "操作历史",
|
|
shadeClose: false,
|
|
shade: 0.4,
|
|
area: ["auto", "90%"],
|
|
content: $("#extendInfo")
|
|
});
|
|
break;
|
|
case "确认操作":
|
|
$("#editRemark").val(remarkDict[postData.id]);
|
|
$("[name='optType']:first").prop('checked', true)
|
|
$("#editRemark").parent().show();
|
|
$("#remark").val("");
|
|
layer.open({
|
|
type: 1,
|
|
title: "确认操作",
|
|
shadeClose: false,
|
|
shade: 0.4,
|
|
area: ["400px", "350px"],
|
|
content: $("#optContent"),
|
|
btn: ['确定', '取消'],
|
|
yes: function (index, layero) {
|
|
postData["optType"] = $("[name='optType']:checked").val();
|
|
postData["remark"] = $("#remark").val();
|
|
approval([postData])
|
|
},
|
|
cancel: function (index, layero) {
|
|
layer.close(index);
|
|
}
|
|
});
|
|
break;
|
|
case "批量操作":
|
|
var jgrid = jQuery('#listGrid');
|
|
var ids = main.GetGridObjs(jgrid);
|
|
if (ids.length < 1) {
|
|
main.message("请选择需确认的限额指标记录");
|
|
return;
|
|
}
|
|
postData = [];
|
|
$("#editRemark").parent().hide();
|
|
$("[name='optType']:first").prop('checked', true)
|
|
$("#remark").val("");
|
|
layer.open({
|
|
type: 1,
|
|
title: "确认操作",
|
|
shadeClose: false,
|
|
shade: 0.4,
|
|
area: ["400px", "350px"],
|
|
content: $("#optContent"),
|
|
btn: ['确定', '取消'],
|
|
yes: function (index, layero) {
|
|
var optType = $("[name='optType']:checked").val();
|
|
var remark = $("#remark").val();
|
|
ids.forEach(function (o) {
|
|
postData.push({
|
|
id: o.id,
|
|
optDate: o.OptDate,
|
|
optType: optType,
|
|
remark: remark
|
|
});
|
|
});
|
|
approval(postData)
|
|
},
|
|
cancel: function (index, layero) {
|
|
layer.close(index);
|
|
}
|
|
});
|
|
break;
|
|
case "导入限额指标":
|
|
var jgrid = jQuery('#listGrid');
|
|
$("#remark").val("");
|
|
layer.open({
|
|
type: 1,
|
|
title: " 导入限额指标",
|
|
shadeClose: false,
|
|
shade: 0.4,
|
|
area: ["300", "300"],
|
|
content: $("#quotaMonitorUploadForm"),
|
|
yes: function (index, layero) {
|
|
quotaMonitorUploadForm()
|
|
},
|
|
cancel: function (index, layero) {
|
|
layer.close(index);
|
|
}
|
|
});
|
|
break;
|
|
default:
|
|
}
|
|
}
|
|
|
|
var g_grid = {};
|
|
var log_grid = null;
|
|
|
|
function getGrid(summaryType) {
|
|
var postData = GetPostData();
|
|
var obj = {
|
|
url: '/risk/QuotaMonitorQuery',
|
|
datatype: 'local',
|
|
multiselect: false,
|
|
multiboxonly: false,
|
|
height: 'auto',
|
|
width: '96%',
|
|
autowidth: false,
|
|
shrinkToFit: false,
|
|
viewrecords: true,
|
|
jsonReader: { repeatitems: false },
|
|
caption: '',
|
|
mtype: 'POST',
|
|
postData: postData,
|
|
afterInsertRow: AfterInsertRow,
|
|
onSelectRow: rowclick,
|
|
ondblClickRow: rowdblclick,
|
|
footerrow: false,
|
|
loadonce: true,
|
|
loadComplete: gridComplete,
|
|
onPaging: onJqgridPaging
|
|
};
|
|
$('#ClientId,#ClientNumber,#UnderlyingId').selectpicker('val', ['noneSelectedText'])//回到初始状态
|
|
$("#ClientId,#ClientNumber,#UnderlyingId").selectpicker('refresh');//刷新
|
|
$(".gf-Setting").hide();
|
|
switch (summaryType) {
|
|
case "整体业务汇总":
|
|
obj.colModel = colModel_global;
|
|
//if (valueDateShowStatus) {
|
|
// $("#PvPercent").parents('.search-group').show();
|
|
//} else {
|
|
// $("#PvPercent").parents('.search-group').hide();
|
|
//}
|
|
break;
|
|
case "品种汇总":
|
|
obj.colModel = colModel_variety;
|
|
break;
|
|
case "资产汇总":
|
|
obj.colModel = colModel_asset;
|
|
break;
|
|
case "标的汇总":
|
|
obj.colModel = colModel_undelrying;
|
|
break;
|
|
case "簿记汇总":
|
|
obj.colModel = colModel_assetunit;
|
|
break;
|
|
case "逐笔汇总":
|
|
obj.colModel = colModel_trade;
|
|
break;
|
|
case "客户汇总":
|
|
obj.colModel = colModel_client;
|
|
break;
|
|
case "限额指标记录":
|
|
obj.multiselect = true;
|
|
obj.multiboxonly = true;
|
|
obj.colModel = colModel_setting;
|
|
$(".gf-Setting").show();
|
|
break;
|
|
default:
|
|
}
|
|
g_grid = jQuery('#listGrid').jqGrid(obj);
|
|
switch (summaryType) {
|
|
case "客户汇总":
|
|
case "逐笔汇总":
|
|
case "标的汇总":
|
|
case "整体业务汇总":
|
|
case "簿记汇总":
|
|
default:
|
|
break;
|
|
}
|
|
|
|
return g_grid;
|
|
}
|
|
|
|
function gridComplete(obj) {
|
|
if (obj.Sum) {
|
|
remarkDict = obj.Sum.RemarkDict;
|
|
$("#BusinessTotalScale").val(obj.Sum.BusinessTotalScale);
|
|
$("#BusinessAvailableFunds").val(obj.Sum.BusinessAvailableFunds);
|
|
$("#SingleUnderlyingRate").val(obj.Sum.SingleUnderlyingRate);
|
|
}
|
|
$(window).off('resize.jqGrid');
|
|
//$(window).on('resize.jqGrid', function () {
|
|
// $("#listGrid").jqGrid('setGridWidth', $('#riskContent').width() - 2);
|
|
//});
|
|
//$("#listGrid").jqGrid('setGridWidth', $('#riskContent').width() - 2);
|
|
var jgrid = jQuery('#listGrid');
|
|
var tag = $("#myTab .active a").attr("tag");
|
|
main.setcolumnChooser(jgrid, key + tag);
|
|
}
|
|
|
|
function setSummaryType(summaryType) {
|
|
$("#myTab li").removeClass("active");
|
|
$("#UnderlyingId").selectpicker('deselectAll');
|
|
$("#myTab :contains('" + summaryType + "')").parent().addClass("active");
|
|
$('.htmlContext .search-group').hide()
|
|
var tag = $('#myTab .active a').attr("tag");
|
|
if (tag) {
|
|
$('[' + tag + ']').parents('.search-group').show()
|
|
$('.first-wrap-gtja').parent().show();
|
|
}
|
|
else {
|
|
$('.first-wrap-gtja').parent().hide();
|
|
}
|
|
//$("#TagIds").parents('.search-group').show();
|
|
if (typeof g_grid.GridUnload == 'function') { g_grid.GridUnload(); }
|
|
g_grid = getGrid(summaryType);
|
|
SearchClick(true);
|
|
}
|
|
|
|
function GetPostData() {
|
|
var postData = {};
|
|
postData.ValueDate = $("#DateValueDate").val();
|
|
postData.TradeNumber = $("#TradeNumber").val();
|
|
postData.ClientId = $("#ClientId").val();
|
|
postData.ClientNumber = $("#ClientNumber").val();
|
|
postData.UnderlyingId = $("#UnderlyingId").val();
|
|
postData.VarietyId = "";
|
|
postData.TradeType = "";
|
|
postData.AssetId = $("#AssetId").val();
|
|
postData.TradeStatus = $("#TradeStatus").val();
|
|
postData.TradeDateStart = $("#DateFromTradeDate").val();
|
|
postData.TradeDateEnd = $("#DateToTradeDate").val();
|
|
postData.Status = $("#confriomStatus").val();
|
|
postData.ActualSubject = "";
|
|
postData.SummaryType = $("#myTab .active a").text();
|
|
var pvpercent = parseInt($("#PvPercent").val()) / 100;
|
|
postData.PvPercent = pvpercent;
|
|
postData.QuotaType = $("#QuotaType").val();
|
|
postData.QuotaIndex = $("#QuotaIndex").val();
|
|
postData.Precheck = $("#Precheck").val();
|
|
postData.UseValid = $("#UseValid").val();
|
|
postData.TagIds = "";
|
|
postData.HasPosition = $("#HasPosition").val();
|
|
return postData;
|
|
}
|
|
|
|
function SearchClick(isSearchclick) {
|
|
var listGrid = $('#listGrid');
|
|
listGrid.jqGrid('setGridParam', { datatype: 'json' });
|
|
|
|
listGrid.appendPostData(GetPostData());
|
|
|
|
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
|
|
//点击搜索时默认第一页
|
|
listGrid.jqGrid('setGridParam',
|
|
{
|
|
page: 1
|
|
});
|
|
}
|
|
listGrid.trigger('reloadGrid');
|
|
}
|
|
|
|
function formatQuotaAbs(obj, fieldName) {
|
|
var html = "";
|
|
var upperValue = obj["Quota_" + fieldName + "_Upper"];
|
|
var lowerValue = obj["Quota_" + fieldName + "_Lower"];
|
|
if ((lowerValue != null && !isNaN(lowerValue)) || (upperValue != null && !isNaN(upperValue))) {
|
|
if (lowerValue != null && !isNaN(lowerValue)) {
|
|
html = lowerValue.toLocaleString();
|
|
}
|
|
html += "~";
|
|
if (upperValue != null && !isNaN(upperValue)) {
|
|
html += upperValue.toLocaleString();
|
|
}
|
|
}
|
|
return html;
|
|
}
|
|
|
|
function formatQuotaRef(obj, fieldName) {
|
|
var html = "";
|
|
var upperValue = obj["Quota_" + fieldName + "_Upper"];
|
|
var lowerValue = obj["Quota_" + fieldName + "_Lower"];
|
|
if (!isNaN(lowerValue) || !isNaN(upperValue)) {
|
|
if (!isNaN(lowerValue)) {
|
|
html = (lowerValue * 100).toFixed(2) + "%";
|
|
}
|
|
html += "~";
|
|
if (!isNaN(upperValue)) {
|
|
html += (upperValue * 100).toFixed(2) + "%";
|
|
}
|
|
}
|
|
return html;
|
|
}
|
|
|
|
function checkQuota(obj, fieldName, fieldName2) {
|
|
var tValue = obj[fieldName];
|
|
if (!fieldName2) {
|
|
fieldName2 = fieldName
|
|
}
|
|
if (tValue == 'NaN' && fieldName == "Concentration") {
|
|
return "background-color:#EE7280;";
|
|
}
|
|
if (Number(tValue) || tValue == 0) {
|
|
if (tValue > obj["Quota_" + fieldName2 + "_Upper"] ||
|
|
tValue < obj["Quota_" + fieldName2 + "_Lower"]) {
|
|
return "background-color:#EE7280;";
|
|
}
|
|
if (tValue > obj["Quota_" + fieldName2 + "_wUpper"] ||
|
|
tValue < obj["Quota_" + fieldName2 + "_wLower"]) {
|
|
return "background-color:#F4F262;";
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
function checkZero1(obj, fieldName) {
|
|
var tValue = obj[fieldName];
|
|
if (tValue < 0) {
|
|
return "background-color:#EE7280";
|
|
}
|
|
return "";
|
|
}
|
|
|
|
function checkZero2(obj, fieldName) {
|
|
var tValue = obj[fieldName];
|
|
if (tValue > 0) {
|
|
return "background-color:#EE7280";
|
|
}
|
|
return "";
|
|
}
|
|
|
|
function changeRowStatus(event) {
|
|
var objIcon = event.getElementsByTagName("i");
|
|
var status = false;
|
|
if ($(objIcon).prop('class').indexOf('plus') > 0) {
|
|
$(objIcon).removeClass('fa-plus-square-o').addClass('fa-minus-square-o')
|
|
status = true;
|
|
} else {
|
|
$(objIcon).removeClass('fa-minus-square-o').addClass('fa-plus-square-o')
|
|
status = false;
|
|
}
|
|
var index = 0;
|
|
var grid = $("#listGrid");
|
|
var note = $(event).parents("tr");
|
|
do {
|
|
index++;
|
|
if (index > 10) {
|
|
break;
|
|
}
|
|
var next = $(note).next();
|
|
var id = Number($(next).prop("id"));
|
|
var obj = grid.getRowData(id);
|
|
if (obj.ParentKey || obj.BusinessType == '合计') {
|
|
break;
|
|
}
|
|
if (status) {
|
|
$(next).show();
|
|
} else {
|
|
$(next).hide();
|
|
}
|
|
note = next;
|
|
} while (true);
|
|
}
|
|
|
|
const key = 'quotaMonitor_';
|
|
|
|
function showcolumnChooser() {
|
|
var jgrid = jQuery('#listGrid');
|
|
var tag = $("#myTab .active a").attr("tag");
|
|
main.showcolumnChooser(jgrid, key + tag);
|
|
}
|
|
|
|
function approval(postData) {
|
|
$.ajax({
|
|
type: "Post",
|
|
url: "/risk/ApprovalQuotaSetting",
|
|
data: { req: postData },
|
|
dataType: "json",
|
|
success: function (res) {
|
|
if (res && res.msg) {
|
|
main.alert(res.msg);
|
|
}
|
|
layer.closeAll();
|
|
SearchClick(true);
|
|
},
|
|
beforeSend(jqXHR) {
|
|
main.waitMe(true);
|
|
},
|
|
complete(jqXHR, textStatus) {
|
|
main.waitMe(false);
|
|
}
|
|
});
|
|
}
|
|
|
|
function UploadFile(options) {
|
|
|
|
if (!options || !options.url || !options.inputId) {
|
|
throw '[UploadFile]参数错误';
|
|
}
|
|
|
|
let file = $('#' + options.inputId).prop('files');
|
|
if (!file || !file[0]) return;
|
|
file = file[0];
|
|
var formData = options.formData;
|
|
if (!formData) {
|
|
formData = new FormData();
|
|
}
|
|
formData.append("file", file, file.name);
|
|
formData.append("upload_file", true);
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: options.url,
|
|
xhr: function () {
|
|
var myXhr = $.ajaxSettings.xhr();
|
|
if (myXhr.upload) {
|
|
myXhr.upload.addEventListener('progress', options.progressFn, false);
|
|
}
|
|
return myXhr;
|
|
},
|
|
beforeSend() {
|
|
main.waitMe("show");
|
|
},
|
|
success: options.success,
|
|
error(error) {
|
|
main.alert("导入失败:" + error.statusText);
|
|
},
|
|
complete(result) {
|
|
main.waitMe("hide");
|
|
$('#' + options.inputId).val('');
|
|
},
|
|
async: true,
|
|
data: formData,
|
|
cache: false,
|
|
contentType: false,
|
|
processData: false,
|
|
timeout: 0 //永不超时 ,导入不限制超时时间
|
|
});
|
|
}
|
|
|
|
function quotaMonitorUploadForm(url) {
|
|
let fileName = $("#openFile").val();
|
|
if (!fileName) {
|
|
return main.alert("请选择要导入的文件!");
|
|
}
|
|
let index = fileName.lastIndexOf(".");
|
|
let fileEx = index > 0 ? fileName.substr(index).toLowerCase() : '';
|
|
if (fileEx !== '.xlsx') {
|
|
return main.alert("只能上传.xlsx类型的文件!");
|
|
}
|
|
function success(data) {
|
|
if (data.success) {
|
|
_reloadData = 'reloadData';
|
|
main.alert(!data.totalNum ? '导入成功!' : "共 {0} 条数据,导入成功 {1} 条数据!".template(data.totalNum, data.successNum));
|
|
} else {
|
|
main.alert("导入失败:" + data.msg);
|
|
}
|
|
}
|
|
main.confirm("确定导入?", UploadFile.bind(null, { inputId: 'openFile', url: url, success: success }));
|
|
}
|
|
|
|
function Output() {
|
|
var fileName = new moment().format("YYYYMMDD") + $('#myTab .active a').text();
|
|
main.toExcel("listGrid", fileName, "xls", null, [" ", "操作"]);
|
|
}
|
|
|
|
function confirmAllSelect() {
|
|
var selectedIds = jQuery('#listGrid').jqGrid('getGridParam', 'selarrrow');
|
|
if (selectedIds.length < 1) {
|
|
main.message("请选择需确认的交易");
|
|
return;
|
|
}
|
|
|
|
var confirmFunc = function (additionalProcessing, id, useRecall) {
|
|
var ggrid = jQuery('#listGrid');
|
|
var rowIds = ggrid.jqGrid('getGridParam', 'selarrrow');
|
|
var ors = [];
|
|
if (id) {
|
|
ors.push(id);
|
|
} else {
|
|
for (var i = 0; i < rowIds.length; i++) {
|
|
var or = ggrid.getRowData(rowIds[i]).id;
|
|
ors.push(or);
|
|
}
|
|
}
|
|
var pData = { tradeids: ors.join(",") };
|
|
pData.isSkipCheck = false;
|
|
if (!main.isEmpty(additionalProcessing)) {
|
|
pData.additionalProcessing = additionalProcessing;
|
|
}
|
|
|
|
var ajaxopt = {
|
|
type: "Post",
|
|
url: "/trade/tradeConfirm",
|
|
data: pData,
|
|
success: function (data) {
|
|
//错误是打印错误提示
|
|
if (!data.success) {
|
|
main.alert(data.msg + "\r\n批量操作已终止");
|
|
if (reloadtrade) {
|
|
reloadtrade();
|
|
}
|
|
return;
|
|
}
|
|
if (data.obj && data.obj.proccessType === "AdditionalProcessing") {
|
|
if (data.obj.TrialDataId) {
|
|
var layerSetting = {
|
|
type: 2,
|
|
title: "提示",
|
|
shadeClose: false,
|
|
shade: 0.4,
|
|
area: ['800px', '500px'],
|
|
content: "/trade/showQuotaTrial?id=" + data.obj.TrialDataId,
|
|
yes: function (index) {
|
|
var obj = window["layui-layer-iframe" + index].page;
|
|
if (obj.IsTF) {
|
|
if (obj.Data.Remark && obj.Data.Remark.length > 0) {
|
|
main.post("/trade/SaveQuotaTrial", obj.Data, { async: false }).done(function (res) {
|
|
if (!res || !res.success) {
|
|
main.message(res.msg);
|
|
}
|
|
});
|
|
confirmFunc("LackOfMoney", obj.Data.TradeId, true);
|
|
} else {
|
|
main.message("必须填写说明内容,才可以录入交易");
|
|
return;
|
|
}
|
|
} else {
|
|
if (obj.Data.Remark && obj.Data.Remark.length > 0) {
|
|
main.post("/trade/SaveQuotaTrial", obj.Data, { async: false }).done(function (res) {
|
|
if (!res || !res.success) {
|
|
main.message(res.msg);
|
|
}
|
|
});
|
|
}
|
|
confirmFunc("LackOfMoney", obj.Data.TradeId, true);
|
|
}
|
|
(parent || window).layer.closeAll();
|
|
},
|
|
cancel: function () {
|
|
if (window.parent && window.parent.reloadtrade) {
|
|
window.parent.reloadtrade();
|
|
}
|
|
(parent || window).layer.closeAll();
|
|
}
|
|
};
|
|
if (data.obj.type === "LackOfMoney") {
|
|
layerSetting.btn = [page.buttonStr, '取消'];
|
|
}
|
|
|
|
// 只展示“资金状况”的情况
|
|
if (data.obj.typecode === "FundStatus") {
|
|
layerSetting.btn = ["确认", '取消'];
|
|
}
|
|
|
|
layer.open(layerSetting);
|
|
}
|
|
else {
|
|
if (data.obj.message) {
|
|
main.message(data.obj.message);
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
if (useRecall) {
|
|
confirmFunc();
|
|
return;
|
|
} else {
|
|
main.message(data.msg);
|
|
}
|
|
|
|
if (page.generateAmendDoc && data.obj && data.obj.generateChangeSuccess) {
|
|
main.downloadFiles(data.obj.url);
|
|
}
|
|
|
|
if (page.needSendChangeEmail && data.obj && data.obj.generateChangeSuccess) {
|
|
main.confirm("确认发送变更确认书?",
|
|
function () {
|
|
main.post("/trade/SendChangeConfirmEmails", { tradeids: ors.join(",") })
|
|
.done(function (data) {
|
|
if (data.success) {
|
|
main.message("发送成功");
|
|
} else {
|
|
main.message(data.msg);
|
|
}
|
|
});
|
|
});
|
|
}
|
|
SearchClick(true);
|
|
},
|
|
beforeSend: function () {
|
|
main.waitMe(true);
|
|
},
|
|
complete: function () {
|
|
main.waitMe(false);
|
|
},
|
|
error: function (msg) {
|
|
main.message(msg);
|
|
}
|
|
};
|
|
$.ajax(ajaxopt);
|
|
};
|
|
|
|
///批量结算
|
|
main.confirm("确认所有选中交易?", confirmFunc);
|
|
}
|
|
|
|
|
|
var colModel_setting = [
|
|
{
|
|
name: 'id',
|
|
label: ' ',
|
|
index: 'id',
|
|
width: 35,
|
|
align: 'center',
|
|
sortable: false,
|
|
hidden: true,
|
|
optionHide: true
|
|
}, {
|
|
name: 'Percent',
|
|
label: 'Percent',
|
|
index: 'Percent',
|
|
width: 35,
|
|
align: 'left',
|
|
sortable: false,
|
|
hidden: true,
|
|
optionHide: true
|
|
}, {
|
|
name: 'option',
|
|
label: '操作',
|
|
index: 'option',
|
|
width: 150,
|
|
align: 'center',
|
|
sortable: false,
|
|
optionHide: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
var html = "<input type=\"button\" class=\"wentiEdit\" title='查看日志' onclick=\"showWindow('历史',{TypeId:{0}})\" value=\"{1}\" />"
|
|
.template(rowObject.id, "日志", rowObject.OptDate);
|
|
if (page.AllowApproval && page.ApprovalStatusDict[rowObject.Status] === "待确认") {
|
|
html += "<input type=\"button\" class=\"wentiEdit\" title='操作' onclick=\"showWindow('确认操作',{id:{0},optDate:'{2}'})\" value=\"{1}\" />"
|
|
.template(rowObject.id, "操作", rowObject.OptDate);
|
|
} else {
|
|
}
|
|
return html;
|
|
}
|
|
}, {
|
|
name: 'QuotaType',
|
|
label: '限额维度',
|
|
index: 'QuotaType',
|
|
width: 120,
|
|
align: 'left',
|
|
sortable: true,
|
|
optionHide: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return page.QuotaTypeDict[cellvalue];
|
|
}
|
|
}, {
|
|
name: 'Precheck',
|
|
label: '是否预先检查',
|
|
index: 'Precheck',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue ? "否" : "是";
|
|
}
|
|
}, {
|
|
name: 'QuotaRangeStr',
|
|
label: '限额范围',
|
|
index: 'QuotaRangeStr',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return cellvalue;
|
|
}
|
|
}, {
|
|
name: 'QuotaIndex',
|
|
label: '限额指标',
|
|
index: 'QuotaIndex',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: true,
|
|
}, {
|
|
name: 'QuotaUpperLimit',
|
|
label: '限额上限',
|
|
index: 'QuotaUpperLimit',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (rowObject.Percent) {
|
|
return cellvalue == null || cellvalue == undefined || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
} else {
|
|
return cellvalue == null || cellvalue == undefined || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
}
|
|
}, {
|
|
name: 'QuotaLowerLimit',
|
|
label: '限额下限',
|
|
index: 'QuotaLowerLimit',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (rowObject.Percent) {
|
|
return cellvalue == null || cellvalue == undefined || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
} else {
|
|
return cellvalue == null || cellvalue == undefined || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
}
|
|
}, {
|
|
name: 'WarningUpperLimit',
|
|
label: '预警上限',
|
|
index: 'WarningUpperLimit',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (rowObject.Percent) {
|
|
return cellvalue == null || cellvalue == undefined || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
} else {
|
|
return cellvalue == null || cellvalue == undefined || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
}
|
|
}, {
|
|
name: 'WarningLowerLimit',
|
|
label: '预警下限',
|
|
index: 'WarningLowerLimit',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (rowObject.Percent) {
|
|
return cellvalue == null || cellvalue == undefined || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
} else {
|
|
return cellvalue == null || cellvalue == undefined || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
}
|
|
}, {
|
|
name: 'IsValid',
|
|
label: '状态',
|
|
index: 'IsValid',
|
|
width: 60,
|
|
align: 'center',
|
|
sortable: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
var status = page.ApprovalStatusDict[rowObject.Status];
|
|
if (status === "已确认") {
|
|
return cellvalue ? "有效" : "无效";
|
|
} else if (status === "已拒绝") {
|
|
return "无效";
|
|
} else {
|
|
return cellvalue ? "待生效" : "待删除";
|
|
}
|
|
}
|
|
}, {
|
|
name: 'Status',
|
|
label: '确认状态',
|
|
index: 'Status',
|
|
width: 80,
|
|
align: 'center',
|
|
sortable: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return page.ApprovalStatusDict[cellvalue];
|
|
}
|
|
}, {
|
|
name: 'OptDate',
|
|
label: '操作时间',
|
|
index: 'OptDate',
|
|
width: 160,
|
|
align: 'center',
|
|
sortable: true,
|
|
formatter: 'Date'
|
|
}
|
|
];
|
|
var colModel_asset = [
|
|
{
|
|
name: 'UnderlyingCode',
|
|
label: '挂钩标的',
|
|
index: 'UnderlyingCode',
|
|
width: 120,
|
|
align: 'left',
|
|
sortable: false,
|
|
optionHide: true,
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'StockEqvNotional',
|
|
label: '名义本金',
|
|
index: 'StockEqvNotional',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'StockEqvNotional');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_StockEqvNotional_Upper',
|
|
label: '名义本金限额',
|
|
index: 'Quota_StockEqvNotional_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'StockEqvNotional');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'DeltaExposure',
|
|
label: 'Delta敞口(多空比)',
|
|
index: 'DeltaExposure',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'DeltaExposure');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_DeltaExposure_Upper',
|
|
label: 'Delta敞口限额',
|
|
index: 'Quota_DeltaExposure_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaRef(rowObject, 'DeltaExposure');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'DeltaNetExposure',
|
|
label: 'Delta净敞口比例',
|
|
index: 'DeltaNetExposure',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'DeltaNetExposure');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_DeltaNetExposure_Upper',
|
|
label: 'Delta净敞口限额',
|
|
index: 'Quota_DeltaNetExposure_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaRef(rowObject, 'DeltaNetExposure');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'DeltaCash',
|
|
label: 'Delta金额',
|
|
index: 'DeltaCash',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'DeltaCash');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_DeltaCash_Upper',
|
|
label: 'Delta金额限额',
|
|
index: 'Quota_DeltaCash_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'DeltaCash');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'GammaCash',
|
|
label: 'Gamma金额',
|
|
index: 'GammaCash',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'GammaCash');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_GammaCash_Upper',
|
|
label: 'Gamma金额限额',
|
|
index: 'Quota_GammaCash_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'GammaCash');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Vega',
|
|
label: 'Vega',
|
|
index: 'Vega',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'Vega');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_Vega_Upper',
|
|
label: 'Vega限额',
|
|
index: 'Quota_Vega_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'Vega');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Concentration',
|
|
label: '集中度',
|
|
index: 'Concentration',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'Concentration');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_Concentration_Upper',
|
|
label: '集中度限额',
|
|
index: 'Quota_Concentration_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaRef(rowObject, 'Concentration');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
},
|
|
];
|
|
var colModel_undelrying = [
|
|
{
|
|
name: 'UnderlyingCode',
|
|
label: '挂钩标的',
|
|
index: 'UnderlyingCode',
|
|
width: 120,
|
|
align: 'left',
|
|
sortable: false,
|
|
optionHide: true,
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'StockEqvNotional',
|
|
label: '轧差名义本金',
|
|
index: 'StockEqvNotional',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'StockEqvNotional');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_StockEqvNotional_Upper',
|
|
label: '名义本金限额',
|
|
index: 'Quota_StockEqvNotional_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'StockEqvNotional');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Concentration',
|
|
label: '轧差集中度',
|
|
index: 'Concentration',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "Na" : (cellvalue * 100).toFixed(2) + "%";
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'Concentration');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_Concentration_Upper',
|
|
label: '集中度限额',
|
|
index: 'Quota_Concentration_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaRef(rowObject, 'Concentration');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}
|
|
];
|
|
|
|
var colModel_variety = [
|
|
{
|
|
name: 'UnderlyingCode',
|
|
label: '挂钩标的',
|
|
index: 'UnderlyingCode',
|
|
width: 120,
|
|
align: 'left',
|
|
sortable: false,
|
|
optionHide: true,
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'StockEqvNotional',
|
|
label: '名义本金',
|
|
index: 'StockEqvNotional',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (page.IsGuoXin && cellvalue != null) {
|
|
return cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'StockEqvNotional');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_StockEqvNotional_Upper',
|
|
label: '名义本金限额',
|
|
index: 'Quota_StockEqvNotional_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'StockEqvNotional');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'DeltaExposure',
|
|
label: 'Delta敞口(多空比)',
|
|
index: 'DeltaExposure',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'DeltaExposure');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_DeltaExposure_Upper',
|
|
label: 'Delta敞口限额',
|
|
index: 'Quota_DeltaExposure_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaRef(rowObject, 'DeltaExposure');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'DeltaNetExposure',
|
|
label: 'Delta净敞口比例',
|
|
index: 'DeltaNetExposure',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'DeltaNetExposure');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_DeltaNetExposure_Upper',
|
|
label: 'Delta净敞口限额',
|
|
index: 'Quota_DeltaNetExposure_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaRef(rowObject, 'DeltaNetExposure');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'DeltaCash',
|
|
label: 'Delta金额',
|
|
index: 'DeltaCash',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (page.IsGuoXin && cellvalue != null) {
|
|
return cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'DeltaCash');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_DeltaCash_Upper',
|
|
label: 'Delta金额限额',
|
|
index: 'Quota_DeltaCash_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'DeltaCash');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'GammaCash',
|
|
label: 'Gamma金额',
|
|
index: 'GammaCash',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (page.IsGuoXin && cellvalue != null) {
|
|
return cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'GammaCash');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_GammaCash_Upper',
|
|
label: 'Gamma金额限额',
|
|
index: 'Quota_GammaCash_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'GammaCash');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Theta',
|
|
label: 'Theta',
|
|
index: 'Theta',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (page.IsGuoXin && cellvalue != null) {
|
|
return cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'Theta');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_Theta_Upper',
|
|
label: 'Theta限额',
|
|
index: 'Quota_Theta_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'Theta');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Vega',
|
|
label: 'Vega',
|
|
index: 'Vega',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (page.IsGuoXin && cellvalue != null) {
|
|
return cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'Vega');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_Vega_Upper',
|
|
label: 'Vega限额',
|
|
index: 'Quota_Vega_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'Vega');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'VegaCash',
|
|
label: 'Vega金额',
|
|
index: 'VegaCash',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (page.IsGuoXin && cellvalue != null) {
|
|
return cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'VegaCash');
|
|
if (!rowObject.ParentKey) {
|
|
style += 'font-weight: bold;'
|
|
if (rowObject.BusinessType == "合计") {
|
|
style += 'font-size: 1rem;'
|
|
}
|
|
}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_VegaCash_Upper',
|
|
label: 'Vega金额限额',
|
|
index: 'Quota_VegaCash_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'VegaCash');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
if (!rowObject.ParentKey) {
|
|
style += 'font-weight: bold;'
|
|
if (rowObject.BusinessType == "合计") {
|
|
style += 'font-size: 1rem;'
|
|
}
|
|
}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Concentration',
|
|
label: '集中度',
|
|
index: 'Concentration',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'Concentration');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_Concentration_Upper',
|
|
label: '集中度限额',
|
|
index: 'Quota_Concentration_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaRef(rowObject, 'Concentration');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'PositionPnl',
|
|
label: '浮动盈亏',
|
|
index: 'PositionPnl',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (page.IsGuoXin && cellvalue != null) {
|
|
return cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'PositionPnl');
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_PositionPnl_Upper',
|
|
label: '浮动盈亏限额',
|
|
index: 'Quota_PositionPnl_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'PositionPnl');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}
|
|
];
|
|
|
|
var colModel_client = [
|
|
{
|
|
name: 'ClientNumber',
|
|
label: '客户编号',
|
|
index: 'ClientNumber',
|
|
width: 120,
|
|
align: 'left',
|
|
optionHide: true,
|
|
sortable: false,
|
|
}, {
|
|
name: 'ClientName',
|
|
label: '客户名称',
|
|
index: 'ClientName',
|
|
width: 180,
|
|
align: 'left',
|
|
optionHide: true,
|
|
sortable: false,
|
|
}, {
|
|
name: 'StockEqvNotional',
|
|
label: '名义本金',
|
|
index: 'StockEqvNotional',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = "style='" + checkQuota(rowObject, 'StockEqvNotional') + "'";
|
|
return style;
|
|
}
|
|
}, {
|
|
name: 'Quota_StockEqvNotional_Upper',
|
|
label: '名义本金限额',
|
|
index: 'Quota_StockEqvNotional_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'StockEqvNotional');
|
|
}
|
|
}, {
|
|
name: 'PositionMargin',
|
|
label: '维持预付金',
|
|
index: 'PositionMargin',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
}, {
|
|
name: 'AvailableFund',
|
|
label: '可用资金',
|
|
index: 'AvailableFund',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
}
|
|
];
|
|
|
|
var colModel_trade = [
|
|
{
|
|
name: 'TradeNumber',
|
|
label: '交易编号',
|
|
index: 'TradeNumber',
|
|
width: 180,
|
|
align: 'left',
|
|
optionHide: true,
|
|
sortable: false,
|
|
}, {
|
|
name: 'ClientName',
|
|
label: '客户名称',
|
|
index: 'ClientName',
|
|
width: 180,
|
|
align: 'left',
|
|
optionHide: true,
|
|
sortable: false,
|
|
}, {
|
|
name: 'Quota_SwapPercent_Upper',
|
|
label: '互换价格偏离比例限额',
|
|
index: 'Quota_SwapPercent_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'SwapPercent');
|
|
}
|
|
}, {
|
|
name: 'Quota_SwapPercent',
|
|
label: '互换价格偏离比例',
|
|
index: 'Quota_SwapPercent',
|
|
width: 140,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = "style='" + checkQuota(rowObject, 'SwapPercent') + "'";
|
|
return style;
|
|
}
|
|
}, {
|
|
name: 'Quota_DV_Upper',
|
|
label: 'DV限额',
|
|
index: 'Quota_DV_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'DV');
|
|
}
|
|
}, {
|
|
name: 'DV',
|
|
label: 'DV',
|
|
index: 'DV',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (!cellvalue && cellvalue !== 0 || cellvalue == "NaN") return "";
|
|
var abs = Math.abs(cellvalue);
|
|
if (abs < 0.0001) return "0";
|
|
return cellvalue.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 4 });
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = "style='" + checkQuota(rowObject, 'DV') + "'";
|
|
return style;
|
|
}
|
|
}
|
|
];
|
|
|
|
var colModel_global = [
|
|
{
|
|
name: 'ParentKey',
|
|
label: ' ',
|
|
index: 'ParentKey',
|
|
width: 35,
|
|
align: 'center',
|
|
sortable: false,
|
|
optionHide: true,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue && rowObject.BusinessType != "合计" ? '<a href="javascript:;" onclick="changeRowStatus(this)"><i class="fa fa-minus-square-o" style="font-size: 1.2rem;" aria-hidden="true"></i></a>' : '';
|
|
}
|
|
}, {
|
|
name: 'BusinessType',
|
|
label: '业务类型',
|
|
index: 'BusinessType',
|
|
width: 120,
|
|
align: 'left',
|
|
sortable: false,
|
|
optionHide: true,
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
if (!rowObject.ParentKey) {
|
|
style += 'font-weight: bold;'
|
|
if (rowObject.BusinessType == "合计") {
|
|
style += 'font-size: 1rem;'
|
|
}
|
|
}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'StockEqvNotional',
|
|
label: '名义本金',
|
|
index: 'StockEqvNotional',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (rowObject.BusinessType == "场内业务") {
|
|
return '<div class="lineCss"></div>';
|
|
}
|
|
if (page.IsGuoXin && cellvalue != null) {
|
|
return cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'StockEqvNotional');
|
|
if (!rowObject.ParentKey) {
|
|
style += 'font-weight: bold;'
|
|
if (rowObject.BusinessType == "合计") {
|
|
style += 'font-size: 1rem;'
|
|
}
|
|
}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_StockEqvNotional_Upper',
|
|
label: '名义本金限额',
|
|
index: 'Quota_StockEqvNotional_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'StockEqvNotional');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
if (!rowObject.ParentKey) {
|
|
style += 'font-weight: bold;'
|
|
if (rowObject.BusinessType == "合计") {
|
|
style += 'font-size: 1rem;'
|
|
}
|
|
}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'DeltaExposure',
|
|
label: 'Delta',
|
|
index: 'DeltaExposure',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue;
|
|
}
|
|
}, {
|
|
name: 'Quota_DV_Upper',
|
|
label: 'DV限额',
|
|
index: 'Quota_DV_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'DV');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
if (!rowObject.ParentKey) {
|
|
style += 'font-weight: bold;'
|
|
if (rowObject.BusinessType == "合计") {
|
|
style += 'font-size: 1rem;'
|
|
}
|
|
}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'DV',
|
|
label: 'DV',
|
|
index: 'DV',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (rowObject.BusinessType == "场内业务") {
|
|
return '<div class="lineCss"></div>';
|
|
}
|
|
if (!cellvalue && cellvalue !== 0 || cellvalue == "NaN") return "";
|
|
if (Math.abs(cellvalue) < 0.0001) return "0";
|
|
return cellvalue.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 4 });
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'DV');
|
|
if (!rowObject.ParentKey) {
|
|
style += 'font-weight: bold;'
|
|
if (rowObject.BusinessType == "合计") {
|
|
style += 'font-size: 1rem;'
|
|
}
|
|
}
|
|
return "style='" + style + "'";
|
|
}
|
|
}
|
|
];
|
|
|
|
var colModel_assetunit = [
|
|
{
|
|
// name: 'ParentKey',
|
|
// label: ' ',
|
|
// index: 'ParentKey',
|
|
// width: 35,
|
|
// align: 'center',
|
|
// sortable: false,
|
|
// optionHide: true,
|
|
// //formatter: function (cellvalue, options, rowObject) {
|
|
// // return !cellvalue && rowObject.BusinessType != "合计" ? '<a href="javascript:;" onclick="changeRowStatus(this)"><i class="fa fa-minus-square-o" style="font-size: 1.2rem;" aria-hidden="true"></i></a>' : '';
|
|
// //}
|
|
//}, {
|
|
name: 'AssetBookName',
|
|
label: '挂钩簿记',
|
|
index: 'AssetBookName',
|
|
width: 120,
|
|
align: 'left',
|
|
sortable: false,
|
|
optionHide: true,
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'StockEqvNotional',
|
|
label: '名义本金',
|
|
index: 'StockEqvNotional',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'StockEqvNotional');
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_StockEqvNotional_Upper',
|
|
label: '名义本金限额',
|
|
index: 'Quota_StockEqvNotional_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'StockEqvNotional');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'DeltaCash',
|
|
label: 'Delta金额',
|
|
index: 'DeltaCash',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'DeltaCash');
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_DeltaCash_Upper',
|
|
label: 'Delta金额限额',
|
|
index: 'Quota_DeltaCash_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'DeltaCash');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'GammaCash',
|
|
label: 'Gamma金额',
|
|
index: 'GammaCash',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'GammaCash');
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_GammaCash_Upper',
|
|
label: 'Gamma金额限额',
|
|
index: 'Quota_GammaCash_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'GammaCash');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Vega',
|
|
label: 'Vega',
|
|
index: 'Vega',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'Vega');
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_Vega_Upper',
|
|
label: 'Vega限额',
|
|
index: 'Quota_Vega_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'Vega');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Theta',
|
|
label: 'Theta',
|
|
index: 'Theta',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
if (page.IsGuoXin && cellvalue != null) {
|
|
return cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
}
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'Theta');
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_Theta_Upper',
|
|
label: 'Theta限额',
|
|
index: 'Quota_Theta_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'Theta');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Concentration',
|
|
label: '集中度',
|
|
index: 'Concentration',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : (cellvalue * 100).toFixed(2) + "%";
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'Concentration');
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_Concentration_Upper',
|
|
label: '集中度限额',
|
|
index: 'Quota_Concentration_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaRef(rowObject, 'Concentration');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}
|
|
, {
|
|
name: 'PositionPnl',
|
|
label: '浮动盈亏',
|
|
index: 'PositionPnl',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'PositionPnl');
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_PositionPnl_Upper',
|
|
label: '浮动盈亏限额',
|
|
index: 'Quota_PositionPnl_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'PositionPnl');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'TotalPnL',
|
|
label: '本年累计盈亏',
|
|
index: 'TotalPnL',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = checkQuota(rowObject, 'TotalPnL');
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}, {
|
|
name: 'Quota_TotalPnL_Upper',
|
|
label: '本年累计盈亏限额',
|
|
index: 'Quota_TotalPnL_Upper',
|
|
width: 120,
|
|
align: 'right',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return formatQuotaAbs(rowObject, 'TotalPnL');
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = '';
|
|
//if (!rowObject.ParentKey) {
|
|
// style += 'font-weight: bold;'
|
|
// if (rowObject.BusinessType == "合计") {
|
|
// style += 'font-size: 1rem;'
|
|
// }
|
|
//}
|
|
return "style='" + style + "'";
|
|
}
|
|
}
|
|
];
|
|
var colModel_Log = [
|
|
{
|
|
name: 'CreateTime',
|
|
label: '操作时间',
|
|
index: 'CreateTime',
|
|
width: 180,
|
|
align: 'center',
|
|
sortable: false
|
|
}, {
|
|
name: 'OptName',
|
|
label: '操作人',
|
|
index: 'OptName',
|
|
width: 150,
|
|
align: 'center',
|
|
sortable: false
|
|
}, {
|
|
name: 'Log',
|
|
label: '操作内容',
|
|
index: 'Log',
|
|
width: 330,
|
|
align: 'lift',
|
|
sortable: false,
|
|
formatter: function (cellvalue, options, rowObject) {
|
|
return rowObject.Log;
|
|
},
|
|
cellattr: function (cellvalue, options, rowObject) {
|
|
var style = 'style="white-space: pre-wrap;"';
|
|
return style;
|
|
}
|
|
}, {
|
|
name: 'Remark',
|
|
label: '备注',
|
|
index: 'Remark',
|
|
width: 200,
|
|
align: 'center',
|
|
sortable: false
|
|
}
|
|
]; |