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
linweijiong
jinfa-platform
Commits
25918657
Commit
25918657
authored
Jun 02, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 对接 待会员入库考察 相关
parent
a83ac814
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
152 additions
and
61 deletions
+152
-61
index.tsx
...tigate/components/VerifyComingInvestigateDrawer/index.tsx
+80
-9
schema.ts
...tigate/components/VerifyComingInvestigateDrawer/schema.ts
+13
-17
detail.tsx
src/pages/member/memberPrComingInvestigate/detail.tsx
+11
-12
index.tsx
src/pages/member/memberPrComingInvestigate/index.tsx
+3
-3
verify.tsx
src/pages/member/memberPrComingInvestigate/verify.tsx
+45
-20
No files found.
src/pages/member/memberPrComingInvestigate/components/VerifyComingInvestigateDrawer/index.tsx
View file @
25918657
...
...
@@ -14,10 +14,59 @@ import { DatePicker } from '@formily/antd-components';
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
,
FormEffectHooks
,
}
from
'@formily/antd'
;
import
{
schema
,
}
from
'./schema'
;
import
{
schema
}
from
'./schema'
;
export
type
FileType
=
{
/**
* 文件名
*/
name
:
string
,
/**
* 状态
*/
status
:
string
,
/**
* 缩略图
*/
thumbUrl
:
string
,
/**
* uid
*/
uid
:
string
,
/**
* 地址
*/
url
:
string
,
}
export
type
ValueType
=
{
/**
* 考察日期
*/
inspectDay
:
string
,
/**
* 考察评分
*/
score
:
number
,
/**
* 考察结果
*/
result
:
string
,
/**
* 考察报告
*/
reports
:
FileType
[],
/**
* 提交审批的状态:0-不同意;1-同意
*/
agree
:
number
,
/**
* 审核原因
*/
reason
:
string
,
}
interface
IProps
{
/**
...
...
@@ -27,20 +76,28 @@ interface IProps {
/**
* Form 确认事件
*/
onSubmit
:
(
values
:
any
)
=>
void
,
onSubmit
:
(
values
:
ValueType
)
=>
void
,
/**
* 抽屉关闭事件
*/
onClose
:
()
=>
void
,
/**
* 确认按钮 loading
*/
submitLoading
:
boolean
,
}
const
formActions
=
createFormActions
();
const
{
onFieldValueChange$
,
}
=
FormEffectHooks
;
const
VerifyComingInvestigateDrawer
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
{
visible
,
onSubmit
,
onClose
,
submitLoading
,
}
=
props
;
const
handleClose
=
()
=>
{
...
...
@@ -49,9 +106,10 @@ const VerifyComingInvestigateDrawer: React.FC<IProps> = (props: IProps) => {
}
};
const
handleSubmit
=
(
values
:
any
)
=>
{
const
handleSubmit
=
(
values
:
ValueType
)
=>
{
if
(
onSubmit
)
{
onSubmit
(
values
);
const
{
score
,
...
rest
}
=
values
;
onSubmit
({
score
:
+
score
,
...
rest
});
}
};
...
...
@@ -70,7 +128,11 @@ const VerifyComingInvestigateDrawer: React.FC<IProps> = (props: IProps) => {
<
Button
onClick=
{
handleClose
}
style=
{
{
marginRight
:
16
}
}
>
取 消
</
Button
>
<
Button
onClick=
{
()
=>
formActions
.
submit
()
}
type=
"primary"
>
<
Button
onClick=
{
()
=>
formActions
.
submit
()
}
type=
"primary"
loading=
{
submitLoading
}
>
确 定
</
Button
>
</
div
>
...
...
@@ -81,8 +143,17 @@ const VerifyComingInvestigateDrawer: React.FC<IProps> = (props: IProps) => {
components=
{
{
DatePicker
,
}
}
effects=
{
()
=>
{
effects=
{
(
$
,
{
setFieldState
})
=>
{
onFieldValueChange$
(
'agree'
).
subscribe
(
fieldState
=>
{
setFieldState
(
'reason'
,
state
=>
{
state
.
title
=
fieldState
.
value
===
0
?
'不通过原因'
:
'通过原因'
;
state
.
rules
=
fieldState
.
value
===
0
?
[...
state
.
rules
,
{
required
:
true
}]
:
[];
state
.
required
=
fieldState
.
value
===
0
;
setTimeout
(()
=>
{
formActions
.
validate
(
'reason'
);
},
0
);
});
});
}
}
actions=
{
formActions
}
schema=
{
schema
}
...
...
src/pages/member/memberPrComingInvestigate/components/VerifyComingInvestigateDrawer/schema
/index
.ts
→
src/pages/member/memberPrComingInvestigate/components/VerifyComingInvestigateDrawer/schema.ts
View file @
25918657
/*
* @Author: XieZhiXiong
* @Date: 2021-0
5-24 18:00:52
* @Date: 2021-0
6-02 20:10:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
5-25 09:59:12
* @LastEditTime: 2021-0
6-02 20:28:11
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
,
}
from
'@/constants'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
export
const
schema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -29,7 +30,7 @@ export const schema: ISchema = {
labelAlign
:
'left'
,
},
properties
:
{
date
:
{
inspectDay
:
{
type
:
'string'
,
title
:
'考察日期'
,
'x-component'
:
'DatePicker'
,
...
...
@@ -40,17 +41,10 @@ export const schema: ISchema = {
},
},
required
:
true
,
// 'x-rules': [
// {
// required: true,
// message: '请选择考察日期',
// },
// ],
},
score
:
{
type
:
'string'
,
title
:
'考察评分'
,
'x-component'
:
'DatePicker'
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
style
:
{
...
...
@@ -60,7 +54,11 @@ export const schema: ISchema = {
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择考察评分'
,
message
:
'请输入考察评分'
,
},
{
pattern
:
PATTERN_MAPS
.
money
,
message
:
'请输入两位小数'
,
},
],
},
...
...
@@ -69,8 +67,7 @@ export const schema: ISchema = {
title
:
'考察结果'
,
'x-component'
:
'Textarea'
,
'x-component-props'
:
{
placeholder
:
'在此输入你的内容,最长120个字符,60个汉字'
,
maxLength
:
60
,
placeholder
:
'在此输入你的内容,最长60个字符,30个汉字'
,
rows
:
5
,
},
'x-rules'
:
[
...
...
@@ -80,17 +77,16 @@ export const schema: ISchema = {
}
],
},
file
s
:
{
report
s
:
{
type
:
'string'
,
title
:
'考察报告'
,
'x-component'
:
'
Ant
Upload'
,
'x-component'
:
'
Fix
Upload'
,
'x-component-props'
:
{
action
:
'/api/file/file/upload/prefix'
,
data
:
{
fileType
:
UPLOAD_TYPE
,
prefix
:
'
/afterService/returnApplication/
'
,
prefix
:
'
member_inspect_
'
,
},
// beforeUpload: '{{beforeUpload}}',
accept
:
'.xls, .xlsx, .doc, .docx, .wps, .pdf, .jpg, .png, .jpeg'
,
},
'x-rules'
:
[
...
...
src/pages/member/memberPrComingInvestigate/detail.tsx
View file @
25918657
...
...
@@ -13,7 +13,7 @@ import {
}
from
'antd'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMember
AbilityMaintenanceDetailBasicResponse
}
from
'@/services/Member
Api'
;
import
{
GetMember
DepositInspectDetailResponse
}
from
'@/services/MemberV2
Api'
;
import
{
MEMBER_TYPE_CHANNEL_CORPORATE
,
MEMBER_TYPE_CHANNEL_INDIVIDUAL
,
...
...
@@ -33,17 +33,16 @@ import MemberChannelInfo from '../components/MemberChannelInfo';
import
PicWrap
from
'../components/PicWrap'
;
const
MemberPrComingInvestigate
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
memberInfo
,
setMemberInfo
]
=
useState
<
GetMember
AbilityMaintenanceDetailBasic
Response
>
(
null
);
const
{
validateId
}
=
usePageStatus
();
const
[
memberInfo
,
setMemberInfo
]
=
useState
<
GetMember
DepositInspectDetail
Response
>
(
null
);
const
[
infoLoading
,
setInfoLoaading
]
=
useState
(
false
);
const
getBasicInfo
=
()
=>
{
if
(
!
id
||
!
validateId
)
{
if
(
!
validateId
)
{
return
;
}
setInfoLoaading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailBasic
({
memberId
:
id
,
PublicApi
.
getMemberDepositInspectDetail
({
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -77,8 +76,8 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
:
null
),
...(
memberInfo
&&
memberInfo
.
group
s
?
memberInfo
.
group
s
.
map
((
item
,
index
)
=>
({
memberInfo
&&
memberInfo
.
registerDetail
s
?
memberInfo
.
registerDetail
s
.
map
((
item
,
index
)
=>
({
key
:
`group
${
index
}
`
,
name
:
item
.
groupName
,
}))
...
...
@@ -131,7 +130,7 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
outerStatusName
:
memberInfo
?.
outerStatusName
,
levelTag
:
memberInfo
?.
levelTag
,
email
:
memberInfo
?.
email
,
createTime
:
memberInfo
?.
create
Time
,
createTime
:
memberInfo
?.
register
Time
,
}
}
id=
"basicInfo"
/>
...
...
@@ -159,14 +158,14 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
{
/* 其他注册信息 */
}
{
memberInfo
&&
memberInfo
.
group
s
?
memberInfo
.
group
s
.
map
((
item
,
index
)
=>
(
memberInfo
&&
memberInfo
.
registerDetail
s
?
memberInfo
.
registerDetail
s
.
map
((
item
,
index
)
=>
(
<
Col
span=
{
24
}
key=
{
`group${index}`
}
>
<
CustomizeColumn
title=
{
item
.
groupName
}
data=
{
(
item
.
elements
.
map
((
ele
)
=>
({
title
:
ele
.
field
CN
Name
,
title
:
ele
.
field
Local
Name
,
value
:
(
ele
.
fieldType
!==
'upload'
?
ele
.
fieldValue
...
...
src/pages/member/memberPrComingInvestigate/index.tsx
View file @
25918657
...
...
@@ -30,7 +30,7 @@ const MemberPrComingInvestigate: React.FC<{}> = props => {
const
ref
=
useRef
<
any
>
({});
const
handleJumpAudit
=
record
=>
{
history
.
push
(
`/memberCenter/memberAbility/manage/memberPrComingInvestigate/verify?
id=
${
record
.
memberId
}
&
validateId=
${
record
.
validateId
}
`
);
history
.
push
(
`/memberCenter/memberAbility/manage/memberPrComingInvestigate/verify?validateId=
${
record
.
validateId
}
`
);
};
const
defaultColumns
=
verifyComingColumn
(
'/memberCenter/memberAbility/manage/memberPrComingInvestigate/detail'
).
concat
([
...
...
@@ -62,7 +62,7 @@ const MemberPrComingInvestigate: React.FC<{}> = props => {
payload
.
endDate
=
moment
(
+
endDate
).
format
(
'YYYY-MM-DD'
);
}
const
res
=
await
PublicApi
.
getMember
AbilityMaintenance
Page
(
payload
);
const
res
=
await
PublicApi
.
getMember
DepositInspect
Page
(
payload
);
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
...
...
@@ -72,7 +72,7 @@ const MemberPrComingInvestigate: React.FC<{}> = props => {
// 初始化高级筛选选项
const
fetchSearchItems
=
async
()
=>
{
const
res
=
await
PublicApi
.
getMember
AbilityValidateCommitPageitem
s
();
const
res
=
await
PublicApi
.
getMember
DepositPageCondition
s
();
if
(
res
.
code
===
1000
)
{
const
{
data
=
{}
}:
any
=
res
;
...
...
src/pages/member/memberPrComingInvestigate/verify.tsx
View file @
25918657
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-25 14:03:05
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
5-25 14:03:05
* @LastEditTime: 2021-0
6-02 20:21:48
* @Description:
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -11,13 +11,15 @@ import {
Col
,
Spin
,
Button
,
message
,
}
from
'antd'
;
import
{
CheckCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
history
}
from
'umi'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetMember
AbilityMaintenanceDetailBasicResponse
}
from
'@/services/Member
Api'
;
import
{
GetMember
DepositInspectDetailResponse
}
from
'@/services/MemberV2
Api'
;
import
AnchorPage
from
'@/layouts/AnchorPage'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
AuditProcess
from
'@/components/AuditProcess'
;
...
...
@@ -30,21 +32,21 @@ import {
}
from
'../constant'
;
import
MemberBasicInfo
from
'../components/MemberBasicInfo'
;
import
PicWrap
from
'../components/PicWrap'
;
import
VerifyComingInvestigateDrawer
from
'./components/VerifyComingInvestigateDrawer'
;
import
VerifyComingInvestigateDrawer
,
{
ValueType
}
from
'./components/VerifyComingInvestigateDrawer'
;
const
MemberPrComingInvestigate
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
memberInfo
,
setMemberInfo
]
=
useState
<
GetMember
AbilityMaintenanceDetailBasic
Response
>
(
null
);
const
{
validateId
}
=
usePageStatus
();
const
[
memberInfo
,
setMemberInfo
]
=
useState
<
GetMember
DepositInspectDetail
Response
>
(
null
);
const
[
infoLoading
,
setInfoLoaading
]
=
useState
(
false
);
const
[
visibleVerifyDrawer
,
setVisibleVerifyDrawer
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
getBasicInfo
=
()
=>
{
if
(
!
id
||
!
validateId
)
{
if
(
!
validateId
)
{
return
;
}
setInfoLoaading
(
true
);
PublicApi
.
getMemberAbilityMaintenanceDetailBasic
({
memberId
:
id
,
PublicApi
.
getMemberDepositInspectDetail
({
validateId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -59,16 +61,38 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
getBasicInfo
();
},
[]);
const
handleVerify
=
()
=>
{
console
.
log
(
'审核'
)
};
const
handleVisibleVerifyDrawer
=
(
flag
?)
=>
{
setVisibleVerifyDrawer
(
!!
flag
);
};
const
handleSubmit
=
()
=>
{
console
.
log
(
'表单提交'
)
const
handleSubmit
=
(
value
:
ValueType
)
=>
{
setSubmitLoading
(
true
);
const
payload
=
{
validateId
,
...
value
,
reports
:
value
.
reports
.
map
((
item
)
=>
({
url
:
item
.
url
,
name
:
item
.
name
,
})),
};
const
msg
=
message
.
loading
({
content
:
'正在提交,请稍候...'
,
duration
:
0
,
});
PublicApi
.
postMemberDepositInspect
(
payload
,
{
timeout
:
0
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
handleVisibleVerifyDrawer
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
msg
();
setSubmitLoading
(
false
);
});
};
const
anchorsArr
=
[
...
...
@@ -81,8 +105,8 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
name
:
'基本信息'
,
},
...(
memberInfo
&&
memberInfo
.
group
s
?
memberInfo
.
group
s
.
map
((
item
,
index
)
=>
({
memberInfo
&&
memberInfo
.
registerDetail
s
?
memberInfo
.
registerDetail
s
.
map
((
item
,
index
)
=>
({
key
:
`group
${
index
}
`
,
name
:
item
.
groupName
,
}))
...
...
@@ -144,7 +168,7 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
outerStatusName
:
memberInfo
?.
outerStatusName
,
levelTag
:
memberInfo
?.
levelTag
,
email
:
memberInfo
?.
email
,
createTime
:
memberInfo
?.
create
Time
,
createTime
:
memberInfo
?.
register
Time
,
}
}
id=
"basicInfo"
/>
...
...
@@ -152,14 +176,14 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
{
/* 其他注册信息 */
}
{
memberInfo
&&
memberInfo
.
group
s
?
memberInfo
.
group
s
.
map
((
item
,
index
)
=>
(
memberInfo
&&
memberInfo
.
registerDetail
s
?
memberInfo
.
registerDetail
s
.
map
((
item
,
index
)
=>
(
<
Col
span=
{
24
}
key=
{
`group${index}`
}
>
<
CustomizeColumn
title=
{
item
.
groupName
}
data=
{
(
item
.
elements
.
map
((
ele
)
=>
({
title
:
ele
.
field
CN
Name
,
title
:
ele
.
field
Local
Name
,
value
:
(
ele
.
fieldType
!==
'upload'
?
ele
.
fieldValue
...
...
@@ -195,6 +219,7 @@ const MemberPrComingInvestigate: React.FC<{}> = () => {
<
VerifyComingInvestigateDrawer
visible=
{
visibleVerifyDrawer
}
onClose=
{
()
=>
handleVisibleVerifyDrawer
(
false
)
}
submitLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
/>
</
Spin
>
...
...
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