diff --git a/YLErpWeb/App_Data/Config/swappriceprecision.js b/YLErpWeb/App_Data/Config/swappriceprecision.js index 2cb43923..a0d631eb 100644 --- a/YLErpWeb/App_Data/Config/swappriceprecision.js +++ b/YLErpWeb/App_Data/Config/swappriceprecision.js @@ -2,52 +2,54 @@ window.main = window.main || {}; window.main.swapPricePrecision = { common: { - amount: { precision: 2 }, - quantity: { precision: 2 }, + amount: { precision: 2, grouping: true }, + quantity: { precision: 2, grouping: true }, rate: { precision: 4 } }, - Stock: { integerDigits: 7, precision: 2 }, - StockIndex: { integerDigits: 7, precision: 2 }, - StockIF: { integerDigits: 7, precision: 4 }, - CommodityFutures: { integerDigits: 7, precision: 4 }, - CommoditySpot: { integerDigits: 7, precision: 4 }, - NewOtcStock: { integerDigits: 7, precision: 4 }, - HKStock: { integerDigits: 7, precision: 4 }, - HKStockIndex: { integerDigits: 7, precision: 4 }, - Fund: { integerDigits: 7, precision: 4 }, + Stock: { integerDigits: 7, precision: 2, quantityPrecision: 2 }, + StockIndex: { integerDigits: 7, precision: 2, quantityPrecision: 2 }, + StockIF: { integerDigits: 7, precision: 4, quantityPrecision: 2 }, + CommodityFutures: { integerDigits: 7, precision: 4, quantityPrecision: 2 }, + CommoditySpot: { integerDigits: 7, precision: 4, quantityPrecision: 2 }, + NewOtcStock: { integerDigits: 7, precision: 4, quantityPrecision: 2 }, + HKStock: { integerDigits: 7, precision: 4, quantityPrecision: 2 }, + HKStockIndex: { integerDigits: 7, precision: 4, quantityPrecision: 2 }, + Fund: { integerDigits: 7, precision: 4, quantityPrecision: 4 }, Bond: { + quantityPrecision: 0, grossPrice: { integerDigits: 6, precision: 9 }, netPrice: { integerDigits: 6, precision: 9 }, yield: { integerDigits: 2, precision: 4 } }, TBonds: { + quantityPrecision: 0, grossPrice: { integerDigits: 6, precision: 9 }, netPrice: { integerDigits: 6, precision: 9 }, yield: { integerDigits: 2, precision: 4 } }, CreditBonds: { + quantityPrecision: 0, grossPrice: { integerDigits: 6, precision: 9 }, netPrice: { integerDigits: 6, precision: 9 }, yield: { integerDigits: 2, precision: 4 } }, OtherBonds: { + quantityPrecision: 0, grossPrice: { integerDigits: 6, precision: 9 }, netPrice: { integerDigits: 6, precision: 9 }, yield: { integerDigits: 2, precision: 4 } }, - TBFutures: { integerDigits: 8, precision: 4 }, - OtherFutures: { integerDigits: 8, precision: 4 }, - GoldSpot: { integerDigits: 8, precision: 4 }, - OtherSpot: { integerDigits: 8, precision: 4 }, - AbroadFutures: { integerDigits: 8, precision: 4 }, - AbroadSpot: { integerDigits: 8, precision: 4 }, - AbroadStock: { integerDigits: 8, precision: 2 }, - AbroadStockIndex: { integerDigits: 8, precision: 4 }, - ExRate: { integerDigits: 2, precision: 8 }, - Shibor: { integerDigits: 2, precision: 4 }, - FixingRepoRate: { integerDigits: 2, precision: 4 }, - RateYield: {integerDigits: 6, precision: 8}, - BondIndex: {integerDigits: 6, precision: 4}, - - // TODO: 利率收益率(6+8)、债券指数(6+4)、黄金期货(6+4)待对应的 UnderlyingInstrumentType 枚举确认后启用。 + TBFutures: { integerDigits: 8, precision: 4, quantityPrecision: 2 }, + OtherFutures: { integerDigits: 8, precision: 4, quantityPrecision: 2 }, + GoldSpot: { integerDigits: 8, precision: 4, quantityPrecision: 2 }, + OtherSpot: { integerDigits: 8, precision: 4, quantityPrecision: 2 }, + AbroadFutures: { integerDigits: 8, precision: 4, quantityPrecision: 2 }, + AbroadSpot: { integerDigits: 8, precision: 4, quantityPrecision: 2 }, + AbroadStock: { integerDigits: 8, precision: 2, quantityPrecision: 2 }, + AbroadStockIndex: { integerDigits: 8, precision: 4, quantityPrecision: 2 }, + ExRate: { integerDigits: 2, precision: 8, quantityPrecision: 8 }, + Shibor: { integerDigits: 2, precision: 4, quantityPrecision: 2 }, + FixingRepoRate: { integerDigits: 2, precision: 4, quantityPrecision: 2 }, + RateYield: {integerDigits: 6, precision: 8, quantityPrecision: 2}, + BondIndex: {integerDigits: 6, precision: 4, quantityPrecision: 2}, }; diff --git a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml index ea00430b..91d9d26f 100644 --- a/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml +++ b/YLErpWeb/Views/SwapTrade2/SwapIncome.cshtml @@ -42,15 +42,15 @@ 成交名义本金 - {{deal.NotionalValue}} + {{formatAmount(deal.NotionalValue)}} 持仓名义本金 - {{deal.PosiNotionalValue}} + {{formatAmount(deal.PosiNotionalValue)}} 成交数量 - {{deal.NotionalQty}} + {{formatQuantity(deal.NotionalQty)}} 持仓数量 - {{deal.PositionQty2}} + {{formatQuantity(deal.PositionQty2)}} 起始日期 @@ -66,7 +66,7 @@ 平仓总额 - {{deal.SwapCloseAmount}} + {{formatAmount(deal.SwapCloseAmount)}} @@ -98,7 +98,7 @@ - {{item.InterestClosePnL}} + {{formatAmount(item.InterestClosePnL)}} @@ -126,7 +126,7 @@ - {{item.InterestClosePnL}} + {{formatAmount(item.InterestClosePnL)}} @@ -177,13 +177,13 @@ - {{floatPosition.Quantity}} + {{formatQuantity(floatPosition.Quantity)}}
我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用
- {{floatPosition.FloatPnlSum}} + {{formatAmount(floatPosition.FloatPnlSum)}} diff --git a/YLErpWeb/Views/SwapTrade2/SwapLongShortSwap.cshtml b/YLErpWeb/Views/SwapTrade2/SwapLongShortSwap.cshtml index 1ef9f150..4df23cf7 100644 --- a/YLErpWeb/Views/SwapTrade2/SwapLongShortSwap.cshtml +++ b/YLErpWeb/Views/SwapTrade2/SwapLongShortSwap.cshtml @@ -28,11 +28,11 @@
- +
- +
@@ -48,7 +48,7 @@
- +
@@ -75,7 +75,7 @@ - {{item.InterestClosePnL}} + {{formatAmount(item.InterestClosePnL)}} @@ -103,7 +103,7 @@ - {{item.InterestClosePnL}} + {{formatAmount(item.InterestClosePnL)}} diff --git a/YLErpWeb/Views/SwapTrade2/SwapLongShortUnwind.cshtml b/YLErpWeb/Views/SwapTrade2/SwapLongShortUnwind.cshtml index c773ae03..bdbc1601 100644 --- a/YLErpWeb/Views/SwapTrade2/SwapLongShortUnwind.cshtml +++ b/YLErpWeb/Views/SwapTrade2/SwapLongShortUnwind.cshtml @@ -29,20 +29,20 @@
- +
- +
- +
- +
@@ -62,7 +62,7 @@
- +
@@ -91,7 +91,7 @@ - {{item.InterestClosePnL}} + {{formatAmount(item.InterestClosePnL)}} @@ -115,7 +115,7 @@ - {{item.InterestClosePnL}} + {{formatAmount(item.InterestClosePnL)}} diff --git a/YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml b/YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml index 7f9e2ea1..4d7c979a 100644 --- a/YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml +++ b/YLErpWeb/Views/SwapTrade2/SwapUnwind.cshtml @@ -33,20 +33,20 @@
- +
- +
- +
- +
@@ -64,7 +64,7 @@
- +
@@ -96,7 +96,7 @@
- +
@@ -125,7 +125,7 @@ - {{item.InterestClosePnL}} + {{formatAmount(item.InterestClosePnL)}} @@ -165,7 +165,7 @@ - {{item.InterestClosePnL}} + {{formatAmount(item.InterestClosePnL)}} @@ -214,7 +214,7 @@ - {{deal.CloseQty}} + {{formatQuantity(deal.CloseQty)}}
我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用
@@ -222,8 +222,8 @@ - {{floatPosition.DividendIn}} - {{floatPosition.FloatPnlSum}} + {{formatAmount(floatPosition.DividendIn)}} + {{formatAmount(floatPosition.FloatPnlSum)}} diff --git a/YLErpWeb/Views/SwapTrade2/SwapflowList.cshtml b/YLErpWeb/Views/SwapTrade2/SwapflowList.cshtml index 9ec357e9..863283eb 100644 --- a/YLErpWeb/Views/SwapTrade2/SwapflowList.cshtml +++ b/YLErpWeb/Views/SwapTrade2/SwapflowList.cshtml @@ -233,7 +233,7 @@
- +
diff --git a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml index eead5b88..6561cbfe 100644 --- a/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml +++ b/YLErpWeb/Views/SwapTrade2/TradeEdit.cshtml @@ -493,7 +493,7 @@ - {{item.underlying!=null?item.underlying.QuoteUnitString:''}} + {{item.underlying!=null?item.underlying.QuoteUnitString:''}}