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 74fa3923
authored
Dec 12, 2024
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
非空判断报错bug修复
1 parent
c22f5fa6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
src/util/gradeData.js
src/views/serviceConfig/components/ServicesTable/index.vue
src/util/gradeData.js
View file @
74fa392
...
...
@@ -110,7 +110,7 @@ export const handleGradeData = (dataFromApi, salePeriodList = []) => {
_gradeObj
.
gradeConfigList
.
push
({
maxPrice
:
NP
.
divide
(
maxPrice
||
0
,
1000000
),
minPrice
:
NP
.
divide
(
minPrice
||
0
,
1000000
),
priceCoefficient
:
priceCoefficient
.
toFixed
(
16
).
replace
(
/
\.?
0+$/
,
''
),
priceCoefficient
:
priceCoefficient
?
.
toFixed
(
16
).
replace
(
/
\.?
0+$/
,
''
),
computeFlag
,
id
})
...
...
@@ -126,7 +126,7 @@ export const handleGradeData = (dataFromApi, salePeriodList = []) => {
let
arr
=
[]
salePeriodList
?.
forEach
(
it
=>
{
let
_obj
=
gradeConfigList
.
find
(
o
=>
o
.
servicePeriod
==
it
&&
NP
.
divide
(
o
.
minPrice
||
0
,
1000000
)
==
item
.
minPrice
&&
NP
.
divide
(
o
.
maxPrice
||
0
,
1000000
)
==
item
.
maxPrice
)
arr
.
push
({
id
:
_obj
?.
id
,
servicePeriod
:
it
,
shelfCost
:
_obj
?.
shelfCost
.
toFixed
(
16
).
replace
(
/
\.?
0+$/
,
''
),
salesCost
:
_obj
?.
salesCost
.
toFixed
(
16
).
replace
(
/
\.?
0+$/
,
''
)
})
arr
.
push
({
id
:
_obj
?.
id
,
servicePeriod
:
it
,
shelfCost
:
_obj
?.
shelfCost
?.
toFixed
(
16
).
replace
(
/
\.?
0+$/
,
''
),
salesCost
:
_obj
?.
salesCost
?
.
toFixed
(
16
).
replace
(
/
\.?
0+$/
,
''
)
})
})
item
.
childSalePeriodData
=
arr
})
...
...
src/views/serviceConfig/components/ServicesTable/index.vue
View file @
74fa392
...
...
@@ -171,7 +171,7 @@ export default {
calcPrice
(
price1
,
price2
)
{
price1
=
price1
||
0
price2
=
price2
||
0
return
Number
((
price1
*
price2
).
toFixed
(
2
))
return
Number
((
price1
*
price2
)
?
.
toFixed
(
2
))
},
HandleCustomMatcher
(
node
,
Delta
)
{
// 文字、图片等,从别处复制而来,清除自带样式,转为纯文本
...
...
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