diff --git a/YLErpWeb/wwwroot/Scripts/app/scenario/tradeScenario.js b/YLErpWeb/wwwroot/Scripts/app/scenario/tradeScenario.js index c30a7782..ccdd4c86 100644 --- a/YLErpWeb/wwwroot/Scripts/app/scenario/tradeScenario.js +++ b/YLErpWeb/wwwroot/Scripts/app/scenario/tradeScenario.js @@ -13,12 +13,20 @@ const colModelGrid = (function () { } function StrikeFormatter(cellValue, options, rowObject) { - if (cellValue === null || cellValue === undefined || cellValue === '' || cellValue === 'NaN') return ''; - var strike = Number(cellValue); - if (!isFinite(strike)) return ''; - return rowObject.IsMoneynessOption === "是" - ? (strike * 100).toFixed(2) + '%' - : strike.toFixed(2); + if (rowObject.Strike) { + if (rowObject.IsMoneynessOption === "是") { + return otcformat.trading.premiumRateP(rowObject.Strike); + } else { + return otcformat.trading.umprice(rowObject.Strike); + } + } else { + if (rowObject.Strike === 0) { + return 0; + } + else { + return ""; + } + } } var col = [ @@ -265,4 +273,4 @@ function setTestValue(list) { testStstus = false; main.alert("计算完成"); } -} +} \ No newline at end of file