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 6ad2a16d
authored
Sep 08, 2025
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 修复CreateOrder组件中onConfirm方法的商品筛选逻辑
添加flag参数以区分不同场景下的商品筛选,确保正确过滤出单件商品和组合商品
1 parent
7e99eaef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
pages/boutique/tool/components/CreateOrder.vue
pages/boutique/tool/components/CreateOrder.vue
View file @
6ad2a16
...
...
@@ -297,8 +297,8 @@ export default {
}
},
// 弹窗确认回调
onConfirm
(
val
)
{
console
.
log
(
val
,
'onConfirm'
)
onConfirm
(
val
,
flag
)
{
console
.
log
(
val
,
flag
,
'onConfirm'
)
this
.
externalData
=
[]
// const { chooseContent } = val
const
chooseContent
=
utils
.
deepClone
(
val
.
chooseContent
)
...
...
@@ -331,7 +331,9 @@ export default {
}
else
{
// 过滤出已选的goodFlag为2的对象
const
selectedGoods
=
this
.
orderObj
[
_typeValue
.
key
].
filter
(
item
=>
item
.
goodsFlag
===
2
)
const
singleGoods
=
chooseContent
.
filter
(
item
=>
item
.
goodsFlag
===
1
)
const
singleGoods
=
flag
?
this
.
orderObj
[
_typeValue
.
key
].
filter
(
item
=>
item
.
goodsFlag
===
1
)
:
chooseContent
.
filter
(
item
=>
item
.
goodsFlag
===
1
)
const
moreGoods
=
chooseContent
.
filter
(
item
=>
item
.
goodsFlag
===
2
)
.
filter
(
item
=>
{
...
...
@@ -358,6 +360,7 @@ export default {
console
.
log
(
e
,
val
)
this
.
orderObj
.
customer
[
val
.
value
]
=
this
.
orderObj
[
val
.
value
]
},
// 校验必填等规则
checkRequired
()
{
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
// 把formList中所有required为true的对象放到一个数组中
...
...
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