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
47220d90
Commit
47220d90
authored
Dec 16, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
0692c542
d24e613d
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
398 additions
and
45 deletions
+398
-45
index.ts
src/constants/index.ts
+6
-6
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+10
-4
index.tsx
...itApplication/components/OuterCirculationRecord/index.tsx
+2
-2
index.tsx
...s/payandSettle/creditApplication/quotaFormQuery/index.tsx
+2
-2
index.tsx
...lication/quotaMenage/detail/components/BillInfo/index.tsx
+4
-4
index.tsx
...tion/quotaMenage/detail/components/IntroduceRow/index.tsx
+88
-6
index.tsx
...ation/quotaMenage/detail/components/TradeRecord/index.tsx
+4
-4
index.less
...ation/quotaMenage/detail/components/WxPayModal/index.less
+82
-0
index.tsx
...cation/quotaMenage/detail/components/WxPayModal/index.tsx
+156
-0
index.tsx
...ages/payandSettle/creditApplication/quotaMenage/index.tsx
+1
-1
index.tsx
...es/payandSettle/creditApplication/quotaPrSubmit/index.tsx
+1
-1
index.tsx
src/pages/payandSettle/creditManage/quotaFormQuery/index.tsx
+2
-2
index.tsx
src/pages/payandSettle/creditManage/quotaMenage/index.tsx
+27
-2
index.tsx
src/pages/payandSettle/creditManage/quotaPr1/index.tsx
+2
-2
index.tsx
src/pages/payandSettle/creditManage/quotaPr2/index.tsx
+2
-2
index.tsx
src/pages/payandSettle/creditManage/quotaPr3/index.tsx
+2
-2
index.tsx
src/pages/payandSettle/creditManage/quotaPrConfirm/index.tsx
+2
-2
index.tsx
src/pages/payandSettle/creditManage/quotaPrSubmit/index.tsx
+2
-2
request.ts
src/utils/request.ts
+3
-1
No files found.
src/constants/index.ts
View file @
47220d90
...
...
@@ -483,17 +483,17 @@ export const ORDER_TYPE2_SPOT = 3;
*/
export
const
ORDER_TYPE2_CENTRALIZED
=
4
;
/**
* 积分兑换
*/
export
const
ORDER_TYPE2_POINTS
=
5
;
/**
* 渠道直采
*/
export
const
ORDER_TYPE2_CHANNEL_DIRECT
=
6
;
export
const
ORDER_TYPE2_CHANNEL_DIRECT
=
5
;
/**
* 渠道现货
*/
export
const
ORDER_TYPE2_CHANNEL_SPOT
=
7
;
export
const
ORDER_TYPE2_CHANNEL_SPOT
=
6
;
/**
* 积分兑换
*/
export
const
ORDER_TYPE2_POINTS
=
7
;
/**
* 渠道积分兑换
*/
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
47220d90
...
...
@@ -464,20 +464,22 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
* 获取支付方式
* @param memberId
*/
const
getPayWayListByMemberId
=
(
memberId
:
number
)
=>
{
const
getPayWayListByMemberId
=
(
memberId
:
number
,
memberRoleId
:
number
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
memberId
)
{
resolve
([])
return
}
const
param
:
any
=
{
memberId
memberId
,
memberRoleId
}
PublicApi
.
getPayPayWayList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
initPayWayList
(
res
.
data
))
}
else
{
resolve
([])
message
.
error
(
res
.
message
)
reject
()
}
})
})
...
...
@@ -593,7 +595,11 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
orderList
:
buyOrderlist
}]
}
buyOrderInfo
.
payWayList
=
await
getPayWayListByMemberId
(
selectItem
.
memberId
)
try
{
buyOrderInfo
.
payWayList
=
await
getPayWayListByMemberId
(
selectItem
.
memberId
,
selectItem
.
memberRoleId
)
}
catch
(
error
)
{
return
}
const
param
:
any
=
{
productIds
,
...
...
src/pages/payandSettle/creditApplication/components/OuterCirculationRecord/index.tsx
View file @
47220d90
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 15:04:46
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
0-26 18:54:44
* @LastEditTime: 2020-1
2-15 18:20:12
* @Description: 外部流转记录
*/
import
React
from
'react'
;
...
...
@@ -45,7 +45,7 @@ const OuterCirculationRecord: React.FC<OuterCirculationRecordProps> = ({
title
:
'状态'
,
dataIndex
:
'status'
,
align
:
'center'
,
render
:
text
=>
<
StatusTag
type=
{
text
}
title=
{
CREDIT_OUTER_STATUS
[
text
]
}
/>
render
:
text
=>
<
StatusTag
type=
{
CREDIT_OUTER_STATUS_TAG_MAP
[
text
]
}
title=
{
CREDIT_OUTER_STATUS
[
text
]
}
/>
},
{
title
:
'操作'
,
...
...
src/pages/payandSettle/creditApplication/quotaFormQuery/index.tsx
View file @
47220d90
...
...
@@ -104,8 +104,8 @@ const QuotaFormQuery: React.FC = () => {
const
{
startTime
,
endTime
,
...
rest
}
=
params
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditApplyPageCreditApply
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
start
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
endTime
?
moment
(
+
end
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
...
rest
,
})
.
then
(
res
=>
{
...
...
src/pages/payandSettle/creditApplication/quotaMenage/detail/components/BillInfo/index.tsx
View file @
47220d90
...
...
@@ -30,12 +30,12 @@ const BillInfo: React.FC<BillInfoProps> = ({
const
[
voucherVisible
,
setVoucherVisible
]
=
useState
(
false
);
const
handleCheckVoucher
=
record
=>
{
if
(
!
Array
.
isArray
(
record
))
{
setCurrentVoucher
([])
;
}
else
{
if
(
!
Array
.
isArray
(
record
)
||
!
record
.
length
)
{
return
;
}
const
voucher
=
record
.
map
(
item
=>
normalizeFiledata
(
item
.
proveUrl
));
setCurrentVoucher
(
voucher
);
}
setVoucherVisible
(
true
);
};
...
...
src/pages/payandSettle/creditApplication/quotaMenage/detail/components/IntroduceRow/index.tsx
View file @
47220d90
...
...
@@ -21,6 +21,7 @@ import NiceForm from '@/components/NiceForm';
import
{
repaymentModalSchema
,
uploadVoucherModalSchema
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects/repayment'
;
import
TradeRecord
,
{
RecordParams
,
RecordRes
}
from
'../TradeRecord'
;
import
WxPayModal
from
'../WxPayModal'
;
import
styles
from
'./index.less'
;
const
repaymentFormActions
=
createFormActions
();
...
...
@@ -125,6 +126,11 @@ interface IntroduceRowState {
};
repaymentSubmitLoading
:
boolean
;
uploadVoucherSubmitLoading
:
boolean
;
wxPayVisible
:
boolean
;
wxPayUrl
:
string
;
wxPayPrice
:
number
;
};
class
IntroduceRow
extends
React
.
Component
<
IntroduceRowProps
,
IntroduceRowState
>
{
...
...
@@ -151,11 +157,19 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
},
repaymentSubmitLoading
:
false
,
uploadVoucherSubmitLoading
:
false
,
wxPayVisible
:
false
,
wxPayUrl
:
''
,
wxPayPrice
:
0
,
};
}
tradeRecordRef
=
null
;
/**
* 还款记录id
*/
payRecordId
=
''
;
// 获取账单详情
getBillDetail
=
id
=>
{
const
{
fetchBillDetail
}
=
this
.
props
;
...
...
@@ -179,7 +193,7 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
return
;
}
PublicApi
.
getSettleAccountsCorporateAccountConfig
({
memberId
:
payee
,
memberId
:
`
${
payee
}
`
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
this
.
setState
({
...
...
@@ -218,12 +232,12 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
this
.
setState
({
visibleRecord
:
e
.
target
.
checked
});
};
handleRepayment
=
()
=>
{
this
.
setState
({
visibleRepayment
:
true
});
handleRepayment
=
flag
=>
{
this
.
setState
({
visibleRepayment
:
!!
flag
});
};
handleRepaymentSubmit
=
values
=>
{
const
{
tradeType
}
=
values
;
const
{
tradeType
,
tradeChannel
}
=
values
;
const
{
billId
}
=
this
.
state
;
switch
(
tradeType
)
{
...
...
@@ -234,8 +248,22 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
billId
,
...
values
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
!==
1000
)
{
return
;
}
message
.
destroy
();
this
.
setState
({
visibleRepayment
:
false
});
switch
(
tradeChannel
)
{
// 微信支付
case
1
:
{
this
.
setState
({
wxPayPrice
:
values
.
repayQuota
,
wxPayUrl
:
res
.
data
.
payQRCode
,
});
this
.
payRecordId
=
`
${
res
.
data
.
recordId
}
`
;
this
.
handleWxPayVisible
(
true
);
}
}
}).
finally
(()
=>
{
this
.
setState
({
repaymentSubmitLoading
:
false
});
...
...
@@ -280,6 +308,7 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
if
(
res
.
code
===
1000
)
{
this
.
setState
({
visibleRepayment
:
false
});
this
.
setState
({
visibleUploadVoucher
:
false
});
this
.
getBillDetail
(
this
.
state
.
billId
);
}
}).
finally
(()
=>
{
this
.
setState
({
uploadVoucherSubmitLoading
:
false
});
...
...
@@ -320,6 +349,43 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
});
};
handleWxPayVisible
=
flag
=>
{
this
.
setState
({
wxPayVisible
:
!!
flag
});
};
handleCheckResult
=
():
Promise
<
{
success
:
Boolean
}
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditApplyGetCreditRepayResult
({
recordId
:
`
${
this
.
payRecordId
}
`
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
resolve
({
success
:
false
});
}
else
{
// 3 - 确认到账
if
(
res
.
data
.
status
===
3
)
{
resolve
({
success
:
true
})
}
else
{
resolve
({
success
:
false
});
}
}
}).
catch
(
err
=>
{
reject
(
err
);
});
});
};
handleWxPaySuccess
=
()
=>
{
message
.
success
(
'支付成功'
);
this
.
handleWxPayVisible
(
false
);
this
.
getBillDetail
(
this
.
state
.
billId
);
};
handleWxPayFail
=
()
=>
{
message
.
success
(
'支付失败,请重试 或 选择其他支付方式'
);
this
.
handleWxPayVisible
(
false
);
this
.
handleRepayment
(
true
);
};
render
()
{
const
{
quotaData
=
[],
...
...
@@ -336,8 +402,20 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
visibleUploadVoucher
,
repaymentSubmitLoading
,
uploadVoucherSubmitLoading
,
wxPayVisible
,
wxPayUrl
,
wxPayPrice
,
}
=
this
.
state
;
const
WxPayModalPros
=
{
url
:
wxPayUrl
,
visible
:
wxPayVisible
,
price
:
wxPayPrice
,
onCancel
:
()
=>
this
.
handleWxPayVisible
(
false
),
onCheckResult
:
this
.
handleCheckResult
,
onSuccess
:
this
.
handleWxPaySuccess
,
};
return
(
<>
<
Row
...
...
@@ -443,7 +521,7 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
</
div
>
</
div
>
<
div
className=
{
styles
[
'repayment-right'
]
}
>
<
Button
type=
"primary"
onClick=
{
this
.
handleRepayment
}
>
立即还款
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
this
.
handleRepayment
(
true
)
}
>
立即还款
</
Button
>
</
div
>
</
div
>
</
Col
>
...
...
@@ -559,6 +637,10 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
onSubmit=
{
this
.
handleUploadVoucherSubmit
}
/>
</
Modal
>
<
WxPayModal
{
...
WxPayModalPros
}
/>
</>
);
};
...
...
src/pages/payandSettle/creditApplication/quotaMenage/detail/components/TradeRecord/index.tsx
View file @
47220d90
...
...
@@ -131,12 +131,12 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
};
handleCheckVoucher
=
record
=>
{
if
(
!
Array
.
isArray
(
record
))
{
this
.
setState
({
currentVoucher
:
[]
})
;
}
else
{
if
(
!
Array
.
isArray
(
record
)
||
!
record
.
length
)
{
return
;
}
const
voucher
=
record
.
map
(
item
=>
normalizeFiledata
(
item
.
proveUrl
));
this
.
setState
({
currentVoucher
:
voucher
});
}
this
.
setState
({
voucherVisible
:
true
});
};
...
...
src/pages/payandSettle/creditApplication/quotaMenage/detail/components/WxPayModal/index.less
0 → 100644
View file @
47220d90
.common_title {
font-size: 14px;
color: #303133;
line-height: 14px;
display: flex;
align-items: center;
&_icon {
color: #909399;
margin-left: 6px;
cursor: pointer;
margin-right: 5px;
&>img {
width: 20px;
height: 20px;
}
}
& > span {
font-weight: 500;
}
&_amount {
margin-left: auto;
color: #606266;
& > span {
color: #D32F2F;
font-size: 20px;
margin: 0 5px;
}
}
&_btn {
margin-left: auto;
cursor: pointer;
&:hover {
opacity: .8;
}
}
}
.wechat_payway {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
&_title {
color: #909399;
font-size: 12px;
padding-top: 16px;
padding-bottom: 20px;
}
&_imgbox {
width: 200px;
height: 200px;
border: 1px solid rgba(245, 245, 245, 1);
& > img {
height: 100%;
width: 100%;
}
}
&_needpay {
color: #606266;
font-size: 12px;
margin-top: 28px;
& > span {
color: #D32F2F;
font-size: 20px;
margin: 0 5px;
}
}
}
\ No newline at end of file
src/pages/payandSettle/creditApplication/quotaMenage/detail/components/WxPayModal/index.tsx
0 → 100644
View file @
47220d90
/*
* @Author: XieZhiXiong
* @Date: 2020-12-16 11:07:13
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-16 15:09:21
* @Description: 微信支付弹窗
*/
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Modal
,
Upload
}
from
'antd'
;
import
QRCode
from
'qrcode'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
WechatIcon
from
'@/assets/imgs/wechat_icon.png'
;
import
styles
from
'./index.less'
;
interface
WxPayModalProps
{
/**
* 需要生成 二维码的 地址
*/
url
:
string
;
/**
* 支付金额
*/
price
:
number
;
/**
* 是否可见
*/
visible
:
boolean
;
/**
* 弹窗取消事件
*/
onCancel
:
()
=>
void
;
/**
* 轮训查询支付结果事件
*/
onCheckResult
:
()
=>
Promise
<
{
success
:
Boolean
}
>
;
/**
* 轮训查询支付结果成功
*/
onSuccess
?:
()
=>
void
;
/**
* 轮训查询支付结果失败
*/
onFail
?:
()
=>
void
;
};
const
WxPayModal
:
React
.
FC
<
WxPayModalProps
>
=
({
url
,
price
,
visible
,
onCancel
,
onCheckResult
,
onSuccess
,
onFail
,
})
=>
{
const
[
qrCode
,
setQrCode
]
=
useState
<
string
>
(
''
);
const
getQRCode
=
async
params
=>
{
if
(
!
params
)
{
return
;
}
// 生成二维码
const
res
=
await
QRCode
.
toDataURL
(
params
);
setQrCode
(
res
);
};
let
timer
=
useRef
(
null
);
// 最多请求3600次,2000毫秒一次,二维码过期两小时
let
count
=
0
;
const
handleCheckResult
=
()
=>
{
if
(
!
onCheckResult
)
{
return
;
}
count
++
;
if
(
count
>
3600
)
{
return
;
}
onCheckResult
().
then
(
res
=>
{
if
(
!
res
.
success
)
{
timer
.
current
=
setTimeout
(()
=>
{
handleCheckResult
();
},
2000
);
console
.
log
(
'timer'
,
timer
)
}
else
{
clearTimeout
(
timer
.
current
);
timer
=
null
;
if
(
onSuccess
)
{
onSuccess
();
}
}
});
};
useEffect
(()
=>
{
getQRCode
(
url
);
if
(
url
)
{
handleCheckResult
();
}
return
()
=>
{
if
(
timer
.
current
)
{
clearTimeout
(
timer
.
current
);
timer
.
current
=
null
;
}
};
},
[
url
]);
useEffect
(()
=>
{
if
(
!
visible
)
{
console
.
log
(
'隐藏咯'
)
console
.
log
(
'timer'
,
timer
.
current
)
if
(
timer
.
current
)
{
clearTimeout
(
timer
.
current
);
timer
.
current
=
null
;
}
}
},
[
visible
]);
const
handleCancel
=
()
=>
{
if
(
onCancel
)
{
onCancel
();
}
};
return
(
<
Modal
title=
{
(
<
div
className=
{
styles
.
common_title
}
>
<
div
className=
{
styles
.
common_title_icon
}
><
img
src=
{
WechatIcon
}
/></
div
>
<
span
>
微信支付
</
span
>
</
div
>
)
}
width=
{
576
}
visible=
{
visible
}
onCancel=
{
handleCancel
}
footer=
{
null
}
maskClosable=
{
false
}
destroyOnClose
>
<
div
className=
{
styles
.
wechat_payway
}
>
<
p
className=
{
styles
.
wechat_payway_title
}
>
使用微信扫一扫下方二维码
</
p
>
<
div
className=
{
styles
.
wechat_payway_imgbox
}
>
{
qrCode
&&
<
img
src=
{
qrCode
}
/>
}
</
div
>
<
div
className=
{
styles
.
wechat_payway_needpay
}
>
<
label
>
当前需支付:
</
label
>
<
span
>
{
priceFormat
(
price
)
}
</
span
>
<
label
>
RMB
</
label
>
</
div
>
</
div
>
</
Modal
>
);
};
export
default
WxPayModal
;
\ No newline at end of file
src/pages/payandSettle/creditApplication/quotaMenage/index.tsx
View file @
47220d90
...
...
@@ -98,7 +98,7 @@ const QuotaMenage: React.FC = () => {
render
:
(
text
,
record
)
=>
(
<
Progress
type=
"circle"
percent=
{
Math
.
floor
(
record
.
useQuota
/
record
.
quota
)
*
100
}
percent=
{
record
.
useQuota
/
record
.
quota
*
100
}
strokeColor=
"#41CC9E"
strokeWidth=
{
12
}
width=
{
40
}
...
...
src/pages/payandSettle/creditApplication/quotaPrSubmit/index.tsx
View file @
47220d90
...
...
@@ -197,7 +197,7 @@ const QuotaPrSubmit: React.FC = () => {
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditApplyPageWaitSubmitCreditApply
({
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
+
start
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
endTime
?
moment
(
+
end
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
...
rest
,
})
.
then
(
res
=>
{
...
...
src/pages/payandSettle/creditManage/quotaFormQuery/index.tsx
View file @
47220d90
...
...
@@ -106,8 +106,8 @@ const QuotaFormQuery: React.FC = () => {
const
{
startTime
,
endTime
,
...
rest
}
=
params
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditHandlePageCreditChildApply
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
endTime
?
moment
(
+
endTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
...
rest
,
})
.
then
(
res
=>
{
...
...
src/pages/payandSettle/creditManage/quotaMenage/index.tsx
View file @
47220d90
...
...
@@ -150,7 +150,7 @@ const QuotaMenage: React.FC = () => {
render
:
(
text
,
record
)
=>
(
<
Progress
type=
"circle"
percent=
{
Math
.
floor
(
record
.
useQuota
/
record
.
quota
)
*
100
}
percent=
{
record
.
useQuota
/
record
.
quota
*
100
}
strokeColor=
"#41CC9E"
strokeWidth=
{
12
}
width=
{
40
}
...
...
@@ -276,6 +276,27 @@ const QuotaMenage: React.FC = () => {
return
{};
};
// 初始化高级筛选会员选项
const
fetchSearchMemberItems
=
async
()
=>
{
const
res
=
await
PublicApi
.
getMemberManagePageitems
();
if
(
res
.
code
===
1000
)
{
const
{
data
=
{}
}:
any
=
res
;
const
{
memberTypes
=
[],
roles
=
[],
levels
=
[],
}
=
data
;
return
{
memberTypeName
:
memberTypes
.
map
(
item
=>
({
label
:
item
.
memberTypeName
,
value
:
item
.
memberTypeId
})),
memberRoleName
:
roles
.
map
(
item
=>
({
label
:
item
.
roleName
,
value
:
item
.
roleId
})),
memberLevelName
:
levels
.
map
(
item
=>
({
label
:
item
.
levelTag
,
value
:
item
.
level
})),
};
}
return
{};
};
const
handleSentMsg
=
()
=>
{
setCollectionModalVisible
(
false
);
setSuccessModalVisible
(
true
);
...
...
@@ -303,9 +324,13 @@ const QuotaMenage: React.FC = () => {
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
[
'
innerStatus'
,
'outerS
tatus'
],
[
'
rePayStatus'
,
's
tatus'
],
fetchSearchItems
,
);
useAsyncInitSelect
(
[
'memberLevelName'
,
'memberTypeName'
,
'memberRoleName'
],
fetchSearchMemberItems
,
);
}
}
schema=
{
listSearchSchema
}
/>
...
...
src/pages/payandSettle/creditManage/quotaPr1/index.tsx
View file @
47220d90
...
...
@@ -125,8 +125,8 @@ const QuotaPr1: React.FC = () => {
const
{
startTime
,
endTime
,
applyType
=
0
,
...
rest
}
=
params
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditHandlePageCreditChildWaitVerifyApplyStepOne
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
start
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
endTime
?
moment
(
+
end
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
applyType
,
...
rest
,
})
...
...
src/pages/payandSettle/creditManage/quotaPr2/index.tsx
View file @
47220d90
...
...
@@ -125,8 +125,8 @@ const QuotaPr1: React.FC = () => {
const
{
startTime
,
endTime
,
applyType
=
0
,
...
rest
}
=
params
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditHandlePageCreditChildWaitVerifyApplyStepTwo
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
start
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
endTime
?
moment
(
+
end
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
applyType
,
...
rest
,
})
...
...
src/pages/payandSettle/creditManage/quotaPr3/index.tsx
View file @
47220d90
...
...
@@ -125,8 +125,8 @@ const QuotaPr3: React.FC = () => {
const
{
startTime
,
endTime
,
applyType
=
0
,
...
rest
}
=
params
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditHandlePageCreditChildWaitVerifyApplyStepThree
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
start
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
endTime
?
moment
(
+
end
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
applyType
,
...
rest
,
})
...
...
src/pages/payandSettle/creditManage/quotaPrConfirm/index.tsx
View file @
47220d90
...
...
@@ -125,8 +125,8 @@ const QuotaPrConfirm: React.FC = () => {
const
{
startTime
,
endTime
,
applyType
=
0
,
...
rest
}
=
params
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditHandlePageCreditChildWaitConfirmVerifyApply
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
start
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
endTime
?
moment
(
+
end
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
applyType
,
...
rest
,
})
...
...
src/pages/payandSettle/creditManage/quotaPrSubmit/index.tsx
View file @
47220d90
...
...
@@ -125,8 +125,8 @@ const QuotaPrSubmit: React.FC = () => {
const
{
startTime
,
endTime
,
applyType
=
0
,
...
rest
}
=
params
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getPayCreditHandlePageCreditChildWaitSubmitApply
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
start
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
endTime
?
moment
(
+
end
Time
).
format
(
'YYYY-MM-DD'
)
:
null
,
applyType
,
...
rest
,
})
...
...
src/utils/request.ts
View file @
47220d90
...
...
@@ -137,7 +137,9 @@ class ApiRequest {
}
else
{
// 使用resolve将数据返回, 请求时需手动处理data为null的情况
resolve
(
res
)
options
.
ctlType
===
'message'
&&
message
.
info
(
res
.
message
)
// 这是展示接口错误信息,任何 ctlType 都可以,不然一些 get 请求出错了
// 错误信息无法展示给用户
res
.
message
&&
message
.
info
(
res
.
message
)
}
}).
catch
((
err
:
IRequestError
)
=>
{
...
...
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