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 9fdcc826
authored
Jul 15, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug修复
1 parent
c8f1df5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
37 deletions
src/views/purchaseOrder/components/goodsDetailCom.vue
src/views/purchaseOrder/components/goodsDetailCom.vue
View file @
9fdcc82
...
...
@@ -758,47 +758,50 @@ export default {
// goodsSpecificationNameList 商品
res
=
res
.
data
console
.
log
(
res
,
'res'
)
goodType
=
res
.
goodsSpecificationNameList
.
map
((
item
,
index
)
=>
{
item
.
name
=
item
.
specificationName
item
.
propertyList
=
item
.
goodsSpecificationValueList
.
map
((
el
,
elIndex
)
=>
{
el
.
name
=
el
.
specificationValue
// el.id = el.specificationValue
el
.
id
=
index
.
toString
()
+
elIndex
.
toString
()
return
el
if
(
res
.
specificationType
==
2
)
{
console
.
log
(
res
,
'res'
)
goodType
=
res
.
goodsSpecificationNameList
.
map
((
item
,
index
)
=>
{
item
.
name
=
item
.
specificationName
item
.
propertyList
=
item
.
goodsSpecificationValueList
.
map
((
el
,
elIndex
)
=>
{
el
.
name
=
el
.
specificationValue
// el.id = el.specificationValue
el
.
id
=
index
.
toString
()
+
elIndex
.
toString
()
return
el
}
)
return
item
}
)
return
item
}
)
console
.
log
(
goodType
,
'goodType'
)
orgdata
.
skus
=
res
.
upgradeGoodsSpecificationValueDTOS
.
map
((
item
,
index
)
=>
{
item
.
skuId
=
''
item
.
skusTypes
=
item
.
specificationValues
.
map
((
el
,
elIndex
)
=>
{
let
skuItem
=
goodType
[
elIndex
].
propertyList
.
find
((
skuItem
,
skuItemIndex
)
=>
{
console
.
log
(
skuItem
.
name
==
el
,
skuItem
.
name
,
el
)
// 取第一个默认选中
if
(
skuItem
.
name
==
el
&&
index
==
res
.
upgradeGoodsSpecificationValueDTOS
.
length
-
1
)
{
goodType
[
elIndex
].
propertyList
[
skuItemIndex
].
selected
=
true
console
.
log
(
goodType
,
'goodType'
)
console
.
log
(
goodType
,
'goodType'
)
orgdata
.
skus
=
res
.
upgradeGoodsSpecificationValueDTOS
.
map
((
item
,
index
)
=>
{
item
.
skuId
=
''
item
.
skusTypes
=
item
.
specificationValues
.
map
((
el
,
elIndex
)
=>
{
let
skuItem
=
goodType
[
elIndex
].
propertyList
.
find
((
skuItem
,
skuItemIndex
)
=>
{
console
.
log
(
skuItem
.
name
==
el
,
skuItem
.
name
,
el
)
// 取第一个默认选中
if
(
skuItem
.
name
==
el
&&
index
==
res
.
upgradeGoodsSpecificationValueDTOS
.
length
-
1
)
{
goodType
[
elIndex
].
propertyList
[
skuItemIndex
].
selected
=
true
console
.
log
(
goodType
,
'goodType'
)
}
return
skuItem
.
name
==
el
}
)
let
obj
=
{
propertyId
:
skuItem
.
id
,
propertyName
:
el
}
return
skuItem
.
name
==
el
item
.
skuId
+=
skuItem
.
id
return
obj
}
)
let
obj
=
{
propertyId
:
skuItem
.
id
,
propertyName
:
el
}
item
.
skuId
+=
skuItem
.
id
return
obj
}
)
return
item
}
)
console
.
log
(
goodType
,
'goodType'
)
console
.
log
(
orgdata
,
'orgdata'
)
// return
// 初始化
this
.
init
()
// 获取所有的规格
this
.
getShopGoodsType
()
this
.
initGoodType
()
return
item
}
)
console
.
log
(
goodType
,
'goodType'
)
console
.
log
(
orgdata
,
'orgdata'
)
// return
// 初始化
this
.
init
()
// 获取所有的规格
this
.
getShopGoodsType
()
this
.
initGoodType
()
}
this
.
goodsInfo
=
res
this
.
tableInfo
=
res
?.
upgradeGoodsList
?.
merchantGoodsInfoList
...
...
@@ -867,6 +870,7 @@ export default {
// 判断是否有值
params
.
upgradeGoodsId
&&
this
.
$apis
.
purchaseShopping
.
shoppingCarAdd
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'res'
)
this
.
$message
.
success
(
'加入购物车成功'
)
this
.
$EventBus
.
$emit
(
'updateCarShopping'
)
this
.
dialogShow
=
false
...
...
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