fix(swaptrade): 前端 净价/全价精度控制分开处理
- 添加净价全价配置独立维护逻辑 - 根据列名判断使用netPrice或grossPrice字段 - 期初净价列使用netPrice字段格式化 - 其余价格列保持使用grossPrice字段
This commit is contained in:
@@ -800,10 +800,13 @@ function exportEodSwapRows(jgrid, fileName, groupConfig, exportColumnNames) {
|
||||
}
|
||||
//---------------------------Formatter---------------------------------
|
||||
function PriceFormat(cellValue, options, rowObject) {
|
||||
// 净价、全价可在配置中独立维护;只有期初净价读取 netPrice,其余价格列保持全价口径。
|
||||
var columnName = options && options.colModel && (options.colModel.name || options.colModel.index);
|
||||
var precisionField = columnName === 'eodPosition.PosiNetPrice' ? 'netPrice' : 'grossPrice';
|
||||
return swapPricePrecision.format(
|
||||
cellValue,
|
||||
rowObject && rowObject.eodPosition && rowObject.eodPosition.UnderlyingInstrumentType,
|
||||
'grossPrice');
|
||||
precisionField);
|
||||
}
|
||||
|
||||
function RealizedPnlFormat(cellValue, options, rowObject) {
|
||||
|
||||
Reference in New Issue
Block a user