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
shenshaokai
jinfa-platform
Commits
79b3bc9c
Commit
79b3bc9c
authored
Apr 08, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理商品草稿不填名称编辑回显数据异常问题
parent
a0e29074
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
basicInfoForm.tsx
...ages/commodity/products/addProductsItem/basicInfoForm.tsx
+8
-6
No files found.
src/pages/commodity/products/addProductsItem/basicInfoForm.tsx
View file @
79b3bc9c
...
...
@@ -110,16 +110,17 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
useEffect
(()
=>
{
const
{
id
,
draftId
}
=
history
.
location
.
query
if
((
id
||
draftId
)
&&
getBasicFormParamsByEdit
?.
name
)
{
// if ((id || draftId) && getBasicFormParamsByEdit?.name) {
if
(
id
||
draftId
)
{
handleBrandSearch
(
getBasicFormParamsByEdit
.
brandName
)
onCustomerCategoryChange
(
getBasicFormParamsByEdit
.
customerCategoryId
)
// 赋[]初值 显示一行区域选择
if
(
!
getBasicFormParamsByEdit
.
commodityAreaList
.
length
)
{
getBasicFormParamsByEdit
.
commodityAreaList
[
0
]
=
[
]
if
(
!
getBasicFormParamsByEdit
?.
commodityAreaList
?
.
length
)
{
getBasicFormParamsByEdit
.
commodityAreaList
=
[[]
]
}
basicForm
.
setFieldsValue
(
getBasicFormParamsByEdit
)
setSelectBrandId
(
getBasicFormParamsByEdit
.
brandId
)
setIsUpdateAttribute
(
productInfoByEdit
.
isUpdateAttribute
)
setIsUpdateAttribute
(
productInfoByEdit
?
.
isUpdateAttribute
)
}
else
{
basicForm
.
setFieldsValue
({
'commodityAreaList'
:
[[]]})
}
...
...
@@ -149,8 +150,9 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
}
const
onCustomerCategoryChange
=
(
value
)
=>
{
let
seletCategoryId
=
value
[
value
.
length
-
1
]
if
(
seletCategoryId
)
{
// let seletCategoryId = value[value.length - 1]
if
(
value
)
{
let
seletCategoryId
=
value
[
value
.
length
-
1
]
getProductCustomerGetCustomerCategoryById
({
id
:
seletCategoryId
}).
then
(
res
=>
{
const
{
data
}
=
res
onChangeAttributeList
(
data
?.
customerAttributeList
)
...
...
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