feat(swaptrade): 新增名义本金数值的四舍五入格式化处理
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
@using YLErp.Web.Models.JsModels;
|
||||
@using YLErp.Commons;
|
||||
@model trade
|
||||
@{
|
||||
ViewBag.Title = "交易信息 | 编辑";
|
||||
@@ -30,6 +31,24 @@
|
||||
{
|
||||
agencys.Add(item.Key);
|
||||
}
|
||||
var otcFormatConfig = new
|
||||
{
|
||||
StockEqvNotional = new
|
||||
{
|
||||
precision = OtcFormatHelper.FormatModel.trading.StockEqvNotional.precision,
|
||||
minDecimals = OtcFormatHelper.FormatModel.trading.StockEqvNotional.minDecimals,
|
||||
maxDecimals = OtcFormatHelper.FormatModel.trading.StockEqvNotional.maxDecimals
|
||||
},
|
||||
// 如果需要其他格式,可以继续添加
|
||||
notional = new
|
||||
{
|
||||
precision = OtcFormatHelper.FormatModel.trading.notional.precision
|
||||
},
|
||||
tradePrice = new
|
||||
{
|
||||
precision = OtcFormatHelper.FormatModel.trading.tradePrice.precision
|
||||
}
|
||||
};
|
||||
var pageObj = new
|
||||
{
|
||||
isAdd,
|
||||
@@ -56,7 +75,8 @@
|
||||
securitiesEnvironment = PS.Config.ErpElement.SecuritiesEnvironment,
|
||||
tradingPlaceMap = places,
|
||||
clearingAgencyMap = agencys,
|
||||
timeUnits = GlobalData.AllTimeUnits()
|
||||
timeUnits = GlobalData.AllTimeUnits(),
|
||||
otcFormatConfig = otcFormatConfig
|
||||
};
|
||||
//pageObj.clearingAgencyMap.Remove("甲方");
|
||||
//pageObj.clearingAgencyMap.Remove("已方");
|
||||
|
||||
@@ -234,7 +234,7 @@ const vue = new Vue({
|
||||
if (this.paySwapList.length > 0) {
|
||||
var item = this.paySwapList[0];
|
||||
var notional = item.PosiGrossPrice * item.ContractSize;
|
||||
item.PosiQuantity = notional == 0 ? 0 : this.trade.StockEqvNotional / notional;
|
||||
item.PosiQuantity = notional == 0 ? 0 : _.round(this.trade.StockEqvNotional / notional, page.otcFormatConfig.StockEqvNotional.precision);
|
||||
this.calcNotional();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user