Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
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
bp
op-web-service
Commits
2c56e5b5
Commit
2c56e5b5
authored
Aug 23, 2021
by
pengyunqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:提现审核迭代风控与失败原因
parent
bc46526a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
186 additions
and
29 deletions
+186
-29
withdrawal.js
server/controllers/withdrawal.js
+21
-0
router.js
server/router.js
+2
-0
index.vue
src/pages/Groupmeal/components/Pagination/index.vue
+0
-1
index.less
src/pages/Withdrawal/Examine/index.less
+10
-1
index.vue
src/pages/Withdrawal/Examine/index.vue
+143
-27
withdrawal.js
src/service/Withdrawal/withdrawal.js
+10
-0
No files found.
server/controllers/withdrawal.js
View file @
2c56e5b5
...
...
@@ -114,6 +114,27 @@ exports.getReblackList = async ctx => {
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
// 获取钱包账户余额状态
exports
.
getWalletAccountStatus
=
async
ctx
=>
{
const
url
=
`
${
WITHDRAWAL_URI
}
/wallet/background/get_wallet_account_status`
;
const
opts
=
{
url
,
method
:
"GET"
,
qs
:
ctx
.
request
.
query
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
// 钱包账户余额状态
exports
.
resetAccountStatus
=
async
ctx
=>
{
const
url
=
`
${
WITHDRAWAL_URI
}
/wallet/background/reset_wallet_account_status`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
const
getUserPermission
=
async
(
ctx
)
=>
{
const
url
=
`
${
WITHDRAWAL_URI
}
/merchant/authority/get_role_list`
;
...
...
server/router.js
View file @
2c56e5b5
...
...
@@ -124,5 +124,7 @@ router.get(`${API_VERSION}/get_account_list`, withdrawal.getAccountList)
router
.
get
(
`
${
API_VERSION
}
/get_record_list`
,
withdrawal
.
getRecordList
)
router
.
post
(
`
${
API_VERSION
}
/get_account_black_list`
,
withdrawal
.
getAccountBlackList
)
router
.
post
(
`
${
API_VERSION
}
/get_reblack_list`
,
withdrawal
.
getReblackList
)
router
.
get
(
`
${
API_VERSION
}
/get_wallet_account_status`
,
withdrawal
.
getWalletAccountStatus
)
router
.
post
(
`
${
API_VERSION
}
/reset_wallet_account_status`
,
withdrawal
.
resetAccountStatus
)
module
.
exports
=
router
;
\ No newline at end of file
src/pages/Groupmeal/components/Pagination/index.vue
View file @
2c56e5b5
...
...
@@ -5,7 +5,6 @@
class=
"pagination"
layout=
"prev, pager, next, jumper, ->,page , total"
v-bind=
"$attrs"
v-on=
"$listener"
>
</el-pagination>
</div>
...
...
src/pages/Withdrawal/Examine/index.less
View file @
2c56e5b5
...
...
@@ -52,7 +52,7 @@
padding-right: 10px;
}
.list-right {
display:inline-block;
//
display:inline-block;
width: 70%;
}
}
...
...
@@ -108,3 +108,12 @@
width: 20vw;
margin: 0 auto;
}
.shell {
float: right;
width: 550px;
margin-top: -20px;
}
.open {
float: right;
margin-bottom: 10px;
}
src/pages/Withdrawal/Examine/index.vue
View file @
2c56e5b5
...
...
@@ -7,6 +7,11 @@
@
tab-click=
"handleTabChange"
v-model=
"searchProps.status"
>
<!--
<el-tab-pane
label=
"风控审核"
:name=
"TABS.riskControl"
@
tab-click=
"handleTabChange"
></el-tab-pane>
-->
<el-tab-pane
label=
"待审核"
:name=
"TABS.pending"
...
...
@@ -31,15 +36,19 @@
</el-tabs>
</div>
<!-- 提现失败页 -->
<!--
<auditTab
v-if=
"status_text == 'fourth'"
></auditTab>
-->
<el-card
class=
"goods"
>
<!-- 筛选区 -->
<el-form
inline
class=
"search_condition"
>
<!-- 用户id -->
<el-form-item
label=
"用户id"
>
<el-input
v-model=
"searchProps.user_id"
@
input=
"
searchProps.user_id = $event
.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, '')
<el-input
clearable
v-model=
"searchProps.user_id"
@
input=
"
searchProps.user_id = $event.replace(
/[^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac\r\n]/g,
''
)
"
></el-input>
</el-form-item>
...
...
@@ -50,6 +59,43 @@
>
查询
</el-button
>
</el-form>
<div
class=
"shell"
v-if=
"searchProps.status == TABS.failed"
>
<div
class=
"open"
v-for=
"(item, index) in balance"
:key=
"index"
>
<span>
{{
item
.
account
}}
商户号余额不足,请在充值后操作开启
</span>
<el-button
type=
"primary"
@
click=
"handleResetStatus(item.id)"
style=
"margin-left: 10px"
>
开启
</el-button
>
</div>
</div>
<!-- 风控审核列表 -->
<!--
<el-table
class=
"goods_list"
:data=
"goodsList"
border
stripe
v-if=
"searchProps.status == TABS.riskControl"
style=
"width: 100%"
>
<el-table-column
label=
"提现用户"
prop=
"user_id"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"风控状态"
prop=
"status_text"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"所在圈"
prop=
"city_name"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"提现登录地点"
prop=
"withdraw_address"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"提现金额"
prop=
"amount"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"申请时间"
prop=
"create_time"
align=
"center"
>
</el-table-column>
</el-table>
-->
<!-- 列表区 -->
<el-table
class=
"goods_list"
:data=
"goodsList"
border
stripe
>
<el-table-column
...
...
@@ -67,6 +113,11 @@
prop=
"withdraw_address"
align=
"center"
></el-table-column>
<el-table-column
label=
"风控等级"
prop=
"risk_level_text"
align=
"center"
></el-table-column>
<el-table-column
label=
"提现金额"
prop=
"amount"
...
...
@@ -76,31 +127,37 @@
label=
"最近24小时收入"
prop=
"lately_amount"
align=
"center"
v-if=
"searchProps.status !== TABS.failed"
></el-table-column>
<el-table-column
label=
"近两天分享增长"
prop=
"lately_share"
align=
"center"
v-if=
"searchProps.status !== TABS.failed"
></el-table-column>
<el-table-column
label=
"近两天分享下载量"
prop=
"lately_download"
align=
"center"
v-if=
"searchProps.status !== TABS.failed"
></el-table-column>
<el-table-column
label=
"历史分享增长"
prop=
"history_share"
align=
"center"
v-if=
"searchProps.status !== TABS.failed"
></el-table-column>
<el-table-column
label=
"历史分享下载量"
prop=
"history_download"
align=
"center"
v-if=
"searchProps.status !== TABS.failed"
></el-table-column>
<el-table-column
label=
"历史下载留存"
prop=
"history_download_keep"
align=
"center"
v-if=
"searchProps.status !== TABS.failed"
></el-table-column>
<el-table-column
label=
"申请时间"
...
...
@@ -109,6 +166,12 @@
></el-table-column>
<el-table-column
label=
"状态"
prop=
"status_text"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"提现失败原因"
prop=
"desc"
align=
"center"
v-if=
"searchProps.status == TABS.failed"
></el-table-column>
<el-table-column
label=
"审核时间"
prop=
"withdraw_audit_time"
...
...
@@ -122,10 +185,7 @@
<!-- 操作快捷键 -->
<el-table-column
label=
"操作"
align=
"center"
width=
"130"
>
<template
v-slot:default=
"scope"
>
<el-button
type=
"text"
@
click=
"handleDetail('look', scope.row.id)"
v-show=
"searchProps.status !== '3'"
<el-button
type=
"text"
@
click=
"handleDetail('look', scope.row.id)"
>
查看
</el-button
>
<el-button
...
...
@@ -197,7 +257,15 @@
<ul
class=
"listShow"
>
<li>
<span
class=
"list-left"
>
登录地点 :
</span>
<span
class=
"list-right"
>
{{ dialogData.showData.withdraw_address }}
</span>
<span
class=
"list-right"
>
{{
dialogData.showData.withdraw_address
}}
</span>
</li>
<li>
<span
class=
"list-left"
>
风控等级 :
</span>
<span
class=
"list-right"
>
{{
dialogData.showData.risk_level_text
}}
</span>
</li>
<li>
<span
class=
"list-left"
>
提现金额 :
</span>
...
...
@@ -233,6 +301,10 @@
dialogData.showData.history_download_keep
}}
</span>
</li>
<li
v-if=
"searchProps.status == TABS.failed"
>
<span
class=
"list-left"
>
失败原因 :
</span
><span
class=
"list-right"
>
{{ dialogData.showData.desc }}
</span>
</li>
</ul>
<el-form-item
class=
"text-area"
label=
"奖励明细:"
>
<el-table
...
...
@@ -301,6 +373,8 @@ import {
getApplyDetail
,
getFreezingFund
,
getRolesForUser
,
getWalletAccountStatus
,
resetAccountStatus
,
}
from
"@/service/Withdrawal/withdrawal"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
fetchCurrentUser
}
from
"../../../service/user"
;
...
...
@@ -311,6 +385,7 @@ const TABS = {
passed
:
"1"
,
rejected
:
"2"
,
failed
:
"3"
,
// riskControl: "10",
};
export
default
{
...
...
@@ -358,13 +433,16 @@ export default {
award
:
""
,
//奖励明细
outerVisible
:
false
,
//外层弹框
permissions
:
[],
// constants
TABS
,
id
:
""
,
status
:
0
,
balance
:
[],
};
},
created
()
{
this
.
getApplyList
();
this
.
getWalletAccountStatus
();
},
async
mounted
()
{
const
res
=
await
this
.
getPermissionsAll
();
...
...
@@ -425,13 +503,28 @@ export default {
}
},
// 二次确认弹框
handleConfirm
(
action
,
params
)
{
handleConfirm
(
action
,
params
,
successCb
=
()
=>
{
this
.
getApplyList
();
this
.
outerVisible
=
false
;
}
)
{
const
urlObj
=
{
黑名单
:
getBlackList
,
通过
:
getWithdrawAudit
,
拒绝
:
getWithdrawAudit
,
开启
:
resetAccountStatus
,
};
this
.
$confirm
(
`<p>你确定此操作吗</p><p>
${
action
}
</p>`
,
"再次确认"
,
{
this
.
$confirm
(
`
${
this
.
searchProps
.
status
==
TABS
.
failed
?
"确认已完成商户号充值"
:
`<p>你确定此操作吗</p><p>
${
action
}
</p>`
}
`
,
"再次确认"
,
{
confirmButtonText
:
"取消"
,
cancelButtonText
:
"确定"
,
cancelButtonClass
:
"cancel"
,
...
...
@@ -441,7 +534,8 @@ export default {
center
:
true
,
showClose
:
false
,
type
:
"warning"
,
})
}
)
.
then
(()
=>
{
this
.
$message
({
type
:
"info"
,
...
...
@@ -451,8 +545,7 @@ export default {
.
catch
(
async
()
=>
{
try
{
const
res
=
await
urlObj
[
action
](
params
);
this
.
getApplyList
();
this
.
outerVisible
=
false
;
successCb
();
this
.
$message
({
type
:
"success"
,
message
:
"操作成功"
,
...
...
@@ -508,10 +601,30 @@ export default {
ElMessage
.
error
(
"请求查询列表失败"
);
}
},
// 获取钱包账户余额状态
async
getWalletAccountStatus
()
{
try
{
const
res
=
await
getWalletAccountStatus
({
id
:
this
.
id
,
status
:
this
.
status
,
});
this
.
balance
=
res
.
result
.
filter
((
item
)
=>
!!
item
.
status
);
console
.
log
(
res
);
console
.
log
(
this
.
balance
);
}
catch
(
error
)
{
ElMessage
.
error
(
"请求账户余额状态失败"
);
}
},
// 查询
findProducts
()
{
this
.
getApplyList
();
},
// 开启按钮
handleResetStatus
(
id
)
{
this
.
handleConfirm
(
"开启"
,
{
id
},
()
=>
{
this
.
getWalletAccountStatus
();
});
},
// 解冻
async
handleFinzingFind
(
id
)
{
try
{
...
...
@@ -553,7 +666,9 @@ export default {
const
WITHDRAWAL_PERMISSION_ID1
=
10000005
;
let
withdrawlPermission
=
this
.
permissions
.
filter
(
(
item
)
=>
(
item
.
id
===
WITHDRAWAL_PERMISSION_ID
||
item
.
id
===
WITHDRAWAL_PERMISSION_ID1
)
(
item
)
=>
item
.
id
===
WITHDRAWAL_PERMISSION_ID
||
item
.
id
===
WITHDRAWAL_PERMISSION_ID1
);
// 无此模块权限
if
(
withdrawlPermission
.
length
===
0
)
{
...
...
@@ -563,7 +678,8 @@ export default {
const
AUDIT_PERMSSION_ID
=
14
;
const
AUDIT_PERMSSION_ID1
=
10000014
;
const
auditPermission
=
withdrawlPermission
[
0
].
sub_permissions
.
filter
(
(
item
)
=>
(
item
.
id
===
AUDIT_PERMSSION_ID
||
item
.
id
===
AUDIT_PERMSSION_ID1
)
(
item
)
=>
item
.
id
===
AUDIT_PERMSSION_ID
||
item
.
id
===
AUDIT_PERMSSION_ID1
);
return
auditPermission
.
length
!==
0
;
...
...
src/service/Withdrawal/withdrawal.js
View file @
2c56e5b5
...
...
@@ -68,3 +68,13 @@ export async function getReblackList(params) {
const
res
=
await
axios
.
post
(
"/api/v1/get_reblack_list"
,
params
)
return
res
;
}
// 获取钱包账户余额状态
export
async
function
getWalletAccountStatus
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/get_wallet_account_status"
,{
params
})
return
res
;
}
// 钱包账户余额状态(开启按钮)
export
async
function
resetAccountStatus
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/reset_wallet_account_status"
,
params
)
return
res
;
}
\ No newline at end of file
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