Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
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 b74c9667
authored
Apr 27, 2025
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
b7e05923
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
src/views/serviceConfig/components/ServicesTable/index.vue
src/views/serviceConfig/components/ServicesTable/index.vue
View file @
b74c966
...
...
@@ -147,6 +147,7 @@ export default {
methods
:
{
changePrice
(
value
,
item
,
key
)
{
const
decimal
=
[
'standardShelfCost'
,
'standardSalesCost'
,
'minPrice'
,
'maxPrice'
].
includes
(
key
)
?
2
:
16
const
maxNum
=
[
'minPrice'
,
'maxPrice'
].
includes
(
key
)
?
200
:
null
item
[
key
]
=
value
?
value
.
replace
(
/^0
\d
/g
,
'0'
)
...
...
@@ -158,6 +159,15 @@ export default {
.
replace
(
/
\.
/g
,
''
)
.
replace
(
'$#$'
,
'.'
)
.
replace
(
new
RegExp
(
`^(\\-)*(\\d+)\\.(\\d{
${
decimal
}
}).*`
,
'g'
),
'$1$2.$3'
)
.
replace
(
new
RegExp
(
`^(-?\\d+(?:\\.\\d{0,
${
decimal
}
})?).*`
),
(
match
)
=>
{
if
(
maxNum
!==
null
)
{
const
num
=
parseFloat
(
match
)
if
(
num
>
maxNum
)
{
return
maxNum
.
toString
()
}
}
return
match
})
:
''
},
changeComputeFlag
(
e
,
item
)
{
...
...
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