Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-purchase
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a96f3fdf
authored
Jul 22, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 采购商城规格默认选中问题修复
1 parent
bce1ea18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
27 deletions
src/views/purchaseOrder/components/goodsDetailCom.vue
src/views/purchaseOrder/components/goodsDetailCom.vue
View file @
a96f3fd
...
@@ -785,31 +785,6 @@ export default {
...
@@ -785,31 +785,6 @@ export default {
item
.
skuId
=
''
item
.
skuId
=
''
item
.
skusTypes
=
item
.
specificationValues
.
map
((
el
,
elIndex
)
=>
{
item
.
skusTypes
=
item
.
specificationValues
.
map
((
el
,
elIndex
)
=>
{
let
skuItem
=
goodType
[
elIndex
].
propertyList
.
find
((
skuItem
,
skuItemIndex
)
=>
{
let
skuItem
=
goodType
[
elIndex
].
propertyList
.
find
((
skuItem
,
skuItemIndex
)
=>
{
// console.log(skuItem.name == el, skuItem.name, el)
// 取第一个默认选中
if
(
skuItem
.
name
==
el
&&
index
==
0
)
{
// if (skuItem.name == el && index == res.upgradeGoodsSpecificationValueDTOS.length - 1)
{
// goodType[elIndex].propertyList[skuItemIndex].selected = true
// // // 记录选中的值
// this.selectItemList.push(
{
// grounpId: goodType[elIndex].id,
// id: skuItem.id,
// index: elIndex,
// i: skuItemIndex
//
}
)
// setTimeout(() =>
{
// console.log(item.id, item)
// // this.handleClickSpecs1(el, skuItem.id, skuItem, index, skuItemIndex)
// // goodType[elIndex].propertyList[skuItemIndex].selected = true
// // // 记录选中的值
// // this.selectItemList.push(
{
// // grounpId: goodType[elIndex].id,
// // id: skuItem.id,
// // index: elIndex,
// // i: skuItemIndex
// //
}
)
//
}
,
0
)
}
return
skuItem
.
name
==
el
return
skuItem
.
name
==
el
}
)
}
)
...
@@ -842,13 +817,14 @@ export default {
...
@@ -842,13 +817,14 @@ export default {
let
sku
=
norSelectSkus
.
skusTypes
[
index
]
let
sku
=
norSelectSkus
.
skusTypes
[
index
]
this
.
handleClickSpecs1
(
item
.
id
,
sku
.
propertyId
,
sku
,
index
,
sku
.
index
)
this
.
handleClickSpecs1
(
item
.
id
,
sku
.
propertyId
,
sku
,
index
,
sku
.
index
)
}
)
}
)
this
.
goodsInfo
=
res
}
else
{
}
else
{
this
.
goodsInfo
=
res
// 默认选中第一个
// 默认选中第一个
let
item
=
this
.
goodsInfo
.
upgradeGoodsList
[
0
]
let
item
=
this
.
goodsInfo
.
upgradeGoodsList
[
0
]
this
.
setHandleItemInfo
(
item
)
this
.
setHandleItemInfo
(
item
)
}
}
this
.
goodsInfo
=
res
this
.
tableInfo
=
res
?.
upgradeGoodsList
?.
merchantGoodsInfoList
this
.
tableInfo
=
res
?.
upgradeGoodsList
?.
merchantGoodsInfoList
}
)
}
)
}
,
}
,
...
@@ -882,7 +858,6 @@ export default {
...
@@ -882,7 +858,6 @@ export default {
if
(
flag
)
{
if
(
flag
)
{
return
this
.
$message
.
error
(
'请选择规格'
)
return
this
.
$message
.
error
(
'请选择规格'
)
}
}
// this.goodsInfo
orgdata
.
skus
.
find
(
item
=>
{
orgdata
.
skus
.
find
(
item
=>
{
console
.
log
(
item
,
item
.
skuId
,
selectId
)
console
.
log
(
item
,
item
.
skuId
,
selectId
)
if
(
item
.
skuId
==
selectId
)
{
if
(
item
.
skuId
==
selectId
)
{
...
...
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