From 85a1eb776ca0fc640886070dce10a03ea7d045e9 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:47 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20=E9=99=90=E9=A2=9D=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E5=B0=8F=E6=95=B0=E7=82=B9=E7=B2=BE=E5=BA=A6=E8=B0=83?= =?UTF-8?q?=E6=95=B4"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9bff19803843837ab0e66a2e6631fc118b7f7484. --- .../wwwroot/Scripts/app/risk/quotaMonitor.js | 38 +++++-------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/YLErpWeb/wwwroot/Scripts/app/risk/quotaMonitor.js b/YLErpWeb/wwwroot/Scripts/app/risk/quotaMonitor.js index 4d6328a9..4c159554 100644 --- a/YLErpWeb/wwwroot/Scripts/app/risk/quotaMonitor.js +++ b/YLErpWeb/wwwroot/Scripts/app/risk/quotaMonitor.js @@ -361,16 +361,6 @@ function formatQuotaAbs(obj, fieldName) { return html; } -function formatFixedTwoDecimals(cellvalue) { - if (cellvalue === null || cellvalue === undefined || cellvalue === '' || cellvalue === 'NaN') { - return ''; - } - var numberValue = Number(cellvalue); - return isFinite(numberValue) - ? numberValue.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }) - : ''; -} - function formatQuotaRef(obj, fieldName) { var html = ""; var upperValue = obj["Quota_" + fieldName + "_Upper"]; @@ -554,21 +544,8 @@ function quotaMonitorUploadForm(url) { } function Output() { - var summaryType = $('#myTab .active a').text(); - var fileName = new moment().format("YYYYMMDD") + summaryType; - var formatters = null; - if (summaryType === '整体业务汇总' || summaryType === '标的汇总' || summaryType === '客户汇总') { - formatters = [{ - colName: '名义本金', - formatter: function (cellvalue, options, rowObject) { - if (summaryType === '整体业务汇总' && rowObject.BusinessType === '场内业务') { - return ''; - } - return formatFixedTwoDecimals(cellvalue); - } - }]; - } - main.toExcel("listGrid", fileName, "xls", null, [" ", "操作"], formatters); + var fileName = new moment().format("YYYYMMDD") + $('#myTab .active a').text(); + main.toExcel("listGrid", fileName, "xls", null, [" ", "操作"]); } function confirmAllSelect() { @@ -1113,7 +1090,7 @@ var colModel_undelrying = [ align: 'right', sortable: false, formatter: function (cellvalue, options, rowObject) { - return formatFixedTwoDecimals(cellvalue); + return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString(); }, cellattr: function (cellvalue, options, rowObject) { var style = checkQuota(rowObject, 'StockEqvNotional'); @@ -1530,7 +1507,7 @@ var colModel_client = [ align: 'right', sortable: false, formatter: function (cellvalue, options, rowObject) { - return formatFixedTwoDecimals(cellvalue); + return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString(); }, cellattr: function (cellvalue, options, rowObject) { var style = "style='" + checkQuota(rowObject, 'StockEqvNotional') + "'"; @@ -1681,7 +1658,10 @@ var colModel_global = [ if (rowObject.BusinessType == "场内业务") { return '
'; } - return formatFixedTwoDecimals(cellvalue); + if (page.IsGuoXin && cellvalue != null) { + return cellvalue == "NaN" ? "" : cellvalue.toLocaleString(); + } + return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString(); }, cellattr: function (cellvalue, options, rowObject) { var style = checkQuota(rowObject, 'StockEqvNotional'); @@ -2152,4 +2132,4 @@ var colModel_Log = [ align: 'center', sortable: false } -]; +]; \ No newline at end of file