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
e4723722
Commit
e4723722
authored
Jun 15, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加 到期日 与 有效期之间的联动
parent
7469d7b1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
5 deletions
+58
-5
effects.ts
...ages/member/components/QualitiesUploadFormItem/effects.ts
+49
-0
index.tsx
...omingData/components/UploadQualificationsDrawer/index.tsx
+4
-3
index.tsx
src/pages/member/memberQuery/applyMember/index.tsx
+4
-1
schema.ts
src/pages/member/memberQuery/applyMember/schema.ts
+1
-1
No files found.
src/pages/member/components/QualitiesUploadFormItem/effects.ts
0 → 100644
View file @
e4723722
/*
* @Author: XieZhiXiong
* @Date: 2021-06-15 13:38:56
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-15 14:10:11
* @Description: 联动逻辑
*/
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
const
{
onFieldInputChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
,
fieldName
:
string
)
=>
{
const
{
setFieldState
,
}
=
actions
;
// 如果勾选了长期有效,则清空 到期日
onFieldInputChange$
(
`
${
fieldName
}
.*.permanent`
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
if
(
value
&&
value
.
length
)
{
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`
${
fieldName
}
.
${
$1
}
.expireDay`
}),
state
=>
{
state
.
value
=
''
;
}
);
}
});
// 如果选择了到期日,则清空 有效期
onFieldInputChange$
(
`
${
fieldName
}
.*.expireDay`
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
if
(
value
&&
value
.
length
)
{
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`
${
fieldName
}
.
${
$1
}
.permanent`
}),
state
=>
{
state
.
value
=
[];
}
);
}
});
}
\ No newline at end of file
src/pages/member/memberPrVerifyComingData/components/UploadQualificationsDrawer/index.tsx
View file @
e4723722
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-06-01 20:03:23
* @Date: 2021-06-01 20:03:23
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-
04 20:47:18
* @LastEditTime: 2021-06-
15 13:54:42
* @Description: 补充资质证明抽屉
* @Description: 补充资质证明抽屉
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
...
@@ -16,6 +16,7 @@ import {
...
@@ -16,6 +16,7 @@ import {
import
{
DatePicker
,
Checkbox
}
from
'@formily/antd-components'
import
{
DatePicker
,
Checkbox
}
from
'@formily/antd-components'
import
NiceForm
from
'@/components/NiceForm'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
schema
}
from
'./schema'
;
import
{
schema
}
from
'./schema'
;
import
{
useBusinessEffects
}
from
'../../../components/QualitiesUploadFormItem/effects'
;
import
QualitiesUpload
from
'../../../components/QualitiesUpload'
;
import
QualitiesUpload
from
'../../../components/QualitiesUpload'
;
import
QualitiesUploadFormItem
from
'../../../components/QualitiesUploadFormItem'
;
import
QualitiesUploadFormItem
from
'../../../components/QualitiesUploadFormItem'
;
...
@@ -123,8 +124,8 @@ const UploadQualificationsDrawer: React.FC<IProps> = (props: IProps) => {
...
@@ -123,8 +124,8 @@ const UploadQualificationsDrawer: React.FC<IProps> = (props: IProps) => {
QualitiesUpload
,
QualitiesUpload
,
QualitiesUploadFormItem
,
QualitiesUploadFormItem
,
}
}
}
}
effects=
{
()
=>
{
effects=
{
(
context
,
actions
)
=>
{
useBusinessEffects
(
context
,
actions
,
'qualities'
);
}
}
}
}
actions=
{
formActions
}
actions=
{
formActions
}
schema=
{
schema
}
schema=
{
schema
}
...
...
src/pages/member/memberQuery/applyMember/index.tsx
View file @
e4723722
...
@@ -22,6 +22,7 @@ import NiceForm from '@/components/NiceForm';
...
@@ -22,6 +22,7 @@ import NiceForm from '@/components/NiceForm';
import
MellowCard
from
'@/components/MellowCard'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
schema
,
{
GroupItem
}
from
'./schema'
;
import
schema
,
{
GroupItem
}
from
'./schema'
;
import
{
useBusinessEffects
}
from
'../../components/QualitiesUploadFormItem/effects'
;
import
ComingAgreement
from
'./components/ComingAgreement'
;
import
ComingAgreement
from
'./components/ComingAgreement'
;
import
RegisterInfo
from
'./components/RegisterInfo'
;
import
RegisterInfo
from
'./components/RegisterInfo'
;
import
SubmitSuccess
from
'./components/SubmitSuccess'
;
import
SubmitSuccess
from
'./components/SubmitSuccess'
;
...
@@ -337,7 +338,7 @@ const MemberQueryApplyMember: React.FC = () => {
...
@@ -337,7 +338,7 @@ const MemberQueryApplyMember: React.FC = () => {
RegisterInfo
:
<
RegisterInfo
upperMemberId=
{
upperMemberId
}
upperRoleId=
{
upperRoleId
}
/>,
RegisterInfo
:
<
RegisterInfo
upperMemberId=
{
upperMemberId
}
upperRoleId=
{
upperRoleId
}
/>,
SubmitSuccess
:
<
SubmitSuccess
/>,
SubmitSuccess
:
<
SubmitSuccess
/>,
}
}
}
}
effects=
{
(
$
,
{
setFieldState
}
)
=>
{
effects=
{
(
$
,
actions
)
=>
{
onStepNext$
().
subscribe
(()
=>
{
onStepNext$
().
subscribe
(()
=>
{
stepRef
.
current
+=
1
;
stepRef
.
current
+=
1
;
setCurrenStep
(
stepRef
.
current
);
setCurrenStep
(
stepRef
.
current
);
...
@@ -354,6 +355,8 @@ const MemberQueryApplyMember: React.FC = () => {
...
@@ -354,6 +355,8 @@ const MemberQueryApplyMember: React.FC = () => {
setUnsaved
(
true
);
setUnsaved
(
true
);
}
}
});
});
useBusinessEffects
(
$
,
actions
,
'step4.qualities'
);
}
}
}
}
schema=
{
schema
(
depositInfo
,
validateId
)
}
schema=
{
schema
(
depositInfo
,
validateId
)
}
/>
/>
...
...
src/pages/member/memberQuery/applyMember/schema.ts
View file @
e4723722
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2021-05-26 17:00:39
* @Date: 2021-05-26 17:00:39
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-
07 11:58:03
* @LastEditTime: 2021-06-
15 14:05:18
* @Description:
* @Description:
*/
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
ISchema
}
from
'@formily/antd'
;
...
...
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