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
黄庭坚
jinfa-platform
Commits
612acd98
Commit
612acd98
authored
Mar 30, 2022
by
xiexiuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复冲突
parent
359e7304
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
logisticsForm.tsx
...ages/commodity/products/addProductsItem/logisticsForm.tsx
+4
-4
No files found.
src/pages/commodity/products/addProductsItem/logisticsForm.tsx
View file @
612acd98
...
...
@@ -33,7 +33,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
const
[
banCarriageType
,
setBanCarriageType
]
=
useState
(
false
)
const
[
template
,
setTemplate
]
=
useState
(
false
)
// 是否必填运费模板
const
{
productInfoByEdit
,
selectCategoryId
,
productPriceType
,
isCrossBorder
,
sendCycle
,
isCrossBorder
}
=
ProductStore
const
{
productInfoByEdit
,
selectCategoryId
,
productPriceType
,
isCrossBorder
,
sendCycle
}
=
ProductStore
useEffect
(()
=>
{
//传入ref给父级
...
...
@@ -91,9 +91,9 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
useEffect
(()
=>
{
logisticsForm
.
setFieldsValue
({
sendCycle
:
sendCycle
})
},
[
sendCycle
])
useEffect
(()
=>
{
if
(
isCrossBorder
)
{
if
(
isCrossBorder
)
{
logisticsForm
.
setFieldsValue
({
deliveryType
:
1
})
changeDeliveryType
({
target
:
{
value
:
1
}
})
changeDeliveryType
({
target
:
{
value
:
1
}
})
}
},
[
isCrossBorder
])
...
...
@@ -102,7 +102,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
setCarriageType
(
1
)
setIsTemplate
(
false
)
// 跨境商品类型编辑 不重置表单
if
(
!
isCrossBorder
||
!
history
.
location
.
query
?.
id
)
{
if
(
!
isCrossBorder
||
!
history
.
location
.
query
?.
id
)
{
logisticsForm
.
resetFields
()
}
logisticsForm
.
setFieldsValue
({
deliveryType
:
e
.
target
.
value
})
...
...
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