diff --git a/YLErpWeb/Views/SwapFloatRate/Detail.cshtml b/YLErpWeb/Views/SwapFloatRate/Detail.cshtml
index d2e1529a..298e39fc 100644
--- a/YLErpWeb/Views/SwapFloatRate/Detail.cshtml
+++ b/YLErpWeb/Views/SwapFloatRate/Detail.cshtml
@@ -47,6 +47,22 @@
+
-
-
-
+
@@ -363,6 +362,15 @@
|
+
+
+ |
+
+
+ |
|
diff --git a/YLErpWeb/Views/SwapTrade2/TradeView.cshtml b/YLErpWeb/Views/SwapTrade2/TradeView.cshtml
index 1e2b72df..037ecd37 100644
--- a/YLErpWeb/Views/SwapTrade2/TradeView.cshtml
+++ b/YLErpWeb/Views/SwapTrade2/TradeView.cshtml
@@ -289,11 +289,12 @@
利率 |
利率是否年化 |
计息方式 |
+ 重置频率(天) |
+ 利率准则 |
结算规则 |
@if (trade.swap_positions != null)
{
- decimal grossPrice = trade.swap_positions.Where(x => x.PosiDirection > 0 && x.IsInitial).FirstOrDefault()?.PosiGrossPrice ?? 0;
foreach (var item in trade.swap_positions.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode) && x.IsInitial))
{
decimal? interestPrice = null;
@@ -303,7 +304,7 @@
}
else if (item.InterestMode == (int)InterestModeEnum.标的期初全价)
{
- interestPrice = Convert.ToDecimal(trade.OriginalStockEqvNotional.Value) * grossPrice;
+ interestPrice = Convert.ToDecimal(trade.OriginalStockEqvNotional.Value);
}
else if (item.InterestMode == (int)InterestModeEnum.固定值)
{
@@ -332,6 +333,8 @@
@((InterestTypeEnum)item.InterestType)
|
+ @item.interest_rest_days |
+ @((item.interest_rule != null) ? (SwapInterestRule)item.interest_rule : "") |
|
@@ -480,10 +483,11 @@
利率 |
利率是否年化 |
计息方式 |
+ 重置频率(天) |
+ 利率准则 |
结算规则 |
@{
- decimal grossPrice2 = trade.swap_positions.Where(x => x.PosiDirection > 0 && !x.IsInitial).FirstOrDefault()?.PosiGrossPrice ?? 0;
foreach (var item in trade.swap_positions.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode) && !x.IsInitial))
{
decimal? interestPrice = null;
@@ -493,7 +497,7 @@
}
else if (item.InterestMode == (int)InterestModeEnum.标的期初全价)
{
- interestPrice = Convert.ToDecimal(trade.StockEqvNotional) * grossPrice2;
+ interestPrice = Convert.ToDecimal(trade.StockEqvNotional);
}
else if (item.InterestMode == (int)InterestModeEnum.固定值)
{
@@ -520,6 +524,8 @@
@(item.IsAnnualized ? "是" : "否") |
@(item.InterestType == 0 ? "单利" : "复利") |
+ @item.interest_rest_days |
+ @((item.interest_rule != null) ? (SwapInterestRule)item.interest_rule : "") |
|
}
diff --git a/YLErpWeb/wwwroot/Scripts/app/marginRate/marginRateSwapList.js b/YLErpWeb/wwwroot/Scripts/app/marginRate/marginRateSwapList.js
index ac7e2fc7..09ad9659 100644
--- a/YLErpWeb/wwwroot/Scripts/app/marginRate/marginRateSwapList.js
+++ b/YLErpWeb/wwwroot/Scripts/app/marginRate/marginRateSwapList.js
@@ -70,7 +70,7 @@ function uploadMarginRate() {
SearchClick()
} else {
main.alert("导入失败:" + data.msg);
-
+
}
}
main.confirm("确定导入?", UploadFile.bind(null, { inputId: 'openFile', url: '/MarginRateSwap/ImportMagrinRate', success: success }));
@@ -150,10 +150,17 @@ const jqgrid1Mgr = (new function () {
name: 'ClientName', label: '客户名称', index: 'ClientId'
}, {
name: 'ValueDate', label: '生效日期', index: 'ValueDate', formatter: 'date'
+ }, {
+ name: 'SwapEndDays', label: '互换默认期限', index: 'SwapEndDays', formatter: function (cellValue, options, rowObject) {
+ if (cellValue == null) {
+ return "";
+ }
+ return cellValue + "天";
+ }
}, {
name: 'InitMarginRate', label: '期初预付金', index: 'InitMarginRate', formatter: percentFormat
}, {
- name: 'InitMarginRebateRate', label: '期初预付金利率', index: 'InitMarginRebateRate', formatter: percentFormat,
+ name: 'InitMarginRebateRate', label: '期初预付金利率', index: 'InitMarginRebateRate', formatter: percentFormat,
}, {
name: 'AddToMarginRebateRate', label: '追加预付金利率', index: 'AddToMarginRebateRate', formatter: percentFormat,
}, {
diff --git a/YLErpWeb/wwwroot/Scripts/app/swapRate/swapFloatRateEdit.js b/YLErpWeb/wwwroot/Scripts/app/swapRate/swapFloatRateEdit.js
index 99b8a21f..7a8f88dc 100644
--- a/YLErpWeb/wwwroot/Scripts/app/swapRate/swapFloatRateEdit.js
+++ b/YLErpWeb/wwwroot/Scripts/app/swapRate/swapFloatRateEdit.js
@@ -1,5 +1,6 @@
//otcformat禁止千分位分组
window.otcformat.options.disableGrouping = true;
+const inputFormatInteger = Object.freeze({ precision: 0, append: '' });
const inputFormatRate = Object.freeze({ precision: otcformat.trading.premiumRateP.precision, negative: true, append: '%' });
const inputFormatSinglePrice = Object.freeze({ precision: otcformat.trading.umprice.precision, negative: true, append: '' });
//标的选择组件
@@ -67,7 +68,11 @@ var vue = new Vue({
EndDate: null,
BaseUnderlyingCode:"",
LongPricePoint: null,
- ShortPricePoint: null
+ ShortPricePoint: null,
+ is_annualized: null,
+ interest_type: null,
+ interest_rest_days: null,
+ interest_rule: null,
}
},
mounted: function () {
@@ -85,7 +90,7 @@ var vue = new Vue({
autoClient.setData(client);
}
this.rate.UnderlyingCode = this.rate.UnderlyingCode == null ? "--" : this.rate.UnderlyingCode;
- this.rate.BaseUnderlyingCode = this.rate.BaseUnderlyingCode == null ? "--": thisObj.rate.BaseUnderlyingCode;
+ this.rate.BaseUnderlyingCode = this.rate.BaseUnderlyingCode == null ? "--" : this.rate.BaseUnderlyingCode;
if (this.rate.StartDate!=null) {
this.rate.StartDate = moment(this.rate.StartDate).format('YYYY-MM-DD');
}
@@ -96,6 +101,8 @@ var vue = new Vue({
methods: {
save() {
var thisObj = this;
+ thisObj.rate.UnderlyingCode = thisObj.rate.UnderlyingCode == "--" ? null : thisObj.rate.UnderlyingCode;
+ thisObj.rate.BaseUnderlyingCode = thisObj.rate.BaseUnderlyingCode == "--" ? null : thisObj.rate.BaseUnderlyingCode;
if (thisObj.rate.RateMode==1) {
if (thisObj.rate.ClientId == null || thisObj.rate.ClientId.length == 0) {
return main.alert("请选择客户名称");
@@ -107,14 +114,19 @@ var vue = new Vue({
if (thisObj.rate.EndDate == null || thisObj.rate.EndDate.length == 0) {
return main.alert("请选择生效终止日");
}
+ if (thisObj.rate.interest_rest_days == null) {
+ return main.alert("请填写重置频率");
+ }
+ if (thisObj.rate.interest_rest_days < 1 && thisObj.rate.BaseUnderlyingCode != null) {
+ return main.alert("重置频率必须大于0");
+ }
if (thisObj.rate.EndDate < thisObj.rate.StartDate) {
return main.alert("生效终止日不能早于生效起始日");
}
if (thisObj.rate.LongPricePoint == null && thisObj.rate.ShortPricePoint == null) {
return main.alert("多头价格加点、空头价格减点必须填写一个");
}
- thisObj.rate.UnderlyingCode = thisObj.rate.UnderlyingCode == "--" ? null : thisObj.rate.UnderlyingCode;
- thisObj.rate.BaseUnderlyingCode = thisObj.rate.BaseUnderlyingCode == "--" ? null : thisObj.rate.BaseUnderlyingCode;
+
main.post("/SwapFloatRate/SaveSwapFloatRate", { req: thisObj.rate }).done(function (resp) {
if (resp.success) {
thisObj.close();
diff --git a/YLErpWeb/wwwroot/Scripts/app/swapRate/swapFloatRateList.js b/YLErpWeb/wwwroot/Scripts/app/swapRate/swapFloatRateList.js
index 06c5aa18..d6237eba 100644
--- a/YLErpWeb/wwwroot/Scripts/app/swapRate/swapFloatRateList.js
+++ b/YLErpWeb/wwwroot/Scripts/app/swapRate/swapFloatRateList.js
@@ -130,6 +130,37 @@ var getColModelGrid = function () {
return "--";
}
}
+ }, {
+ name: 'is_annualized',
+ label: '是否年化',
+ width: 80,
+ sortable: true,
+ align: 'center',
+ formatter: function (cellValue, options, rowObject) {
+ if (cellValue != null) {
+ return cellValue ? '是' : '否';
+ } else {
+ return "--";
+ }
+ }
+ }, {
+ name: 'interest_type_str',
+ label: '计息方式',
+ width: 80,
+ sortable: false,
+ align: 'center',
+ }, {
+ name: 'interest_rest_days',
+ label: '重置频率(天)',
+ width: 80,
+ sortable: false,
+ align: 'center',
+ }, {
+ name: 'interest_rule_str',
+ label: '利率准则',
+ width: 100,
+ sortable: false,
+ align: 'center',
}, {
name: 'LongPricePoint',
label: '利差(多头加点)',
@@ -205,12 +236,12 @@ function rowdblclick(rowid) {
function addNew() {
- main.open("新增浮动利率配置", "/SwapFloatRate/Edit?rateMode="+tabIndex, { area: ['500px', '500px'] });
+ main.open("新增浮动利率配置", "/SwapFloatRate/Edit?rateMode="+tabIndex, { area: ['500px', '600px'] });
}
function startView(id) {
var srcurl = "/SwapFloatRate/Detail/?enid=" + id;
- main.open("查看浮动利率配置", srcurl, { area: ['500px', '500px'] });
+ main.open("查看浮动利率配置", srcurl, { area: ['500px', '600px'] });
}
function reloadRate() {
@@ -240,7 +271,7 @@ function showToolName(cellValue, options, rowObject) {
return html;
}
function editRate(enid) {
- main.open("编辑浮动利率配置", "/SwapFloatRate/Edit?enid=" + enid, { area: ['500px', '500px'] });
+ main.open("编辑浮动利率配置", "/SwapFloatRate/Edit?enid=" + enid, { area: ['500px', '600px'] });
}
function deleteRate(enid) {
main.confirm("确定要删除吗?", function () {
diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js
index 8a707458..52ce5b18 100644
--- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js
+++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/swapTradeEdit.js
@@ -205,11 +205,11 @@ const vue = new Vue({
},
//变更数量
changeQuantity(item) {
- this.changeSpotPrice();
+ this.calcNotional();
},
//变更标的单价
changeSpotPrice(item) {
- this.changeSpotPrice();
+ this.calcNotional();
},
//变更标的合约乘数
changeContractSize(item) {
@@ -480,6 +480,11 @@ const vue = new Vue({
item.FloatRateUnderlyingCode = data.Code;
if (data.Code.length > 0 && data.Code != '--') {
item.IsAnnualized = true;
+ item.interest_rest_days = 1;
+ item.interest_rule = 0;
+ } else {
+ item.interest_rest_days = null;
+ item.interest_rule = null;
}
//this.getFloatRate(item);
},
@@ -515,9 +520,9 @@ const vue = new Vue({
},
//年化利率变更同步修改 同行观察日利率
blurSwapRate(item) {
- if (item.InterestRateDefault != 0) {
- item.IsAnnualized = true;
- }
+ //if (item.InterestRateDefault != 0) {
+ // item.IsAnnualized = true;
+ //}
if (item.SwapIntervalList.length > 0) {
var swapRate = item.InterestRateDefault;
var same = true;
@@ -1128,6 +1133,8 @@ const vue = new Vue({
IsAnnualized: true,//是否年化
HappenDate: null,//发生日期,
Currency: 'CNY',//币种
+ interest_rest_days: null,//重置频率
+ interest_rule: null//利率准则
}
thisObj.getSwapList.push(getSwap);
},
@@ -1164,6 +1171,8 @@ const vue = new Vue({
IsAnnualized: true,//是否年化,
HappenDate: thisObj.trade.TradeDate,//发生日期,
Currency: 'CNY',//币种
+ interest_rest_days: null,//重置频率
+ interest_rule: null//利率准则
}
thisObj.marginSwapList.push(getSwap);
},
@@ -1210,6 +1219,8 @@ const vue = new Vue({
IsAnnualized: false,//是否年化
HappenDate: null,//发生日期,
Currency: 'CNY',//币种
+ interest_rest_days: null,//重置频率
+ interest_rule: null//利率准则
}
thisObj.paySwapList.push(petSwap);
},