Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linweijiong
jinfa-platform
Commits
12ee430b
Commit
12ee430b
authored
Apr 02, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理单条属性组合情况下修改商品直接点击价格设置出错
parent
ee212034
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+8
-6
No files found.
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
12ee430b
...
...
@@ -416,15 +416,17 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
id
:
attributeObjArr
[
_index
].
customerAttributeId
,
name
:
attributeObjArr
[
_index
].
attributeName
}
// console.log(attributeValObjArr, item, index, _item, _index, _tableDataSource, '调试属性')
// console.log(attributeObjArr, attributeValObjArr, item, index, _item, _index, _tableDataSource, '调试属性')
// @fixed bug: 属性名称相同的情况下 只找第一个元素 会出现id异常
let
filterData
=
attributeValObjArr
.
map
((
__item
,
__index
)
=>
{
if
(
_index
===
__index
)
{
return
__item
.
find
(
_
=>
_
.
value
===
_item
)
}
}).
filter
(
__
=>
__
)[
0
]
_tempObject
.
customerAttributeValue
=
{
// @fixed bug: 属性名称相同的情况下 只找第一个元素 会出现id异常
// id: attributeValObjArr.map(__item => __item.find(_ => _.value===_item)).filter(__ => __)[0].id,
id
:
attributeValObjArr
.
map
((
__item
,
__index
)
=>
{
if
(
_index
===
__index
)
{
return
__item
.
find
(
_
=>
_
.
value
===
_item
)
}
}).
filter
(
__
=>
__
)[
0
].
id
,
id
:
filterData
?.
id
?
filterData
.
id
:
null
,
value
:
item
[
_index
]
}
_tempArr
.
push
(
_tempObject
)
...
...
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