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
cc8c9c88
Commit
cc8c9c88
authored
Apr 18, 2022
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix418' into 'v2-220418'
处理编辑商品草稿中部分属性禁用的问题 See merge request linkseeks-design/pro-platform!390
parents
d492f803
b5349dca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+4
-4
basicInfoForm.tsx
...ages/commodity/products/addProductsItem/basicInfoForm.tsx
+1
-1
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+1
-1
productAttributeForm.tsx
...mmodity/products/addProductsItem/productAttributeForm.tsx
+3
-2
No files found.
src/pages/commodity/products/addProducts.tsx
View file @
cc8c9c88
...
...
@@ -361,14 +361,14 @@ const AddProducts: React.FC<{}> = (props) => {
if
(
res
.
code
===
1000
)
{
setIsEnableCheck
(
false
)
setReponseId
(
res
.
data
)
// 存在草稿即删除草稿
if
(
draftId
)
{
postProductCommodityDeleteCommodityDraftBatch
({
idList
:
[
draftId
]},
{
ctlType
:
"none"
})
}
}
else
{
setIsDisableSaveBtn
(
false
)
}
})
// 存在草稿即删除草稿
if
(
draftId
)
{
postProductCommodityDeleteCommodityDraftBatch
({
idList
:
[
draftId
]},
{
ctlType
:
"none"
})
}
}).
then
(
e
=>
{
if
(
e
)
{
setIsDisableSaveBtn
(
false
)
...
...
src/pages/commodity/products/addProductsItem/basicInfoForm.tsx
View file @
cc8c9c88
...
...
@@ -121,7 +121,7 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
}
basicForm
.
setFieldsValue
(
getBasicFormParamsByEdit
)
setSelectBrandId
(
getBasicFormParamsByEdit
.
brandId
)
setIsUpdateAttribute
(
productInfoByEdit
?.
isUpdateAttribute
)
setIsUpdateAttribute
(
draftId
?
true
:
productInfoByEdit
?.
isUpdateAttribute
)
}
else
{
basicForm
.
setFieldsValue
({
'commodityAreaList'
:
[[]]})
}
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
cc8c9c88
...
...
@@ -897,7 +897,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
// initialValue={planPrice}
>
{
(
history
.
location
.
query
?.
id
||
history
.
location
.
query
?.
draftId
)
?
<
Radio
.
Group
onChange=
{
handlePlanPriceChange
}
disabled=
{
!
productInfoByEdit
.
isUpdateAttribute
}
>
(
history
.
location
.
query
?.
id
||
history
.
location
.
query
?.
draftId
)
?
<
Radio
.
Group
onChange=
{
handlePlanPriceChange
}
disabled=
{
history
.
location
.
query
?.
draftId
?
false
:
!
productInfoByEdit
.
isUpdateAttribute
}
>
<
Radio
value=
{
1
}
>
{
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.form.priceType.option.1'
})
}
</
Radio
>
<
Radio
value=
{
2
}
disabled=
{
isCrossBorder
}
>
{
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.form.priceType.option.2'
})
}
</
Radio
>
<
Radio
value=
{
3
}
disabled=
{
isCrossBorder
}
>
{
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.form.priceType.option.3'
})
}
</
Radio
>
...
...
src/pages/commodity/products/addProductsItem/productAttributeForm.tsx
View file @
cc8c9c88
...
...
@@ -234,9 +234,10 @@ const ProductAttributeForm: React.FC<Iprops> = (props) => {
let
_isPrice
=
null
let
_isUpdateAttribute
=
null
let
_isDisabled
=
false
if
(
history
.
location
.
query
?.
id
||
history
.
location
.
query
?.
draftId
)
{
const
{
id
,
draftId
}
=
history
.
location
.
query
if
(
id
||
draftId
)
{
_isPrice
=
attrItem
.
isPrice
_isUpdateAttribute
=
productInfoByEdit
.
isUpdateAttribute
_isUpdateAttribute
=
draftId
?
true
:
productInfoByEdit
.
isUpdateAttribute
_isDisabled
=
_isPrice
&&
!
_isUpdateAttribute
// 编辑中 过滤后续添加的属性
if
(
!
_isUpdateAttribute
&&
(
attrItem
.
createTime
>
productInfoByEdit
.
createTime
))
{
...
...
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