From bdfec44c9f3a37dbbe05bf14a252ffec04132a86 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 21:24:28 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/subtabtable/index.jsx | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index ff72754..9b576d2 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -160,6 +160,15 @@ if (col.field) { _arrField.push(col.field) + if (col.type === 'number') { + col.decimal = col.decimal || 0 + col.round = Math.pow(10, col.decimal) + + if (col.format === 'percent') { + col.decimal = col.decimal > 2 ? col.decimal - 2 : 0 + } + } + col.nameField && _arrField.push(col.nameField) // 閾炬帴鍚嶅瓧娈� if (col.Hide !== 'true' && col.type === 'number' && col.sum === 'true') { statFields.push(col) @@ -782,13 +791,13 @@ /** * @description 瀵煎嚭Excel鏃讹紝鑾峰彇椤甸潰鎼滅储鎺掑簭绛夊弬鏁� */ - queryModuleParam = (menuId, btnId) => { + queryModuleParam = (menuId, callback) => { const { Tab, MenuID } = this.props const { arr_field, orderBy, search, setting} = this.state if (MenuID !== menuId) return - MKEmitter.emit('returnModuleParam', MenuID, btnId, { + callback({ arr_field: arr_field, orderBy: orderBy || setting.order, search: search, -- Gitblit v1.8.0