系数字段修改
This commit is contained in:
1 parent
21d3f0379c
commit
fc26a87bee
12 files changed
+782
-105
No files matched your search
@@ -6,7 +6,7 @@ import { AG_GRID_LOCALE_CN } from '@ag-grid-community/locale'
|
||||
import { myTheme, gridOptions } from '@/lib/diyAgGridOptions'
|
||||
import localforage from 'localforage'
|
||||
import { decimalAggSum, roundTo, sumByNumber } from '@/lib/decimal'
|
||||
import { formatThousands } from '@/lib/numberFormat'
|
||||
import { formatThousandsFlexible } from '@/lib/numberFormat'
|
||||
import { industryTypeList, getMajorDictEntries, isMajorIdInIndustryScope } from '@/sql'
|
||||
import { SwitchRoot, SwitchThumb } from 'reka-ui'
|
||||
|
||||
@@ -295,13 +295,13 @@ const columnDefs: ColDef<DetailRow>[] = [
|
||||
valueParser: params => {
|
||||
if (params.newValue === '' || params.newValue == null) return null
|
||||
const v = Number(params.newValue)
|
||||
return Number.isFinite(v) ? roundTo(v, 2) : null
|
||||
return Number.isFinite(v) ? roundTo(v, 3) : null
|
||||
},
|
||||
valueFormatter: params => {
|
||||
if (roughCalcEnabled.value) {
|
||||
if (!params.node?.rowPinned) return ''
|
||||
if (params.value == null || params.value === '') return '点击输入'
|
||||
return formatThousands(params.value)
|
||||
return formatThousandsFlexible(params.value, 3)
|
||||
}
|
||||
if (!params.node?.group && !params.node?.rowPinned && !params.data?.hasCost) {
|
||||
return ''
|
||||
@@ -310,7 +310,7 @@ const columnDefs: ColDef<DetailRow>[] = [
|
||||
return '点击输入'
|
||||
}
|
||||
if (params.value == null) return ''
|
||||
return formatThousands(params.value)
|
||||
return formatThousandsFlexible(params.value, 3)
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -344,7 +344,7 @@ const columnDefs: ColDef<DetailRow>[] = [
|
||||
return '点击输入'
|
||||
}
|
||||
if (params.value == null) return ''
|
||||
return formatThousands(params.value, 3)
|
||||
return formatThousandsFlexible(params.value, 3)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user