Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
sales-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5f0a37bd
authored
Nov 07, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
2752ba9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
pages/components/directorLeaders/directorLeaders.js
pages/components/tableScrollX/table.js
pages/components/directorLeaders/directorLeaders.js
View file @
5f0a37b
...
...
@@ -85,18 +85,16 @@ Component({
{
name
:
'已完成'
,
key
:
'completed'
,
width
:
'var(--fontSize150)'
,
beforeUnit
:
'¥'
width
:
'var(--fontSize150)'
},
{
name
:
'当月目标'
,
key
:
'target'
,
width
:
'var(--fontSize150)'
,
beforeUnit
:
'¥'
width
:
'var(--fontSize150)'
},
{
name
:
'完成率'
,
key
:
'
Customer
Rate'
,
key
:
'
completion
Rate'
,
width
:
'var(--fontSize150)'
,
unit
:
'%'
}
...
...
pages/components/tableScrollX/table.js
View file @
5f0a37b
...
...
@@ -77,14 +77,14 @@ Component({
formatTable
(
table
,
tableObj
)
{
// 通用格式化:为空返回"0.00",数值保留两位小数,并加千分位逗号
// 特例:当 headerConfig.key 为 'staffName' 时不处理数值格式化
if
(
this
.
data
.
headerConfig
&&
(
this
.
data
.
headerConfig
.
key
===
'staffName'
||
this
.
data
.
headerConfig
.
key
===
'personnelName'
)
)
{
this
.
setData
({
formattedTable
:
table
})
return
}
//
if (
//
this.data.headerConfig &&
//
(this.data.headerConfig.key === 'staffName' ||
//
this.data.headerConfig.key === 'personnelName')
//
) {
//
this.setData({ formattedTable: table })
//
return
//
}
const
formatNumber
=
val
=>
{
if
(
val
===
null
||
val
===
undefined
||
val
===
''
)
return
'0.00'
...
...
@@ -97,7 +97,10 @@ Component({
return
parts
.
join
(
'.'
)
}
const
keys
=
(
tableObj
||
[]).
map
(
i
=>
i
&&
i
.
key
).
filter
(
Boolean
)
const
keys
=
(
tableObj
||
[])
.
filter
(
i
=>
i
&&
(
i
.
unit
||
i
.
beforeUnit
))
.
map
(
i
=>
i
.
key
)
.
filter
(
Boolean
)
const
src
=
Array
.
isArray
(
table
)
?
table
:
[]
const
formatted
=
src
.
map
(
row
=>
{
const
copy
=
{
...
row
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment