#EQD-5914 国联民生-债券ETF为标的的TRS业务支持
This commit is contained in:
@@ -771,10 +771,6 @@ namespace YLErp.Modules.SwapModule
|
||||
{
|
||||
var client = PrepareBaseTradeClient(req);
|
||||
|
||||
if (req.StructureType != ClientMarginTypeEnum.多空组合.ToString() && _underlying.CalcTypeIsStock() && ((client.TradingInstType & TradingInstTypeEnum.Equity) != TradingInstTypeEnum.Equity))
|
||||
{
|
||||
throw new ServiceException($"客户'{client.Name}'的'交易资产'属性不包括'权益',不能进行收益互换交易");
|
||||
}
|
||||
if (client.EvaluateExpireDate < req.TradeDate)
|
||||
{
|
||||
throw new ServiceException("适当性评估已经过期,只有在适当性有效期内才可以新开仓");
|
||||
|
||||
@@ -435,7 +435,7 @@ namespace YLErp.Modules.UnderlyingModule
|
||||
dbModel.MarketCode = string.IsNullOrWhiteSpace(dbModel.MarketName) ? "" :
|
||||
DataCacheProvider.GetMarketDataSource().AsQueryable().FirstOrDefault(n => n.MarketName == dbModel.MarketName)?.ExchangeNo;
|
||||
}
|
||||
if (dbModel.ContractSize <= 1)
|
||||
if (dbModel.ContractSize < 1)
|
||||
{
|
||||
dbModel.ContractSize = variety.TradeUnitValue > 0 ? variety.TradeUnitValue.Value : 1;
|
||||
}
|
||||
|
||||
@@ -420,13 +420,13 @@
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<vue-number-input v-model="item.PosiGrossPrice" v-bind:format="tradeHelper.IsBond(item.UnderlyingInstrumentType)?inputFormatMarginRateNoPercent:inputFormatTradeSinglePrice" v-on:input="changeSpotPrice(item)"></vue-number-input>
|
||||
<vue-number-input :key="getPosiPriceFormatKey(item,'PosiGrossPrice')" v-model="item.PosiGrossPrice" v-bind:format="getPosiPriceFormat(item)" v-on:input="changeSpotPrice(item)"></vue-number-input>
|
||||
</td>
|
||||
<td>
|
||||
<vue-number-input v-model="item.PosiNetNoFeePrice" v-bind:format="tradeHelper.IsBond(item.UnderlyingInstrumentType)?inputFormatMarginRateNoPercent:inputFormatTradeSinglePrice"></vue-number-input>
|
||||
<vue-number-input :key="getPosiPriceFormatKey(item,'PosiNetNoFeePrice')" v-model="item.PosiNetNoFeePrice" v-bind:format="getPosiPriceFormat(item)"></vue-number-input>
|
||||
</td>
|
||||
<td>
|
||||
<vue-number-input v-model="item.InitYtm" v-bind:format="tradeHelper.IsBond(item.UnderlyingInstrumentType)?inputFormatMarginRateNoPercent:inputFormatTradeSinglePrice"></vue-number-input>
|
||||
<vue-number-input :key="getPosiPriceFormatKey(item,'InitYtm')" v-model="item.InitYtm" v-bind:format="getPosiPriceFormat(item)"></vue-number-input>
|
||||
</td>
|
||||
<td>
|
||||
<vue-number-input v-model="item.PosiQuantity" v-on:input="changeQuantity(item)" v-bind:format="inputFormatTradeAmount"></vue-number-input>{{item.underlying!=null?item.underlying.QuoteUnitString:''}}
|
||||
@@ -601,4 +601,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -177,6 +177,16 @@ const vue = new Vue({
|
||||
this.initSwapRateList();
|
||||
},
|
||||
methods: {
|
||||
getPosiPriceFormat(item) {
|
||||
return tradeHelper.IsBond(item && item.UnderlyingInstrumentType)
|
||||
? inputFormatMarginRateNoPercent
|
||||
: inputFormatTradeSinglePrice;
|
||||
},
|
||||
getPosiPriceFormatKey(item, field) {
|
||||
const index = item && item.index != null ? item.index : '';
|
||||
const isBond = tradeHelper.IsBond(item && item.UnderlyingInstrumentType);
|
||||
return `${index}-${field}-${isBond ? 'bond' : 'other'}`;
|
||||
},
|
||||
changeStructureType() {
|
||||
this.trade.StockEqvNotional = 0;
|
||||
//this.trade.trade_extend.ExtendObj.FlowBookMode = 0;
|
||||
@@ -529,7 +539,7 @@ const vue = new Vue({
|
||||
.done(function (resp) {
|
||||
item.PosiNetNoFeePrice = otcformat.trading.umprice(resp.obj.netPrice);
|
||||
item.PosiGrossPrice = otcformat.trading.umprice(resp.obj.price);
|
||||
thisObj.changeStockEqvNotional();
|
||||
thisObj.calcNotional();
|
||||
});
|
||||
},
|
||||
//年化利率变更同步修改 同行观察日利率
|
||||
@@ -1544,4 +1554,4 @@ $(function () {
|
||||
|
||||
$(this).datepicker("setDate", dateVal);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user