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
99de2d0e
Commit
99de2d0e
authored
Aug 12, 2021
by
pengyunqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:流水列表
parent
bc73d18f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
148 additions
and
241 deletions
+148
-241
withdrawal.js
server/controllers/withdrawal.js
+11
-0
router.js
server/router.js
+1
-0
index.vue
src/pages/Withdrawal/Examine/index.vue
+5
-0
flowRecord.vue
src/pages/Withdrawal/walletAccount/flowRecord.vue
+64
-23
index.vue
src/pages/Withdrawal/walletAccount/index.vue
+60
-218
withdrawal.js
src/service/Withdrawal/withdrawal.js
+7
-0
No files found.
server/controllers/withdrawal.js
View file @
99de2d0e
...
...
@@ -70,6 +70,7 @@ exports.getApplyDetail = async ctx => {
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
// 提现审核迭代
// 获取钱包账户列表
exports
.
getAccountList
=
async
ctx
=>
{
...
...
@@ -81,6 +82,16 @@ exports.getAccountList = async ctx => {
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
// 获取钱包账户流水列表
exports
.
getRecordList
=
async
ctx
=>
{
const
url
=
`
${
WITHDRAWAL_URI
}
/wallet/background/record_list`
;
const
opts
=
{
url
,
method
:
"GET"
,
qs
:
ctx
.
request
.
query
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
const
getUserPermission
=
async
(
ctx
)
=>
{
const
url
=
`
${
WITHDRAWAL_URI
}
/merchant/authority/get_role_list`
;
...
...
server/router.js
View file @
99de2d0e
...
...
@@ -89,5 +89,6 @@ router.post(`${API_VERSION}/get_freezing_fund`, withdrawal.getFreezingFund)
router
.
get
(
`
${
API_VERSION
}
/get_apply_detail`
,
withdrawal
.
getApplyDetail
)
// 钱包账户
router
.
get
(
`
${
API_VERSION
}
/get_account_list`
,
withdrawal
.
getAccountList
)
router
.
get
(
`
${
API_VERSION
}
/get_record_list`
,
withdrawal
.
getRecordList
)
module
.
exports
=
router
;
src/pages/Withdrawal/Examine/index.vue
View file @
99de2d0e
...
...
@@ -62,6 +62,11 @@
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"
...
...
src/pages/Withdrawal/walletAccount/flowRecord.vue
View file @
99de2d0e
...
...
@@ -2,56 +2,55 @@
<el-card
class=
"role_management"
>
<!-- 检索区域 -->
<div
class=
"creatRole"
>
<el-form
:model=
"searchForm"
>
<el-form>
<el-form-item
label=
"用户Id"
>
<span>
</span>
<span>
{{
user_id
}}
</span>
</el-form-item>
<el-form-item
label=
"交易类型"
>
<el-select
v-model=
"
searchForm
"
>
<el-option
label=
"
提现
"
:value=
"1"
></el-option>
<el-option
label=
"
转账
"
:value=
"2"
></el-option>
<el-option
label=
"
退款"
:value=
"2
"
></el-option>
<el-select
v-model=
"
type"
clearable
@
change=
"getRecordList
"
>
<el-option
label=
"
充值
"
:value=
"1"
></el-option>
<el-option
label=
"
提现
"
:value=
"2"
></el-option>
<el-option
label=
"
转账"
:value=
"3
"
></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<!-- 用户搜索列表 -->
<el-table
border
:data=
"
management
List"
>
<el-table
border
:data=
"
record
List"
>
<el-table-column
label=
"流水号"
width=
"200px"
prop=
"
role
_id"
prop=
"
wallet_record
_id"
align=
"center"
></el-table-column>
<el-table-column
label=
"更新时间"
prop=
"
role_na
me"
prop=
"
create_ti
me"
align=
"center"
></el-table-column>
<el-table-column
label=
"金额"
prop=
"
update_time
"
prop=
"
amount
"
align=
"center"
></el-table-column>
<el-table-column
label=
"可用余额"
prop=
"
update_user_nam
e"
prop=
"
balanc
e"
align=
"center"
></el-table-column>
<el-table-column
label=
"交易类型"
prop=
"update_user_name"
align=
"center"
></el-table-column>
<el-table-column
label=
"状态"
width=
"200px"
:formatter=
"hasStatusFormat"
prop=
"trade_type"
align=
"center"
>
<template
#
default=
"scope"
>
{{
getTradeType
(
scope
.
row
.
trade_type
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
width=
"200px"
prop=
"status"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"说明"
align=
"center"
>
<el-table-column
label=
"说明"
align=
"center"
prop=
"third_order_desc"
>
</el-table-column>
</el-table>
<page
:totalNum=
"totalNum"
@
update=
"update"
/>
...
...
@@ -59,15 +58,57 @@
</template>
<
script
>
import
page
from
"../../../components/Pagination"
;
import
{
getRecordList
}
from
"@/service/Withdrawal/withdrawal"
;
const
tradeType
=
{
1
:
"充值"
,
2
:
"提现"
,
3
:
"转账"
};
export
default
{
name
:
"flowRecord"
,
components
:{
page
},
data
()
{
return
{};
return
{
user_id
:
""
,
wallet_id
:
""
,
type
:
""
,
recordList
:
[],
params
:
{
page
:
1
,
page_size
:
20
,
},
};
},
mounted
()
{},
created
()
{
this
.
user_id
=
this
.
$route
.
query
.
user_id
this
.
wallet_id
=
this
.
$route
.
query
.
wallet_id
this
.
getRecordList
();
},
methods
:
{},
methods
:
{
update
(
obj
)
{
Object
.
assign
(
this
.
params
,
obj
);
this
.
getRecordList
();
},
//获取账户流水列表
getRecordList
()
{
this
.
recordList
=
[];
let
{
page
,
page_size
}
=
this
.
params
;
let
{
wallet_id
,
type
}
=
this
;
let
params_list
=
{
wallet_id
,
page
,
page_size
,
type
,
};
getRecordList
(
params_list
).
then
((
res
)
=>
{
this
.
recordList
=
res
.
result
.
list
;
this
.
totalNum
=
res
.
result
.
count
;
});
},
// 获取交易类型
getTradeType
(
code
)
{
return
tradeType
[
code
]
},
},
};
</
script
>
...
...
src/pages/Withdrawal/walletAccount/index.vue
View file @
99de2d0e
...
...
@@ -4,14 +4,14 @@
<!-- 检索区域 -->
<div
class=
"creatRole"
>
<el-form
inline
:model=
"searchProps"
>
<el-form-item
label=
"用户Id"
>
<el-input
v-model=
"searchProps.user_id"
@
input=
"
<el-form-item
label=
"用户Id"
>
<el-input
clearable
v-model=
"searchProps.user_id"
@
input=
"
searchProps.user_id = $event
.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, '')
"
></el-input>
</el-form-item>
<el-form-item
label=
"账户状态"
>
<el-select
v-model=
"searchProps.type"
>
<el-select
v-model=
"searchProps.type"
clearable
>
<el-option
label=
"黑名单"
:value=
"2"
></el-option>
<el-option
label=
"正常用户"
:value=
"1"
></el-option>
</el-select>
...
...
@@ -36,17 +36,29 @@
label=
"账户可用金额"
prop=
"available_fund"
align=
"center"
></el-table-column>
>
<template
#
default=
"scope"
>
{{
"¥ "
+
scope
.
row
.
available_fund
}}
</
template
>
</el-table-column>
<el-table-column
label=
"账户冻结金额"
prop=
"freezing_fund"
align=
"center"
></el-table-column>
>
<
template
#
default=
"scope"
>
{{
"¥ "
+
scope
.
row
.
freezing_fund
}}
</
template
>
</el-table-column>
<el-table-column
label=
"历史提现金额"
prop=
"history_fund"
align=
"center"
></el-table-column>
>
<
template
#
default=
"scope"
>
{{
"¥ "
+
scope
.
row
.
history_fund
}}
</
template
>
</el-table-column>
<el-table-column
label=
"账户状态"
width=
"200px"
...
...
@@ -58,14 +70,14 @@
<
template
#
default=
"scope"
>
<el-button
v-show=
"scope.row.is_black == 0"
@
click
.
stop=
"
handleBlackList(scope.row
)"
@
click
.
stop=
"
openBounced(scope.row.is_black,scope.row.wallet_id
)"
type=
"text"
size=
"mini"
>
黑名单
</el-button
>
<el-button
v-show=
"scope.row.is_black == 1"
@
click
.
stop=
"
handelDelete(scope.row
)"
@
click
.
stop=
"
openBounced(scope.row.is_black,scope.row.wallet_id
)"
size=
"mini"
type=
"text"
>
释放
</el-button
...
...
@@ -89,6 +101,7 @@ import Layout from "../layout/index.vue";
import
{
getAccountList
}
from
"@/service/Withdrawal/withdrawal"
;
import
{
ElMessage
}
from
'element-plus'
;
export
default
{
name
:
"walletAccount"
,
props
:[
"flowRecord"
],
...
...
@@ -117,7 +130,6 @@ export default {
children
:
"sub_permissions"
,
//children值和哪个值绑定
},
selectedOptions
:
[],
dialogVisible
:
false
,
dialogText
:
""
,
accountList
:
[],
role_info_detail
:
{
...
...
@@ -135,24 +147,11 @@ export default {
// this.getPermissionsAll();
},
methods
:
{
// onCreateRole() {
// this.roleTitle = "新增角色";
// this.getPermissionsAll();
// this.edit = false;
// this.dialogVisible = true;
// this.roleName = "";
// this.selectedOptions = [];
// // this.$router.push({ name: 'AddRole' });
// },
// toRoleDetail(row) {
// this.$router.push({
// path: this.detailPath,
// query: { roleId: row.role_id },
// });
// },
//获取账户列表
getAccountList
()
{
let
{
user_id
,
type
,
page
,
page_size
}
=
this
.
params
;
this
.
accountList
=
[]
let
{
page
,
page_size
}
=
this
.
params
;
let
{
user_id
,
type
}
=
this
.
searchProps
;
let
params_list
=
{
page
,
page_size
,
...
...
@@ -179,207 +178,50 @@ export default {
let
{
page
,
page_size
}
=
this
.
params
;
this
.
getAccountList
(
page
,
page_size
);
},
// //弹框提示
// openBounced(type, role_id) {
// this.$confirm(`${this.dialogText}是否继续?`, "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: "warning",
// })
// .then(() => {
// if (type === "disable") {
// this.getRole_info_detail("disable", role_id);
// } else {
// this.delete(role_id);
// }
// })
// .catch(() => {
// this.$message({
// type: "info",
// message: "已取消",
// });
// });
// },
// //删除
// delete(role_id) {
// reqGetDelete_role(role_id, this.appId).then((res) => {
// if (res.status == "success") this.getGetRole_list();
// });
// },
// //角色详情数据
// getRole_info_detail(type, role_id) {
// reqGet_role_info(role_id, this.appId).then((res) => {
// const { role_id, role_name, permissions } = res.result;
// this.role_info_detail = {
// role_id,
// role_name,
// };
// this.roleName = role_name;
// // this.permissionsUpdate = permissions
// let role_status;
// if (type === "disable") {
// role_status = 2;
// } else if (type === "enable") {
// role_status = 1;
// } else if (type === "modify") {
// this.currentRolePrivilege = permissions;
// this.editEchoData(permissions);
// } else {
// role_status = "";
// }
// if (type !== "modify") {
// this.getUpdate_role(role_name, role_id, role_status, permissions);
// }
// });
// },
// //遍历回显值selectedOptions
// editEchoData(permissions) {
// let selectData = [];
// permissions.map((item) => {
// let one = { id: item.id };
// if (item.sub_permissions) {
// item.sub_permissions.map((info) => {
// let selectId = [one.id, info.id];
// selectData.push(selectId);
// });
// }
// });
// this.selectedOptions = selectData;
// },
// //启用
// handelEnable(row) {
// if (row.role_status == 1) {
// this.$message({
// type: "info",
// message: "该条数据已启用",
// });
// return false;
// }
// this.getRole_info_detail("enable", row.role_id);
// },
// //流水记录
handelRecord
()
{
this
.
$router
.
push
({
path
:
this
.
flowRecord
,
//弹框提示
openBounced
(
type
,
wallet_id
)
{
this
.
$confirm
(
`
${
type
===
1
?
"确认后则将用户释放出黑名单"
:
"确认后则将用户拉入黑名单"
}
是否继续?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
if
(
+
type
===
0
)
{
this
.
getRole_info_detail
(
"disable"
,
wallet_id
);
}
else
{
this
.
release
(
wallet_id
);
}
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消"
,
});
});
},
// //编辑列表操作
// getUpdate_role(role_name, role_id, role_status, permissions) {
// let paramsUpdate_role = {
// role_name: role_name,
// role_id,
// role_status,
// permissions,
// };
// reqGetUpdate_role(paramsUpdate_role, this.appId).then((res) => {
// if (res.status === "success") {
// this.dialogVisible = false;
// this.getGetRole_list();
// } else {
// this.dialogVisible = false;
// this.$message({
// type: "info",
// message: `${res.reason}`,
// });
// }
// });
// },
// //删除
// handelDelete(row) {
// this.dialogText = "删除后不可恢复,拥有此角色用户将受影响";
// this.openBounced("del", row.role_id);
// },
// //修改
//释放
async
release
(
wallet_id
)
{
this
.
dialogText
=
"确认后则将用户释放出黑名单"
;
try
{
await
getRelease
(
wallet_id
)
ElMessage
(
"释放成功"
)
this
.
getAccountList
()
}
catch
(
error
)
{
ElMessage
(
error
)
}
},
// //流水记录
handelRecord
(
row
)
{
this
.
$router
.
push
({
path
:
"/op/withdrawal/flowrecord"
,
query
:
{
user_id
:
row
.
user_id
,
wallet_id
:
row
.
wallet_id
}})
},
// //黑名单
// async handleBlackList(row) {
// this.edit = true;
// this.roleTitle = "修改角色";
// await this.getPermissionsAll();
// this.dialogVisible = true;
// this.getRole_info_detail("modify", row.role_id);
// },
// //确认修改
// confirm() {
// let checkRolePrivilege = [];
// this.edit
// ? (checkRolePrivilege = this.currentRolePrivilege)
// : (checkRolePrivilege = this.currenPermissionsUpdate)
// if (!(this.roleName && checkRolePrivilege.length > 0)) {
// this.$message({
// type: "error",
// message: "请完善信息",
// });
// return false;
// }
// if (this.edit) {
// this.getEditRole();
// } else {
// this.getAdd_role();
// }
// },
// //编辑提交的数据
// getEditRole() {
// let { role_id } = this.role_info_detail;
// let role_status = "";
// this.getUpdate_role(
// this.roleName,
// role_id,
// role_status,
// this.currentRolePrivilege
// );
// },
// //新增角色
// getAdd_role() {
// let paramsAdd_role = {
// role_name: this.roleName,
// permissions: this.currenPermissionsUpdate,
// };
// reqGetAdd_role(paramsAdd_role, this.appId).then((res) => {
// this.dialogVisible = false;
// if (res.status === "success") {
// this.getGetRole_list();
// } else {
// this.$message({
// type: "info",
// message: `${res.reason}`,
// });
// }
// });
// },
// parentCateChange(id) {
// this.getSelectedOptions(id);
// },
// getSelectedOptions(selectedOptions) {
// let oldDataRule = [];
// selectedOptions.forEach((el) => {
// let oldObj = {
// id: el[0],
// sub_permissions: [],
// };
// let btnObj = {
// id: el[1],
// };
// oldObj.sub_permissions.push(btnObj);
// oldDataRule.push(oldObj);
// });
// let newData = [];
// let newObj = {};
// oldDataRule.forEach((el, i) => {
// if (!newObj[el.id]) {
// newData.push(el);
// newObj[el.id] = true;
// } else {
// newData.forEach((el) => {
// if (el.id === oldDataRule[i].id) {
// el.sub_permissions = [
// ...el.sub_permissions,
// ...oldDataRule[i].sub_permissions,
// ];
// }
// });
// }
// });
// this.currentRolePrivilege = newData;
// this.currenPermissionsUpdate = newData;
// },
},
}
...
...
src/service/Withdrawal/withdrawal.js
View file @
99de2d0e
...
...
@@ -55,3 +55,10 @@ export async function getAccountList(params) {
});
return
res
;
}
// 获取账户流水列表
export
async
function
getRecordList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/get_record_list"
,
{
params
:
getParams
(
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