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
b02d6a7b
Commit
b02d6a7b
authored
Jan 18, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 调整授信内部状态相关逻辑
parent
d74ff7a7
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
118 additions
and
45 deletions
+118
-45
index.ts
src/constants/index.ts
+30
-15
constant.ts
src/pages/payandSettle/constant.ts
+12
-5
index.tsx
...payandSettle/creditManage/components/DetailInfo/index.tsx
+19
-9
index.tsx
...ayandSettle/creditManage/components/FlowRecords/index.tsx
+2
-2
index.tsx
...ayandSettle/creditManage/components/VerifyModal/index.tsx
+27
-6
index.ts
...ettle/creditManage/components/VerifyModal/schema/index.ts
+1
-1
verify.tsx
src/pages/payandSettle/creditManage/quotaPr1/verify.tsx
+1
-1
verify.tsx
src/pages/payandSettle/creditManage/quotaPr2/verify.tsx
+1
-1
verify.tsx
src/pages/payandSettle/creditManage/quotaPr3/verify.tsx
+1
-1
verify.tsx
...pages/payandSettle/creditManage/quotaPrConfirm/verify.tsx
+23
-3
verify.tsx
src/pages/payandSettle/creditManage/quotaPrSubmit/verify.tsx
+1
-1
No files found.
src/constants/index.ts
View file @
b02d6a7b
...
...
@@ -1246,42 +1246,57 @@ export const BILL_TRADE_OPERATION = {
*/
export
const
CREDIT_INNER_STATUS_UNCOMMITTED
=
1
;
/**
* 已提交
* 提交审核失败
*/
export
const
CREDIT_INNER_STATUS_COMMITTED_FAILED
=
2
;
/**
* 提交审核成功
*/
export
const
CREDIT_INNER_STATUS_COMMITTED
=
2
;
export
const
CREDIT_INNER_STATUS_COMMITTED_SUCCESS
=
3
;
/**
* 一级审核失败
*/
export
const
CREDIT_INNER_STATUS_FAILED_1
=
4
;
/**
* 一级审核通过
*/
export
const
CREDIT_INNER_STATUS_SUCCESS_1
=
3
;
export
const
CREDIT_INNER_STATUS_SUCCESS_1
=
5
;
/**
* 二级审核失败
*/
export
const
CREDIT_INNER_STATUS_FAILED_2
=
6
;
/**
* 二级审核通过
*/
export
const
CREDIT_INNER_STATUS_SUCCESS_2
=
4
;
export
const
CREDIT_INNER_STATUS_SUCCESS_2
=
7
;
/**
* 三级审核
通过
* 三级审核
失败
*/
export
const
CREDIT_INNER_STATUS_
SUCCESS_3
=
5
;
export
const
CREDIT_INNER_STATUS_
FAILED_3
=
8
;
/**
*
审核不
通过
*
三级审核
通过
*/
export
const
CREDIT_INNER_STATUS_
FAILED
=
6
;
export
const
CREDIT_INNER_STATUS_
SUCCESS_3
=
9
;
/**
*
确认审核
通过
*
审核不
通过
*/
export
const
CREDIT_INNER_STATUS_
CONFIRM_SUCCESS
=
7
;
export
const
CREDIT_INNER_STATUS_
FAILED
=
10
;
/**
*
确认审核不
通过
*
审核
通过
*/
export
const
CREDIT_INNER_STATUS_CONFIRM_
FAILED
=
8
;
export
const
CREDIT_INNER_STATUS_CONFIRM_
SUCCESS
=
11
;
export
const
CREDIT_INNER_STATUS
=
{
[
CREDIT_INNER_STATUS_UNCOMMITTED
]:
'待提交审核'
,
[
CREDIT_INNER_STATUS_COMMITTED
]:
'已提交'
,
[
CREDIT_INNER_STATUS_COMMITTED_FAILED
]:
'提交审核失败'
,
[
CREDIT_INNER_STATUS_COMMITTED_SUCCESS
]:
'提交审核成功'
,
[
CREDIT_INNER_STATUS_FAILED_1
]:
'一级审核失败'
,
[
CREDIT_INNER_STATUS_SUCCESS_1
]:
'一级审核通过'
,
[
CREDIT_INNER_STATUS_FAILED_2
]:
'二级审核失败'
,
[
CREDIT_INNER_STATUS_SUCCESS_2
]:
'二级审核通过'
,
[
CREDIT_INNER_STATUS_FAILED_3
]:
'三级审核失败'
,
[
CREDIT_INNER_STATUS_SUCCESS_3
]:
'三级审核通过'
,
[
CREDIT_INNER_STATUS_FAILED
]:
'审核不通过'
,
[
CREDIT_INNER_STATUS_CONFIRM_SUCCESS
]:
'确认审核通过'
,
[
CREDIT_INNER_STATUS_CONFIRM_FAILED
]:
'确认审核不通过'
,
[
CREDIT_INNER_STATUS_CONFIRM_SUCCESS
]:
'审核通过'
,
};
// 授信外部状态
...
...
src/pages/payandSettle/constant.ts
View file @
b02d6a7b
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-10-15 15:41:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 202
0-10-28 14:49:44
* @LastEditTime: 202
1-01-18 11:20:03
* @Description:
*/
import
{
...
...
@@ -17,13 +17,16 @@ import {
CREDIT_OUTER_STATUS_SUCCESS
,
CREDIT_OUTER_STATUS_FAILED
,
CREDIT_INNER_STATUS_UNCOMMITTED
,
CREDIT_INNER_STATUS_COMMITTED
,
CREDIT_INNER_STATUS_COMMITTED_FAILED
,
CREDIT_INNER_STATUS_COMMITTED_SUCCESS
,
CREDIT_INNER_STATUS_FAILED_1
,
CREDIT_INNER_STATUS_SUCCESS_1
,
CREDIT_INNER_STATUS_SUCCESS_2
,
CREDIT_INNER_STATUS_FAILED_2
,
CREDIT_INNER_STATUS_FAILED_3
,
CREDIT_INNER_STATUS_SUCCESS_3
,
CREDIT_INNER_STATUS_FAILED
,
CREDIT_INNER_STATUS_CONFIRM_SUCCESS
,
CREDIT_INNER_STATUS_CONFIRM_FAILED
,
CREDIT_STATUS_NOT_APPLIED
,
CREDIT_STATUS_APPLYING
,
CREDIT_STATUS_NORMAL
,
...
...
@@ -79,13 +82,17 @@ export const CREDIT_OUTER_STATUS_TAG_MAP = {
// 授信内部部状态 Badge map
export
const
CREDIT_INNER_STATUS_BADGE_MAP
=
{
[
CREDIT_INNER_STATUS_UNCOMMITTED
]:
'#669EDE'
,
[
CREDIT_INNER_STATUS_COMMITTED
]:
'#41CC9E'
,
[
CREDIT_INNER_STATUS_COMMITTED_FAILED
]:
'#EF6260'
,
[
CREDIT_INNER_STATUS_COMMITTED_SUCCESS
]:
'#41CC9E'
,
[
CREDIT_INNER_STATUS_FAILED_1
]:
'#EF6260'
,
[
CREDIT_INNER_STATUS_SUCCESS_1
]:
'#41CC9E'
,
[
CREDIT_INNER_STATUS_FAILED_2
]:
'#EF6260'
,
[
CREDIT_INNER_STATUS_SUCCESS_2
]:
'#41CC9E'
,
[
CREDIT_INNER_STATUS_FAILED_3
]:
'#EF6260'
,
[
CREDIT_INNER_STATUS_SUCCESS_3
]:
'#41CC9E'
,
[
CREDIT_INNER_STATUS_FAILED
]:
'#EF6260'
,
[
CREDIT_INNER_STATUS_CONFIRM_SUCCESS
]:
'#41CC9E'
,
[
CREDIT_INNER_STATUS_
CONFIRM_
FAILED
]:
'#EF6260'
,
[
CREDIT_INNER_STATUS_FAILED
]:
'#EF6260'
,
};
...
...
src/pages/payandSettle/creditManage/components/DetailInfo/index.tsx
View file @
b02d6a7b
...
...
@@ -46,16 +46,26 @@ interface QuotaValues {
};
interface
DetailInfoProps
{
// 申请id
/**
* 申请id
*/
id
:
string
;
// 授信id
/**
* 授信id
*/
creditId
:
string
;
// 审批信息是否可编辑
/**
* 审批信息是否可编辑
*/
approvalEditable
?:
boolean
;
// 历史记录目标路径
/**
* 历史记录目标路径
*/
target
?:
string
;
// 头部右侧拓展
headExtra
?:
React
.
ReactNode
;
/**
* 头部右侧拓展
*/
headExtra
?:
(
info
:
QuotaInfo
)
=>
React
.
ReactNode
;
};
interface
QuotaInfo
extends
GetPayCreditHandleGetApplyDetailResponse
{
...
...
@@ -130,8 +140,8 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => {
quota
:
quotaValuesData
.
quota
,
billDay
:
quotaValuesData
.
billDay
,
repayPeriod
:
quotaValuesData
.
repayPeriod
,
verifyTime
:
quotaInfo
?.
verify
?.
verifyTime
,
maxApplyQuota
:
quotaInfo
?.
verify
?.
maxApplyQuota
,
verifyTime
:
verify
?.
verifyTime
,
maxApplyQuota
:
verify
?.
maxApplyQuota
,
}
:
null
,
});
}
...
...
@@ -188,7 +198,7 @@ const DetailInfo: React.FC<DetailInfoProps> = (props) => {
}
extra=
{
(
<>
{
headExtra
}
{
headExtra
&&
headExtra
(
quotaInfo
)
}
</>
)
}
>
...
...
src/pages/payandSettle/creditManage/components/FlowRecords/index.tsx
View file @
b02d6a7b
...
...
@@ -136,7 +136,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ outerHistory = [], innerHisto
{
outerHistory
?
(
<
Tabs
.
TabPane
tab=
"外部流转记录"
key=
"1"
>
<
PolymericTable
rowKey=
"
operateTime
"
rowKey=
"
step
"
dataSource=
{
outerHistory
}
columns=
{
outerColumns
}
loading=
{
false
}
...
...
@@ -146,7 +146,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({ outerHistory = [], innerHisto
)
:
null
}
<
Tabs
.
TabPane
tab=
"内部流转记录"
key=
"2"
>
<
PolymericTable
rowKey=
"
operateTime
"
rowKey=
"
step
"
dataSource=
{
innerHistory
}
columns=
{
innerColumns
}
loading=
{
false
}
...
...
src/pages/payandSettle/creditManage/components/VerifyModal/index.tsx
View file @
b02d6a7b
...
...
@@ -2,16 +2,16 @@
* @Author: XieZhiXiong
* @Date: 2020-10-28 17:29:14
* @LastEditors: XieZhiXiong
* @LastEditTime: 202
0-10-28 17:38:06
* @LastEditTime: 202
1-01-18 11:30:49
* @Description: 提交审核 Modal
*/
import
React
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
create
Async
FormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
auditModalSchema
}
from
'./schema'
;
const
modalFormActions
=
createFormActions
();
const
modalFormActions
=
create
Async
FormActions
();
const
{
onFieldValueChange$
,
onFieldInputChange$
,
...
...
@@ -22,6 +22,10 @@ interface VerifyModalProps {
confirmLoading
:
boolean
;
onSubmit
:
(
values
:
{
agree
:
0
|
1
,
reason
:
string
})
=>
void
;
onVisible
:
(
flag
:
boolean
)
=>
void
;
/**
* 是否只可以选择 不接受申请
*/
rejected
?:
boolean
;
};
const
VerifyModal
:
React
.
FC
<
VerifyModalProps
>
=
({
...
...
@@ -29,8 +33,26 @@ const VerifyModal: React.FC<VerifyModalProps> = ({
confirmLoading
,
onSubmit
,
onVisible
,
rejected
=
false
,
})
=>
{
useEffect
(()
=>
{
// 内部状态为 审核通过 才能选择 审核通过选项
if
(
rejected
)
{
modalFormActions
.
setFieldState
(
'agree'
,
state
=>
{
const
newMenu
=
state
.
props
.
enum
.
map
(
(
item
:
{
label
:
string
,
value
:
any
})
=>
({
...
item
,
disabled
:
item
.
value
===
1
,
})
);
FormPath
.
setIn
(
state
,
'props.enum'
,
newMenu
);
FormPath
.
setIn
(
state
,
'value'
,
0
);
});
}
},
[
rejected
]);
const
handleSubmit
=
values
=>
{
if
(
onSubmit
)
{
onSubmit
(
values
);
...
...
@@ -44,12 +66,11 @@ const VerifyModal: React.FC<VerifyModalProps> = ({
confirmLoading=
{
confirmLoading
}
onOk=
{
()
=>
modalFormActions
.
submit
()
}
onCancel=
{
()
=>
onVisible
(
false
)
}
destroyOnClose
>
<
NiceForm
effects=
{
(
$
,
{
setFieldState
})
=>
{
onFieldValueChange$
(
'agree'
).
subscribe
(
fieldState
=>
{
setFieldState
(
'
reas
on'
,
state
=>
{
setFieldState
(
'
opini
on'
,
state
=>
{
state
.
visible
=
!
fieldState
.
value
;
});
});
...
...
src/pages/payandSettle/creditManage/components/VerifyModal/schema/index.ts
View file @
b02d6a7b
...
...
@@ -20,7 +20,7 @@ export const auditModalSchema: ISchema = {
'x-component'
:
'radio'
,
'x-component-props'
:
{},
},
reas
on
:
{
opini
on
:
{
type
:
'string'
,
title
:
'审核不通过原因'
,
'x-component'
:
'textarea'
,
...
...
src/pages/payandSettle/creditManage/quotaPr1/verify.tsx
View file @
b02d6a7b
...
...
@@ -42,7 +42,7 @@ const QuotaPr1Verify: React.FC = () => {
id=
{
id
}
creditId=
{
creditId
}
target=
"/memberCenter/payandSettle/creditManage/quotaPr1/history"
headExtra=
{
(
headExtra=
{
(
)
=>
(
<
Button
type=
"primary"
icon=
{
<
FormOutlined
/>
}
...
...
src/pages/payandSettle/creditManage/quotaPr2/verify.tsx
View file @
b02d6a7b
...
...
@@ -42,7 +42,7 @@ const QuotaPr2Verify: React.FC = () => {
id=
{
id
}
creditId=
{
creditId
}
target=
"/memberCenter/payandSettle/creditManage/quotaPr2/history"
headExtra=
{
(
headExtra=
{
(
)
=>
(
<
Button
type=
"primary"
icon=
{
<
FormOutlined
/>
}
...
...
src/pages/payandSettle/creditManage/quotaPr3/verify.tsx
View file @
b02d6a7b
...
...
@@ -42,7 +42,7 @@ const QuotaPr3Verify: React.FC = () => {
id=
{
id
}
creditId=
{
creditId
}
target=
"/memberCenter/payandSettle/creditManage/quotaPr3/history"
headExtra=
{
(
headExtra=
{
(
)
=>
(
<
Button
type=
"primary"
icon=
{
<
FormOutlined
/>
}
...
...
src/pages/payandSettle/creditManage/quotaPrConfirm/verify.tsx
View file @
b02d6a7b
...
...
@@ -6,6 +6,12 @@ import { history } from 'umi';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
FormOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
CREDIT_INNER_STATUS_COMMITTED_FAILED
,
CREDIT_INNER_STATUS_FAILED_1
,
CREDIT_INNER_STATUS_FAILED_2
,
CREDIT_INNER_STATUS_FAILED_3
,
}
from
'@/constants'
;
import
DetailInfo
from
'../components/DetailInfo'
;
import
VerifyModal
from
'../components/VerifyModal'
;
...
...
@@ -13,6 +19,7 @@ const QuotaPrConfirmVerify: React.FC = () => {
const
{
id
,
creditId
}
=
usePageStatus
();
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
rejected
,
setRejected
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
if
(
!
id
)
{
...
...
@@ -36,17 +43,29 @@ const QuotaPrConfirmVerify: React.FC = () => {
setModalVisible
(
!!
flag
);
};
const
handleVerify
=
(
info
)
=>
{
if
(
info
?.
member
?.
innerStatus
===
CREDIT_INNER_STATUS_COMMITTED_FAILED
||
info
?.
member
?.
innerStatus
===
CREDIT_INNER_STATUS_FAILED_1
||
info
?.
member
?.
innerStatus
===
CREDIT_INNER_STATUS_FAILED_2
||
info
?.
member
?.
innerStatus
===
CREDIT_INNER_STATUS_FAILED_3
)
{
setRejected
(
true
);
}
handleVisible
(
true
);
};
return
(
<>
<
DetailInfo
id=
{
id
}
creditId=
{
creditId
}
target=
"/memberCenter/payandSettle/creditManage/quotaPrConfirm/history"
headExtra=
{
(
<
Button
headExtra=
{
(
info
)
=>
(
<
Button
type=
"primary"
icon=
{
<
FormOutlined
/>
}
onClick=
{
()
=>
handleV
isible
(
true
)
}
onClick=
{
()
=>
handleV
erify
(
info
)
}
>
确认
</
Button
>
...
...
@@ -54,6 +73,7 @@ const QuotaPrConfirmVerify: React.FC = () => {
/>
<
VerifyModal
visible=
{
modalVisible
}
rejected=
{
rejected
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
...
...
src/pages/payandSettle/creditManage/quotaPrSubmit/verify.tsx
View file @
b02d6a7b
...
...
@@ -42,7 +42,7 @@ const QuotaPrSubmitVerify: React.FC = () => {
id=
{
id
}
creditId=
{
creditId
}
target=
"/memberCenter/payandSettle/creditManage/quotaPrSubmit/history"
headExtra=
{
(
headExtra=
{
(
)
=>
(
<
Button
type=
"primary"
icon=
{
<
FormOutlined
/>
}
...
...
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