bug 修复
This commit is contained in:
@@ -471,6 +471,19 @@ const dutyVue = (function () {
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
dateFormat(v, f) {
|
||||
if (v == null || v == '') {
|
||||
return '';
|
||||
}
|
||||
if (!f) {
|
||||
f = 'YYYY-MM-DD';
|
||||
}
|
||||
var m = new moment(v);
|
||||
if (m.year() < 1910) {
|
||||
return '';
|
||||
}
|
||||
return new moment(v).format(f);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -261,18 +261,6 @@ function SearchClientBalance() {
|
||||
|
||||
$("#WorstCastClientPayable").prop("disabled", "true");
|
||||
$("#PayableFund").prop("disabled", "true");
|
||||
switch ($("#ShownType").val()) {
|
||||
case "default":
|
||||
$("#WorstCastClientPayable").prop("disabled", "");
|
||||
$("#PayableFund").prop("disabled", "");
|
||||
break;
|
||||
case "ClientBalanceGap": param.IsClientBalanceGap = true; break;
|
||||
case "GetOuterMargin": param.IsGetOuterMarginGap = true; break;
|
||||
default:
|
||||
$("#WorstCastClientPayable").prop("disabled", "");
|
||||
$("#PayableFund").prop("disabled", "");
|
||||
break;
|
||||
}
|
||||
if (!param.ValueDateStart) {
|
||||
// param.ValueDateStart = param.ValueDate;
|
||||
}
|
||||
@@ -374,7 +362,7 @@ function SendReport() {
|
||||
if (isXiangCai) {
|
||||
payablemargin = numeral($("#Margin").text()).format("0.00");
|
||||
}
|
||||
main.open("向{0}发送报告".template(clientName), "/clientbalance/TradeMarketClientSend?clientid=" + param.ClientId + "&payablemargin=" + payablemargin + "&payableFund=" + numeral($("#PayableFund").val()).format("0.00") + "&reportType=" + $("#ShownType").val() + "&ParentFlag=" + param.ParentFlag, { area: ['65%', '95%'] });
|
||||
main.open("向{0}发送报告".template(clientName), "/clientbalance/TradeMarketClientSend?clientid=" + param.ClientId + "&payablemargin=" + payablemargin + "&payableFund=" + numeral($("#PayableFund").val()).format("0.00") + "&reportType=GetOuterMargin" + "&ParentFlag=" + param.ParentFlag, { area: ['65%', '95%'] });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,12 @@ var vue = new Vue({
|
||||
this.rate.ClientId = client.id;
|
||||
this.rate.ClientNumber = client.Number;
|
||||
},
|
||||
setFloatRateUnderlyingCode(data) {
|
||||
this.rate.BaseUnderlyingCode = data.Code;
|
||||
if (data.Code.length > 0 && data.Code != '--') {
|
||||
this.rate.is_annualized = true;
|
||||
}
|
||||
},
|
||||
close() {
|
||||
window.parent.reloadData();
|
||||
layer.closeMe();
|
||||
|
||||
@@ -271,7 +271,7 @@ function showToolName(cellValue, options, rowObject) {
|
||||
return html;
|
||||
}
|
||||
function editRate(enid) {
|
||||
main.open("编辑浮动利率配置", "/SwapFloatRate/Edit?enid=" + enid, { area: ['500px', '600px'] });
|
||||
main.open("编辑浮动利率配置", "/SwapFloatRate/Edit?enid=" + enid, { area: ['500px', '650px'] });
|
||||
}
|
||||
function deleteRate(enid) {
|
||||
main.confirm("确定要删除吗?", function () {
|
||||
|
||||
@@ -344,10 +344,18 @@ const vue = new Vue({
|
||||
}
|
||||
x.SwapIntervalList.push(interval);
|
||||
}
|
||||
if (x.InterestType == 1 && item.interest_rest_days<0) {
|
||||
main.message("利息端第" + (index + 1) + "重置频率必须大于0");
|
||||
errorcount++;
|
||||
return false;
|
||||
}
|
||||
x.FloatRateUnderlyingCode = x.FloatRateUnderlyingCode == "--" ? null : x.FloatRateUnderlyingCode;
|
||||
x.InterestSwapInterval = JSON.stringify(x.SwapIntervalList);
|
||||
thisObj.trade.swap_positions.push(x);
|
||||
});
|
||||
if (errorcount > 0) {
|
||||
return;
|
||||
}
|
||||
var margin = 0;
|
||||
this.marginSwapList.forEach((x, index) => {
|
||||
if ((x.UnderlyingCode == null || x.UnderlyingCode.length == 0) && x.SwapIntervalList.length == 0) {
|
||||
@@ -452,6 +460,13 @@ const vue = new Vue({
|
||||
item.InterestType = 0;
|
||||
}
|
||||
},
|
||||
changeInterestType(item) {
|
||||
if (item.InterestType == 0) {
|
||||
item.interest_rest_days = null;
|
||||
} else {
|
||||
item.interest_rest_days = 1;
|
||||
}
|
||||
},
|
||||
setUnderlyingCode(data, item) {
|
||||
var underlyingCode = item.UnderlyingCode;
|
||||
if (underlyingCode != data.Code) {
|
||||
@@ -483,7 +498,6 @@ const vue = new Vue({
|
||||
item.interest_rest_days = 1;
|
||||
item.interest_rule = 0;
|
||||
} else {
|
||||
item.interest_rest_days = null;
|
||||
item.interest_rule = null;
|
||||
}
|
||||
//this.getFloatRate(item);
|
||||
@@ -1133,7 +1147,7 @@ const vue = new Vue({
|
||||
IsAnnualized: true,//是否年化
|
||||
HappenDate: null,//发生日期,
|
||||
Currency: 'CNY',//币种
|
||||
interest_rest_days: null,//重置频率
|
||||
interest_rest_days: 1,//重置频率
|
||||
interest_rule: null//利率准则
|
||||
}
|
||||
thisObj.getSwapList.push(getSwap);
|
||||
|
||||
Reference in New Issue
Block a user