472 lines
20 KiB
JavaScript
472 lines
20 KiB
JavaScript
function changeBinaryCalculation() {
|
|
var binaryCalculation = $("#BinaryCalculation").val();
|
|
if (!binaryCalculation || binaryCalculation === "Analytical") {
|
|
$("#BinaryReplicationSelection").prop("disabled", true);
|
|
$("#BinaryReplicationBtn").prop("disabled", true);
|
|
}
|
|
else {
|
|
$("#BinaryReplicationSelection").prop("disabled", false);
|
|
$("#BinaryReplicationBtn").prop("disabled", false);
|
|
}
|
|
}
|
|
|
|
$(function () {
|
|
$(function () { $("[data-toggle='tooltip']").tooltip({ trigger: "hover focus manual" }); });
|
|
$("#BinaryCalculation").on('change', changeBinaryCalculation);
|
|
changeBinaryCalculation();
|
|
|
|
|
|
});
|
|
|
|
function PopDesc() {
|
|
main.open("配置客户声明", "/valuedate/clientDesc", { area: ['65%', '75%'] });
|
|
}
|
|
|
|
var vue = new Vue({
|
|
el: "#listdiv",
|
|
data: {
|
|
SystemValue: SystemValue,
|
|
PsConfig: { ...pageObj.PsConfig },
|
|
DisabledAutoBtn: pageObj.DisabledAutoBtn
|
|
},
|
|
mounted: function () {
|
|
var thisObj = this;
|
|
thisObj.SystemValue.ValueDate = new moment(this.SystemValue.ValueDate).format("YYYY-MM-DD");
|
|
if (this.SystemValue.TwoSideMarginValueDate) {
|
|
thisObj.SystemValue.TwoSideMarginValueDate = new moment(this.SystemValue.TwoSideMarginValueDate).format("YYYY-MM-DD");
|
|
}
|
|
|
|
if (this.SystemValue.Type === "false") {
|
|
$("#btnautodate").prop("checked", false);
|
|
} else {
|
|
$("#btnautodate").prop("checked", true);
|
|
}
|
|
if (!thisObj.SystemValue.ConfigInfoData.ValueVanillaOptionMode)
|
|
thisObj.SystemValue.ConfigInfoData.ValueVanillaOptionMode = "二叉树";
|
|
|
|
|
|
|
|
if(typeof this.SystemValue.AssetIds != "undefined" && this.SystemValue.AssetIds != null && this.SystemValue.AssetIds != ""){
|
|
let assetIds = this.SystemValue.AssetIds.split(',');
|
|
$("#AssetId").val(assetIds);
|
|
}
|
|
},
|
|
methods: {
|
|
saveValueVanillaOptionMode: function () {
|
|
var thisObj = this;
|
|
thisObj.SystemValue.ConfigInfo = JSON.stringify(thisObj.SystemValue.ConfigInfoData);
|
|
main.confirm("确认设置美式香草期权定价模型为{0}?".template(thisObj.SystemValue.ConfigInfoData.ValueVanillaOptionMode), function () {
|
|
main.post("/valuedate/SaveValueVanillaOptionMode", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveConfigInfo: function (fieldName) {
|
|
var thisObj = this;
|
|
thisObj.SystemValue.ConfigInfo = JSON.stringify(thisObj.SystemValue.ConfigInfoData);
|
|
main.confirm("确认更新{0}?".template(fieldName), function () {
|
|
main.post("/valuedate/SaveConfigInfo", { fileName: fieldName, valuedate: thisObj.SystemValue });
|
|
});
|
|
},
|
|
saveDividendRate: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认设置除权除息税率为{0}%?".template(thisObj.SystemValue.DividendRate), function () {
|
|
main.post("/valuedate/saveDividendRate", thisObj.SystemValue);
|
|
});
|
|
},
|
|
changeAuto: function () {
|
|
var thisObj = this;
|
|
var autodate = $("#btnautodate").prop("checked");
|
|
main.confirm("确认设置自动更新系统时间为:" + autodate, function () {
|
|
thisObj.SystemValue.Type = autodate;
|
|
main.post("/valuedate/ChangeAuto", thisObj.SystemValue);
|
|
}, function () {
|
|
$("#btnautodate").prop("checked", !autodate);
|
|
});
|
|
},
|
|
saveSystemDate: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认调整系统时间,并且取消自动更新系统时间?", function () {
|
|
main.post("/valuedate/SaveSystemDate", thisObj.SystemValue).done(function (res) {
|
|
window.location.reload();
|
|
});
|
|
});
|
|
},
|
|
saveTwoSideMarginValueDate: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认设置双向预付金启用日期?", function () {
|
|
main.post("/valuedate/saveTwoSideMarginValueDate", thisObj.SystemValue).done(function (res) {
|
|
window.location.reload();
|
|
});
|
|
});
|
|
},
|
|
saveRiskRate: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新无风险利率?", function () {
|
|
main.post("/valuedate/SaveRiskRate", thisObj.SystemValue);
|
|
});
|
|
|
|
},
|
|
saveRiskRateExtend: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新扩展无风险利率?", function () {
|
|
main.post("/valuedate/SaveRiskRateExtend", thisObj.SystemValue);
|
|
});
|
|
|
|
},
|
|
savecostRate: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新行权费率?", function () {
|
|
main.post("/valuedate/SaveCostRate", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveSpecialOperateForTrade: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新交易特批?", function () {
|
|
main.post("/valuedate/SaveSpecialOperateForTrade", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveSpecialOperateForCashOut: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新出金特批?", function () {
|
|
main.post("/valuedate/SaveSpecialOperateForCashOut", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveCloseReCheck: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新平仓行权复核?", function () {
|
|
main.post("/valuedate/SaveCloseReCheck", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveCloseReApprove: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新平仓行权审批?", function () {
|
|
main.post("/valuedate/SaveCloseReApprove", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveCanSetInitialMargin: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新初始预付金设置?", function () {
|
|
main.post("/valuedate/SaveCanSetInitialMargin", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveMarginRatio: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新预付金比率?", function () {
|
|
main.post("/valuedate/SaveMarginRatio", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveFutureMarginRatio: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新商品期货预付金比率?", function () {
|
|
main.post("/valuedate/SaveFutureMarginRatio", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveRiskExposureJ: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新信用风险敞口-CCR算法参数j?", function () {
|
|
main.post("/valuedate/SaveRiskExposureJ", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveRiskExposureN: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新信用风险敞口-CCR算法参数N?", function () {
|
|
main.post("/valuedate/SaveRiskExposureN", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveMarginJ: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新预付金-CCR算法参数j?", function () {
|
|
main.post("/valuedate/SaveMarginJ", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveMarginN: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新预付金-CCR算法参数N?", function () {
|
|
main.post("/valuedate/SaveMarginN", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveFutureMarginAddRatio: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新商品预付金加点?", function () {
|
|
main.post("/valuedate/SaveFutureMarginAddRatio", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveVolatilityRatio: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新波动率浮动比?", function () {
|
|
main.post("/valuedate/SaveVolatilityRatio", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveBinaryCalculationMethod: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新二元期权计算方法?", function () {
|
|
main.post("/valuedate/SaveBinaryCalculationMethod", thisObj.SystemValue);
|
|
var binaryCalculation = $("#BinaryCalculation").val();
|
|
|
|
if (binaryCalculation === "Analytical") {
|
|
$("#BinaryReplicationSelection").prop("disabled", true);
|
|
$("#BinaryReplicationBtn").prop("disabled", true);
|
|
}
|
|
else {
|
|
$("#BinaryReplicationSelection").prop("disabled", false);
|
|
$("#BinaryReplicationBtn").prop("disabled", false);
|
|
}
|
|
});
|
|
},
|
|
saveThetaType: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新Theta类型设置?", function () {
|
|
main.post("/valuedate/SaveThetaType", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveBinaryReplicationStrategy: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新二元期权复制策略?", function () {
|
|
main.post("/valuedate/SaveBinaryReplicationStrategy", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveCurveDayCount: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新CurveDayCount?", function () {
|
|
main.post("/valuedate/SaveCurveDayCount", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveTradeDayCount: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新TradeDayCount?", function () {
|
|
main.post("/valuedate/SaveTradeDayCount", thisObj.SystemValue);
|
|
});
|
|
},
|
|
savePositionReportTradeDayCount: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新持仓报送报告的一年有效天数?", function () {
|
|
main.post("/valuedate/SavePositionReportTradeDayCount", thisObj.SystemValue);
|
|
});
|
|
},
|
|
|
|
coveredClick: function () {
|
|
var thisObj = this;
|
|
if ($("#coveredCheck").prop("checked")) {
|
|
thisObj.SystemValue.IsCovered = 1;
|
|
} else {
|
|
thisObj.SystemValue.IsCovered = 0;
|
|
}
|
|
},
|
|
saveCoveredInfo: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认设置备兑?", function () {
|
|
main.post("/valuedate/SaveCoveredInfo", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveAutoRebackOrderInfo: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认设置客户端下单自动撤销?", function () {
|
|
main.post("/valuedate/SaveAutoRebackOrderInfo", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveDefaultAssetUnit: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新默认通道簿记账户?", function () {
|
|
main.post("/valuedate/SaveDefaultAssetUnit", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveDeltaCoefficient: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新商品期权预付金Delta系数?", function () {
|
|
main.post("/valuedate/SaveDeltaCoefficient", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveVegaCoefficient: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新商品期权预付金Vega系数?", function () {
|
|
main.post("/valuedate/SaveVegaCoefficient", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveOmegaCoefficient: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新商品期权预付金Omega系数?", function () {
|
|
main.post("/valuedate/SaveOmegaCoefficient", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveAlphaRate: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新商品期权预付金Alpha倍率?", function () {
|
|
main.post("/valuedate/SaveAlphaRate", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveFutureInitialMarginRatio: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新商品期权初始预付金?", function () {
|
|
main.post("/valuedate/SaveFutureInitialMarginRatio", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveSamePeerMarginCallPoint: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新同业追保起点?", function () {
|
|
main.post("/valuedate/SaveSamePeerMarginCallPoint", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveSettleDocMode: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新清算书生成模式?", function () {
|
|
main.post("/valuedate/SaveSettleDocMode", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveTradeContractDocMode: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新交易确认书生成模式?", function () {
|
|
main.post("/valuedate/SaveTradeContractDocMode", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveTradeContractMode: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新交易确认书甲乙方模式?", function () {
|
|
main.post("/valuedate/SaveTradeContractMode", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveEodSettlePriceMode: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新结算价格模式?", function () {
|
|
main.post("/valuedate/saveEodSettlePriceMode", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveEodSettleVolMode: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新结算波动率?", function () {
|
|
main.post("/valuedate/saveEodSettleVolMode", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveIsPotentialSurplusUseMargin: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新潜在行权盈余是否计入预付金余额?", function () {
|
|
main.post("/valuedate/saveIsPotentialSurplusUseMargin", thisObj.SystemValue);
|
|
});
|
|
},
|
|
savePotentialSurplusCalcMode: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新潜在行权盈余计算模式?", function () {
|
|
main.post("/valuedate/savePotentialSurplusCalcMode", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveAccruedTotalPnlStartDate: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新累计盈亏统计起始日?", function () {
|
|
main.post("/valuedate/saveAccruedTotalPnlStartDate", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveUploadExerciseScope: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新批量行权导入检查误差值范围?", function () {
|
|
main.post("/valuedate/saveUploadExerciseScope", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveSuperviseMainName: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新监管报告主体名称?", function () {
|
|
main.post("/valuedate/saveSuperviseMainName", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveSuperviseMainCode: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新监管报告主体的统一社会信用代码?", function () {
|
|
main.post("/valuedate/saveSuperviseMainCode", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveSupervisePrefix: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新监管报告文件前缀?", function () {
|
|
main.post("/valuedate/saveSupervisePrefix", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveQuotationCycle: function () {
|
|
var thisObj = this;
|
|
main.confirm("此改动将影响手机报价页面展示,确认修改?", function () {
|
|
main.post("/valuedate/saveQuotationCycle", thisObj.SystemValue);
|
|
});
|
|
},
|
|
savePartyUseColl: function () {
|
|
var thisObj = this;
|
|
main.confirm("此改动将影响证券业报送数据,确认修改?", function () {
|
|
main.post("/valuedate/savePartyUseColl", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveCollInstruction: function () {
|
|
var thisObj = this;
|
|
main.confirm("此改动将影响证券业报送数据,确认修改?", function () {
|
|
main.post("/valuedate/saveCollInstruction", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveTradeOpenVolOff: function () {
|
|
let val = _.trim(this.PsConfig.TradeOpenVolOff);
|
|
let val2 = _.trimEnd(val, '%');
|
|
if (val2 && !new Number(val2)) {
|
|
return main.alert("请输入有效的 成交首日结算波动率扣除比例");
|
|
}
|
|
main.confirm("确认修改 成交首日结算波动率扣除比例?", function () {
|
|
main.post("/AppConfig/AjaxSave", { name: "Erp.TradeOpenVolOff", value: val });
|
|
});
|
|
},
|
|
saveGuaranteedIncome: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认设置预付金保底收益率?", function () {
|
|
main.post("/valuedate/saveGuaranteedIncome", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveTradeTrial: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新交易试算?", function () {
|
|
main.post("/valuedate/saveTradeTrial", thisObj.SystemValue).done();
|
|
});
|
|
},
|
|
saveEditTradeNeedRemark: function () {
|
|
var thisObj = this;
|
|
main.confirm("此改动将使修改交易保存时弹出备注窗口,并强制输入,是否继续?", function () {
|
|
main.post("/valuedate/saveEditTradeNeedRemark", thisObj.SystemValue).done();
|
|
});
|
|
},
|
|
closePage: function (cid) {
|
|
parent.layer.closeAll();
|
|
},
|
|
saveGuaranteedIncome: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认设置预付金保底收益率?", function () {
|
|
main.post("/valuedate/saveGuaranteedIncome", thisObj.SystemValue);
|
|
});
|
|
},
|
|
saveUnwindSinglePriceAngle: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新平仓单价视角设置?", function () {
|
|
main.post("/valuedate/SaveUnwindSinglePriceAngle", thisObj.SystemValue);
|
|
});
|
|
},
|
|
changeUnwindSinglePriceAngle: function () {
|
|
var thisObj = this;
|
|
if (this.SystemValue.UnwindSinglePriceAngle == 1) {
|
|
this.SystemValue.UnwindAmountAngle = 1;
|
|
$("#UnwindAmountAngle").prop("disabled", "disabled");
|
|
} else {
|
|
$("#UnwindAmountAngle").prop("disabled", "");
|
|
}
|
|
},
|
|
saveUnwindAmountAngle: function () {
|
|
var thisObj = this;
|
|
main.confirm("确认更新平仓总额视角设置?", function () {
|
|
main.post("/valuedate/SaveUnwindAmountAngle", thisObj.SystemValue);
|
|
});
|
|
},
|
|
changeUnwindAmountAngle: function () {
|
|
var thisObj = this;
|
|
if (this.SystemValue.UnwindAmountAngle == 0) {
|
|
this.SystemValue.UnwindSinglePriceAngle = 0;
|
|
$("#UnwindSinglePriceAngle").prop("disabled", "disabled");
|
|
} else {
|
|
$("#UnwindSinglePriceAngle").prop("disabled", "");
|
|
}
|
|
},
|
|
saveAssetUnitsChooseNewTemplate: function () {
|
|
// console.log($("#AssetId").val());
|
|
main.confirm("确认更新亚式保险+期货项目特殊模板选择设置?", function () {
|
|
main.post("/valuedate/SaveAssetUnitsChooseNewTemplate", { assetIds: !$("#AssetId").val() ? "" : $("#AssetId").val().join(",") });
|
|
});
|
|
}
|
|
}
|
|
}); |