Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
5dc17ec6
Commit
5dc17ec6
authored
Mar 25, 2022
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改回显问题
parent
894c5e96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
index.jsx
src/pages/GoodsManage/createModal/index.jsx
+11
-13
index.jsx
src/pages/GoodsManage/index.jsx
+7
-2
staticdata.js
src/pages/GoodsManage/staticdata.js
+1
-1
No files found.
src/pages/GoodsManage/createModal/index.jsx
View file @
5dc17ec6
...
@@ -338,7 +338,6 @@ class goodsManage extends Component {
...
@@ -338,7 +338,6 @@ class goodsManage extends Component {
const
{
editData
,
productType
}
=
this
.
state
;
const
{
editData
,
productType
}
=
this
.
state
;
validateFields
(
async
(
errors
,
values
)
=>
{
validateFields
(
async
(
errors
,
values
)
=>
{
console
.
log
(
values
);
let
imgErr
=
false
;
let
imgErr
=
false
;
if
(
!
errors
)
{
if
(
!
errors
)
{
if
(
validateSpuInfo
(
values
,
initData
,
editData
,
productType
))
return
;
if
(
validateSpuInfo
(
values
,
initData
,
editData
,
productType
))
return
;
...
@@ -462,10 +461,8 @@ class goodsManage extends Component {
...
@@ -462,10 +461,8 @@ class goodsManage extends Component {
render
()
{
render
()
{
const
{
visible
,
form
,
initData
=
{},
treeData
,
virtualTreeData
,
specListData
}
=
this
.
props
;
const
{
visible
,
form
,
initData
=
{},
treeData
,
virtualTreeData
,
specListData
}
=
this
.
props
;
const
isEdit
=
Object
.
keys
(
initData
).
length
!==
0
;
const
isEdit
=
Object
.
keys
(
initData
).
length
!==
0
;
// 是否仅编辑卖点和服务
// 是否仅编辑卖点和服务
const
isService
=
initData
.
state
&&
initData
.
state
!==
4
;
const
isService
=
initData
.
state
&&
initData
.
state
!==
4
;
console
.
log
(
isService
);
const
{
getFieldDecorator
,
getFieldsValue
}
=
form
;
const
{
getFieldDecorator
,
getFieldsValue
}
=
form
;
getFieldDecorator
(
'
firstKeys
'
,
{
initialValue
:
[]
});
getFieldDecorator
(
'
firstKeys
'
,
{
initialValue
:
[]
});
getFieldDecorator
(
'
secondKeys
'
,
{
initialValue
:
[]
});
getFieldDecorator
(
'
secondKeys
'
,
{
initialValue
:
[]
});
...
@@ -652,16 +649,17 @@ class goodsManage extends Component {
...
@@ -652,16 +649,17 @@ class goodsManage extends Component {
)
}
)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
{
specListData
.
length
&&
{
specListData
.
length
specListData
.
map
((
item
,
index
)
=>
(
?
specListData
.
map
((
item
,
index
)
=>
(
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
FormItem
label=
{
item
.
specName
}
labelCol=
{
{
span
:
2
}
}
>
<
FormItem
label=
{
item
.
specName
}
labelCol=
{
{
span
:
2
}
}
>
{
getFieldDecorator
(
`${item.specId}`
,
{
{
getFieldDecorator
(
`${item.specId}`
,
{
initialValue
:
`initData.${item.specId}`
,
initialValue
:
initData
[
item
.
specId
],
})(<
Checkbox
.
Group
options=
{
item
.
specValues
}
/>)
}
})(<
Checkbox
.
Group
options=
{
item
.
specValues
}
/>)
}
</
FormItem
>
</
FormItem
>
</
Col
>
</
Col
>
))
}
))
:
''
}
</
Row
>
</
Row
>
</
Card
>
</
Card
>
<
Card
className=
{
styles
.
card
}
bordered=
{
false
}
>
<
Card
className=
{
styles
.
card
}
bordered=
{
false
}
>
...
...
src/pages/GoodsManage/index.jsx
View file @
5dc17ec6
...
@@ -130,9 +130,14 @@ class goodsManage extends Component {
...
@@ -130,9 +130,14 @@ class goodsManage extends Component {
data
.
secondSpecList
.
push
(
i
.
secondSpecValue
);
data
.
secondSpecList
.
push
(
i
.
secondSpecValue
);
}
}
});
});
data
.
specs
.
forEach
(
item
=>
{
data
.
specs
.
forEach
(
item
=>
{
data
[
item
.
specId
]
=
item
.
specValues
;
const
arr
=
[];
if
(
item
.
specValues
.
length
)
{
item
.
specValues
.
forEach
(
childItem
=>
{
arr
.
push
(
childItem
.
value
);
});
}
data
[
item
.
specId
]
=
arr
;
});
});
data
.
imageList
=
[];
data
.
imageList
=
[];
data
.
carouseList
.
forEach
(
i
=>
{
data
.
carouseList
.
forEach
(
i
=>
{
...
...
src/pages/GoodsManage/staticdata.js
View file @
5dc17ec6
...
@@ -140,7 +140,7 @@ export function column() {
...
@@ -140,7 +140,7 @@ export function column() {
render
:
(
_
,
row
)
=>
(
render
:
(
_
,
row
)
=>
(
<
div
>
<
div
>
<
p
>
{
row
.
state
>=
5
?
'
审核通过
'
:
_
}
<
/p
>
<
p
>
{
row
.
state
>=
5
?
'
审核通过
'
:
_
}
<
/p
>
<
p
>
{
row
.
updateState
||
'
_ _
'
}
<
/p
>
<
p
>
{
row
.
updateState
Desc
||
'
_ _
'
}
<
/p
>
<
/div
>
<
/div
>
),
),
},
},
...
...
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