Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
078407fa
authored
Nov 05, 2024
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能优化】商城: 修复活动选择商品时 sku 价格显示不正确的问题
parent
70abc5fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
src/views/mall/promotion/components/SpuSelect.vue
+8
-1
No files found.
src/views/mall/promotion/components/SpuSelect.vue
View file @
078407fa
...
@@ -115,7 +115,7 @@ import { getPropertyList, PropertyAndValues, SkuList } from '@/views/mall/produc
...
@@ -115,7 +115,7 @@ import { getPropertyList, PropertyAndValues, SkuList } from '@/views/mall/produc
import
{
ElTable
}
from
'element-plus'
import
{
ElTable
}
from
'element-plus'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
dateFormatter
}
from
'@/utils/formatTime'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
createImageViewer
}
from
'@/components/ImageViewer'
import
{
formatToFraction
}
from
'@/utils'
import
{
f
loatToFixed2
,
f
ormatToFraction
}
from
'@/utils'
import
{
defaultProps
,
handleTree
}
from
'@/utils/tree'
import
{
defaultProps
,
handleTree
}
from
'@/utils/tree'
import
*
as
ProductCategoryApi
from
'@/api/mall/product/category'
import
*
as
ProductCategoryApi
from
'@/api/mall/product/category'
...
@@ -228,6 +228,13 @@ const expandChange = async (row: ProductSpuApi.Spu, expandedRows?: ProductSpuApi
...
@@ -228,6 +228,13 @@ const expandChange = async (row: ProductSpuApi.Spu, expandedRows?: ProductSpuApi
}
}
// 获取 SPU 详情
// 获取 SPU 详情
const
res
=
(
await
ProductSpuApi
.
getSpu
(
row
.
id
as
number
))
as
ProductSpuApi
.
Spu
const
res
=
(
await
ProductSpuApi
.
getSpu
(
row
.
id
as
number
))
as
ProductSpuApi
.
Spu
res
.
skus
?.
forEach
((
item
)
=>
{
item
.
price
=
floatToFixed2
(
item
.
price
)
item
.
marketPrice
=
floatToFixed2
(
item
.
marketPrice
)
item
.
costPrice
=
floatToFixed2
(
item
.
costPrice
)
item
.
firstBrokeragePrice
=
floatToFixed2
(
item
.
firstBrokeragePrice
)
item
.
secondBrokeragePrice
=
floatToFixed2
(
item
.
secondBrokeragePrice
)
})
propertyList
.
value
=
getPropertyList
(
res
)
propertyList
.
value
=
getPropertyList
(
res
)
spuData
.
value
=
res
spuData
.
value
=
res
isExpand
.
value
=
true
isExpand
.
value
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment