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
c0e9859a
Commit
c0e9859a
authored
Feb 04, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复待提交退货申请单无法选择退货地址的问题
parent
90a73683
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
index.tsx
...pages/afterService/components/ReturnAddressInfo/index.tsx
+23
-12
No files found.
src/pages/afterService/components/ReturnAddressInfo/index.tsx
View file @
c0e9859a
...
...
@@ -2,12 +2,12 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
1-07 13:57:03
* @LastEditTime: 2021-0
2-04 15:32:24
* @Description: 退货地址信息
*/
import
React
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
create
Async
FormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
...
...
@@ -15,7 +15,7 @@ import NiceForm from '@/components/NiceForm';
import
{
schema
}
from
'./schema'
;
import
styles
from
'./index.less'
;
const
modalFormActions
=
createFormActions
();
const
modalFormActions
=
create
Async
FormActions
();
const
{
onFieldValueChange$
,
onFieldInputChange$
,
...
...
@@ -74,6 +74,25 @@ const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
onSubmit
,
})
=>
{
useEffect
(()
=>
{
const
{
setFieldState
}
=
modalFormActions
;
if
(
isEdit
)
{
setFieldState
(
'deliveryAddress'
,
state
=>
{
state
.
visible
=
true
;
});
setFieldState
(
'deliveryAddressShow'
,
state
=>
{
state
.
visible
=
false
;
});
}
else
{
setFieldState
(
'deliveryAddress'
,
state
=>
{
state
.
visible
=
false
;
});
setFieldState
(
'deliveryAddressShow'
,
state
=>
{
state
.
visible
=
true
;
});
}
},
[
isEdit
]);
const
handleSubmit
=
values
=>
{
};
...
...
@@ -134,14 +153,6 @@ const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
onFieldValueChange$
(
'deliveryType'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
if
(
isEdit
)
{
linkage
.
show
(
'deliveryAddress'
);
linkage
.
hide
(
'deliveryAddressShow'
);
}
else
{
linkage
.
hide
(
'deliveryAddress'
);
linkage
.
show
(
'deliveryAddressShow'
);
}
switch
(
value
)
{
// 物流
case
1
:
{
...
...
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