Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit db9ce567
authored
Mar 11, 2026
by
cen
Committed by
chenwq1
Mar 18, 2026
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 商品单价处理
1 parent
b9ae7f90
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
pages/equity/tool/components/SkuGoods.vue
pages/equity/tool/components/SkuGoods.vue
View file @
db9ce56
...
@@ -164,7 +164,7 @@ export default {
...
@@ -164,7 +164,7 @@ export default {
const
filterData
=
positionTypeList
.
filter
(
v
=>
v
.
positionValue
==
item
)
const
filterData
=
positionTypeList
.
filter
(
v
=>
v
.
positionValue
==
item
)
return
(
filterData
.
length
&&
filterData
[
0
]
&&
filterData
[
0
].
positionName
)
||
''
return
(
filterData
.
length
&&
filterData
[
0
]
&&
filterData
[
0
].
positionName
)
||
''
},
},
// 验证价格输入
// 验证价格输入
(包含最低价校验 + 重置折扣/抵扣策略)
validatePrice
(
event
,
item
,
index
,
cindex
)
{
validatePrice
(
event
,
item
,
index
,
cindex
)
{
let
value
=
event
.
detail
.
value
let
value
=
event
.
detail
.
value
// 如果为空则设置为0
// 如果为空则设置为0
...
@@ -228,19 +228,24 @@ export default {
...
@@ -228,19 +228,24 @@ export default {
if
(
!
item
.
multipleSpecificationsGoods
)
{
if
(
!
item
.
multipleSpecificationsGoods
)
{
if
(
item
.
goodsFlag
==
1
)
{
if
(
item
.
goodsFlag
==
1
)
{
//如果没有多规格商品,更新普通商品的价格
//
如果没有多规格商品,更新普通商品的价格
this
.
$set
(
this
.
list
[
index
].
goods
,
'sellPrice'
,
value
)
this
.
$set
(
this
.
list
[
index
].
goods
,
'sellPrice'
,
value
)
}
else
{
}
else
{
// 套餐内商品
this
.
$set
(
this
.
list
[
index
].
packageGoods
.
goodsList
[
cindex
],
'sellPrice'
,
value
)
this
.
$set
(
this
.
list
[
index
].
packageGoods
.
goodsList
[
cindex
],
'sellPrice'
,
value
)
}
}
}
else
if
(
item
.
multipleSpecificationsGoods
&&
item
.
multipleSpecificationsGoods
.
goods
)
{
}
else
if
(
item
.
multipleSpecificationsGoods
&&
item
.
multipleSpecificationsGoods
.
goods
)
{
// 如果有多规格商品,更新多规格商品的价格
// 如果有多规格商品,更新多规格商品的价格
this
.
$set
(
this
.
list
[
index
].
multipleSpecificationsGoods
.
goods
,
'sellPrice'
,
value
)
this
.
$set
(
this
.
list
[
index
].
multipleSpecificationsGoods
.
goods
,
'sellPrice'
,
value
)
}
}
// 商品价格变动时,清空折扣 / 抵扣配置,并重算 finalPrice
this
.
resetStrategyWhenPriceChange
(
item
,
index
,
cindex
)
this
.
$emit
(
'changeTotalPrice'
)
this
.
$emit
(
'changeTotalPrice'
)
},
},
//
验证价格输入
//
原始价格校验逻辑(保留作备用,不再直接使用)
validatePrice
(
event
,
item
,
index
,
cindex
)
{
validatePrice
Raw
(
event
,
item
,
index
,
cindex
)
{
let
value
=
event
.
detail
.
value
let
value
=
event
.
detail
.
value
// 如果为空则设置为0
// 如果为空则设置为0
if
(
!
value
||
value
.
trim
()
===
''
)
{
if
(
!
value
||
value
.
trim
()
===
''
)
{
...
...
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