From 30495d1f5efbe088a09319574720f3e4a1a3de7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8D=E9=94=90?= <1565842059@qq.com> Date: Tue, 28 Jul 2026 14:29:43 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(grid):=20=E6=83=85=E6=99=AF?= =?UTF-8?q?=E5=88=86=E6=9E=90=20=E8=A1=8C=E6=9D=83=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E6=94=B9"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ba40ab27e8bd46247739499a6c57ee2a4adc036a. --- .../Scripts/app/scenario/tradeScenario.js | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) 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