From 12fa274dfa153db39b6ee18a406b7ab9c4667e90 Mon Sep 17 00:00:00 2001
From: zzzz <690498789@qq.com>
Date: Wed, 27 Mar 2024 22:53:33 +0800
Subject: [PATCH] 注册页面的客服地址错误
---
.env.development | 1
src/views/userlist/components/detailuserdialog.vue | 42
src/views/userlist/index.vue | 146 +++--
src/main.js | 4
.env.preview | 2
src/api/home.js | 154 +++--
src/config/router.config.js | 276 ++++----
src/views/userlist/components/editCapitaluserdialog.vue | 154 +++--
src/views/allsetting/paysetting.vue | 510 +++++++++--------
src/views/userlist/agentlist.vue | 373 ++++++------
10 files changed, 896 insertions(+), 766 deletions(-)
diff --git a/.env.development b/.env.development
index 0684326..1217445 100644
--- a/.env.development
+++ b/.env.development
@@ -2,6 +2,7 @@
VUE_APP_PREVIEW=true
# VUE_APP_API_BASE_URL=http://www.jqydl.com:8091/
VUE_APP_API_BASE_URL=https://api.3falcon.com/
+# VUE_APP_API_BASE_URL=http://192.168.0.109:8091/
# VUE_APP_API_BASE_URL=https://www.rksv.store:8091/
# VUE_APP_API_BASE_URL=http://www.ojwuf.com:8091/
# VUE_APP_API_BASE_URL=https://192.168.0.102:8091/
diff --git a/.env.preview b/.env.preview
index 0d6b42b..44af71a 100644
--- a/.env.preview
+++ b/.env.preview
@@ -1,3 +1,3 @@
NODE_ENV=production
VUE_APP_PREVIEW=true
-VUE_APP_API_BASE_URL=/
\ No newline at end of file
+VUE_APP_API_BASE_URL=https://api.3falcon.com/
\ No newline at end of file
diff --git a/src/api/home.js b/src/api/home.js
index 0b3e299..7889444 100644
--- a/src/api/home.js
+++ b/src/api/home.js
@@ -3,6 +3,7 @@
const userApi = {
countdata: '/admin/count.do', // 首页统计类
usermanag: '/admin/user/list.do', // 用户列表
+ getMoney: '/admin/getMoney.do', // 获取账户金额
useraddSimulatedAccount: '/admin/user/addSimulatedAccount.do', // 添加真实/模拟用户
userupdate: '/admin/user/update.do', // 修改用户信息
usergetBank: '/admin/user/getBank.do', // 获取用户银行卡信息
@@ -12,16 +13,16 @@
userdelete: '/admin/user/delete.do', // 删除用户
czlist: '/admin/queryPayChnnel.do', // 充值方列表
addcz: '/admin/savePayChnnel.do', // 添加充值方列表
- dlcztd:'/admin/deletePayChnnel.do',//删除充值通道
- upcztd:'/admin/updateayChnnel.do',//修改充值通道
+ dlcztd: '/admin/deletePayChnnel.do', //删除充值通道
+ upcztd: '/admin/updateayChnnel.do', //修改充值通道
queryEcho: '/admin/queryEcho.do', // 利息宝列表
upyeb: '/admin/updateEcho.do', // 编辑利息宝列表
- deyeb:'/admin/deleteEcho.do', // 删除利息宝列表
+ deyeb: '/admin/deleteEcho.do', // 删除利息宝列表
yeblist: '/admin/querYEBOrder.do', // 利息宝列表
- addyeb:'/admin/addEcho.do',// 添加利息宝列表
+ addyeb: '/admin/addEcho.do', // 添加利息宝列表
nextagent: '/admin/agent/list.do', // 代理列表
- onedklist:'/admin/queryDk.do', // 贷款列表
+ onedklist: '/admin/queryDk.do', // 贷款列表
dklist: '/admin/queryDkjg.do', // 机构列表
updkjg: '/admin/updateDKjg.do', // 编辑机构列表
adddkjg: '/admin/addDkjg.do', // 添加机构列表
@@ -32,8 +33,8 @@
agentadd: '/admin/agent/add.do', // 添加下级代理
stockgetMarket: '/api/stock/getMarket.do', // 获取大盘指数行情
adminsetSiteStyle: '/api/admin/setSiteStyle.do', // 设置网站风格
- admingetSiteStyle: '/api/admin/getSiteStyle.do' // 获取网站风格
- }
+ admingetSiteStyle: '/api/admin/getSiteStyle.do', // 获取网站风格
+}
/**
* login func
@@ -47,234 +48,249 @@
* @returns {*}
*/
-export function queryEcho (parameter) {
+export function queryEcho(parameter) {
return request({
url: userApi.queryEcho,
method: 'post',
- param: parameter
+ param: parameter,
})
}
-export function onedklist (parameter) {
+export function onedklist(parameter) {
return request({
url: userApi.onedklist,
method: 'post',
- param: parameter
+ param: parameter,
})
}
-export function countdata (parameter) {
+export function countdata(parameter) {
return request({
url: userApi.countdata,
method: 'post',
- param: parameter
+ param: parameter,
})
}
-export function addcz (parameter) {
+export function addcz(parameter) {
return request({
url: userApi.addcz,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function upcztd (parameter) {
+export function upcztd(parameter) {
return request({
url: userApi.upcztd,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function yeblist (parameter) {
+export function yeblist(parameter) {
return request({
url: userApi.yeblist,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function dlcztd (parameter) {
+export function dlcztd(parameter) {
return request({
url: userApi.dlcztd,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function usermanag (parameter) {
+export function usermanag(parameter) {
return request({
url: userApi.usermanag,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function addyeb (parameter) {
+export function getMoney(parameter) {
+ return request({
+ url: userApi.getMoney,
+ method: 'post',
+ data: qs.stringify(parameter),
+ })
+}
+export function updateMoney(parameter) {
+ console.log(3333)
+ return request({
+ url: '/admin/updateMoney.do',
+ method: 'post',
+ data: qs.stringify(parameter),
+ })
+}
+export function addyeb(parameter) {
return request({
url: userApi.addyeb,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function nextagent (parameter) {
+export function nextagent(parameter) {
return request({
url: userApi.nextagent,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function adddkjg (parameter) {
+export function adddkjg(parameter) {
return request({
url: userApi.adddkjg,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function deyeb (parameter) {
+export function deyeb(parameter) {
return request({
url: userApi.deyeb,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function dldkjg (parameter) {
+export function dldkjg(parameter) {
return request({
url: userApi.dldkjg,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function upyeb (parameter) {
+export function upyeb(parameter) {
return request({
url: userApi.upyeb,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function updkjg (parameter) {
+export function updkjg(parameter) {
return request({
url: userApi.updkjg,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function dklist (parameter) {
+export function dklist(parameter) {
return request({
url: userApi.dklist,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function useraddSimulatedAccount (parameter) {
+export function useraddSimulatedAccount(parameter) {
return request({
url: userApi.useraddSimulatedAccount,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function userupdate (parameter) {
+export function userupdate(parameter) {
return request({
url: userApi.userupdate,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function usergetBank (parameter) {
+export function usergetBank(parameter) {
return request({
url: userApi.usergetBank,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function userupdateBank (parameter) {
+export function userupdateBank(parameter) {
return request({
url: userApi.userupdateBank,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function userupdateAmt (parameter) {
+export function userupdateAmt(parameter) {
return request({
url: userApi.userupdateAmt,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function userauthByAdmin (parameter) {
+export function userauthByAdmin(parameter) {
return request({
url: userApi.userauthByAdmin,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function userdelete (parameter) {
+export function userdelete(parameter) {
return request({
url: userApi.userdelete,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function agentupdateAgentAmt (parameter) {
+export function agentupdateAgentAmt(parameter) {
return request({
url: userApi.agentupdateAgentAmt,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function czlist (parameter) {
+export function czlist(parameter) {
return request({
url: userApi.czlist,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function agentdelAgent (parameter) {
+export function agentdelAgent(parameter) {
return request({
url: userApi.agentdelAgent,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function agentupdate (parameter) {
+export function agentupdate(parameter) {
return request({
url: userApi.agentupdate,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function agentadd (parameter) {
+export function agentadd(parameter) {
return request({
url: userApi.agentadd,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function stockgetMarket (parameter) {
+export function stockgetMarket(parameter) {
return request({
url: userApi.stockgetMarket,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function adminsetSiteStyle (parameter) {
+export function adminsetSiteStyle(parameter) {
return request({
url: userApi.adminsetSiteStyle,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
-export function admingetSiteStyle (parameter) {
+export function admingetSiteStyle(parameter) {
return request({
url: userApi.admingetSiteStyle,
method: 'post',
- data: qs.stringify(parameter)
+ data: qs.stringify(parameter),
})
}
diff --git a/src/config/router.config.js b/src/config/router.config.js
index c893c37..03745f2 100644
--- a/src/config/router.config.js
+++ b/src/config/router.config.js
@@ -4,7 +4,7 @@
const RouteView = {
name: 'RouteView',
- render: h => h('router-view')
+ render: (h) => h('router-view'),
}
export const asyncRouterMap = [
@@ -39,9 +39,9 @@
path: '/dashboard/workplace',
name: 'Workplace',
component: () => import('@/views/dashboard/Workplace'),
- meta: { title: 'menu.dashboard.workplace', keepAlive: true, permission: ['dashboard'] }
- }
- ]
+ meta: { title: 'menu.dashboard.workplace', keepAlive: true, permission: ['dashboard'] },
+ },
+ ],
},
{
path: '/userlist',
@@ -53,15 +53,15 @@
path: '/userlist/index',
name: 'Userlist',
component: () => import('@/views/userlist/index'),
- meta: { title: '用户列表', keepAlive: true, permission: ['userlist'] }
+ meta: { title: '用户列表', keepAlive: true, permission: ['userlist'] },
},
{
path: '/userlist/agentlist',
name: 'Agentlist',
component: () => import('@/views/userlist/agentlist'),
- meta: { title: '代理列表', keepAlive: true, permission: ['agentlist'] }
- }
- ]
+ meta: { title: '代理列表', keepAlive: true, permission: ['agentlist'] },
+ },
+ ],
},
// {
// path: '/allotment',
@@ -124,14 +124,14 @@
path: '/product/shares',
name: 'shares',
component: () => import('@/views/product/shares'),
- meta: { title: '股票产品', keepAlive: true, permission: ['shares'] }
+ meta: { title: '股票产品', keepAlive: true, permission: ['shares'] },
},
- {
- path: '/product/index',
- name: 'index',
- component: () => import('@/views/product/index'),
- meta: { title: '指数产品', keepAlive: true, permission: ['index'] }
- }
+ // {
+ // path: '/product/index',
+ // name: 'index',
+ // component: () => import('@/views/product/index'),
+ // meta: { title: '指数产品', keepAlive: true, permission: ['index'] }
+ // }
// {
// path: '/product/basecurrency',
// name: 'basecurrency',
@@ -144,7 +144,7 @@
// component: () => import('@/views/product/futures'),
// meta: { title: '期货产品', keepAlive: true, permission: ['futures'] }
// },
- ]
+ ],
},
// 持仓管理
{
@@ -157,15 +157,15 @@
path: '/position/financing',
name: 'financing',
component: () => import('@/views/position/financing'),
- meta: { title: '持仓管理', keepAlive: true, permission: ['financing'] }
+ meta: { title: '持仓管理', keepAlive: true, permission: ['financing'] },
},
{
path: '/position/createfinancing',
name: 'createfinancing',
component: () => import('@/views/position/createFinancing'),
- meta: { title: '创建股票持仓', keepAlive: true, permission: ['createfinancing'] }
- }
- ]
+ meta: { title: '创建股票持仓', keepAlive: true, permission: ['createfinancing'] },
+ },
+ ],
},
// 新股管理
{
@@ -178,21 +178,21 @@
path: '/newshares/newshareslist',
name: 'newshareslist',
component: () => import('@/views/newshares/newshareslist'),
- meta: { title: '新股列表', keepAlive: true, permission: ['newshareslist'] }
+ meta: { title: '新股列表', keepAlive: true, permission: ['newshareslist'] },
},
{
path: '/newshares/newsharesrecord',
name: 'newsharesrecord',
component: () => import('@/views/newshares/newsharesrecord'),
- meta: { title: '申购记录', keepAlive: true, permission: ['newsharesrecord'] }
+ meta: { title: '申购记录', keepAlive: true, permission: ['newsharesrecord'] },
},
- {
- path: '/newshares/dazonglist',
- name: 'dazonglist',
- component: () => import('@/views/newshares/dazonglist'),
- meta: { title: '大宗交易列表', keepAlive: true, permission: ['dazonglist'] }
- }
- ]
+ // {
+ // path: '/newshares/dazonglist',
+ // name: 'dazonglist',
+ // component: () => import('@/views/newshares/dazonglist'),
+ // meta: { title: '大宗交易列表', keepAlive: true, permission: ['dazonglist'] },
+ // },
+ ],
},
// 资金管理
{
@@ -205,39 +205,39 @@
path: '/capital/rechargelist',
name: 'rechargelist',
component: () => import('@/views/capital/rechargelist'),
- meta: { title: '充值列表', keepAlive: true, permission: ['rechargelist'] }
+ meta: { title: '充值列表', keepAlive: true, permission: ['rechargelist'] },
},
{
path: '/capital/withdrawallist',
name: 'withdrawallist',
component: () => import('@/views/capital/withdrawallist'),
- meta: { title: '提现列表', keepAlive: true, permission: ['withdrawallist'] }
+ meta: { title: '提现列表', keepAlive: true, permission: ['withdrawallist'] },
},
- {
- path: '/capital/fundrecords',
- name: 'fundrecords',
- component: () => import('@/views/capital/fundrecords'),
- meta: { title: '资金记录', keepAlive: true, permission: ['fundrecords'] }
- },
- {
- path: '/capital/fundtransferrecord',
- name: 'fundtransferrecord',
- component: () => import('@/views/capital/fundTransferrecord'),
- meta: { title: '资金互转记录', keepAlive: true, permission: ['fundtransferrecord'] }
- },{
- path: '/capital/Recharge_channel',
- name: 'Recharge_channel',
- component: () => import('@/views/capital/Recharge_channel'),
- meta: { title: '充值通道', keepAlive: true, permission: ['Recharge_channel'] }
- },
- {
- path: '/capital/Withdrawal_channel',
- name: 'Withdrawal_channel',
- component: () => import('@/views/capital/Withdrawal_channel'),
- meta: { title: '提现通道', keepAlive: true, permission: ['Withdrawal_channel'] }
- }
-
- ]
+ // {
+ // path: '/capital/fundrecords',
+ // name: 'fundrecords',
+ // component: () => import('@/views/capital/fundrecords'),
+ // meta: { title: '资金记录', keepAlive: true, permission: ['fundrecords'] },
+ // },
+ // {
+ // path: '/capital/fundtransferrecord',
+ // name: 'fundtransferrecord',
+ // component: () => import('@/views/capital/fundTransferrecord'),
+ // meta: { title: '资金互转记录', keepAlive: true, permission: ['fundtransferrecord'] },
+ // },
+ // {
+ // path: '/capital/Recharge_channel',
+ // name: 'Recharge_channel',
+ // component: () => import('@/views/capital/Recharge_channel'),
+ // meta: { title: '充值通道', keepAlive: true, permission: ['Recharge_channel'] },
+ // },
+ // {
+ // path: '/capital/Withdrawal_channel',
+ // name: 'Withdrawal_channel',
+ // component: () => import('@/views/capital/Withdrawal_channel'),
+ // meta: { title: '提现通道', keepAlive: true, permission: ['Withdrawal_channel'] },
+ // },
+ ],
},
// 日志管理
{
@@ -250,27 +250,27 @@
path: '/logmanage/loginlog',
name: 'loginlog',
component: () => import('@/views/logmanage/loginlog'),
- meta: { title: '登录日志', keepAlive: true, permission: ['loginlog'] }
+ meta: { title: '登录日志', keepAlive: true, permission: ['loginlog'] },
},
- {
- path: '/logmanage/smslog',
- name: 'smslog',
- component: () => import('@/views/logmanage/smslog'),
- meta: { title: '短信日志', keepAlive: true, permission: ['smslog'] }
- },
- {
- path: '/logmanage/scheduledtasks',
- name: 'scheduledtasks',
- component: () => import('@/views/logmanage/scheduledTasks'),
- meta: { title: '定时任务', keepAlive: true, permission: ['scheduledtasks'] }
- },
- {
- path: '/logmanage/stationmessage',
- name: 'stationmessage',
- component: () => import('@/views/logmanage/stationmessage'),
- meta: { title: '站内消息', keepAlive: true, permission: ['stationmessage'] }
- }
- ]
+ // {
+ // path: '/logmanage/smslog',
+ // name: 'smslog',
+ // component: () => import('@/views/logmanage/smslog'),
+ // meta: { title: '短信日志', keepAlive: true, permission: ['smslog'] },
+ // },
+ // {
+ // path: '/logmanage/scheduledtasks',
+ // name: 'scheduledtasks',
+ // component: () => import('@/views/logmanage/scheduledTasks'),
+ // meta: { title: '定时任务', keepAlive: true, permission: ['scheduledtasks'] },
+ // },
+ // {
+ // path: '/logmanage/stationmessage',
+ // name: 'stationmessage',
+ // component: () => import('@/views/logmanage/stationmessage'),
+ // meta: { title: '站内消息', keepAlive: true, permission: ['stationmessage'] },
+ // },
+ ],
},
// 管理设置
@@ -284,9 +284,9 @@
path: '/managesettings/managelist',
name: 'managelist',
component: () => import('@/views/managesettings/managelist'),
- meta: { title: '管理列表', keepAlive: true, permission: ['managelist'] }
- }
- ]
+ meta: { title: '管理列表', keepAlive: true, permission: ['managelist'] },
+ },
+ ],
},
// 风控设置
{
@@ -299,29 +299,28 @@
path: '/risksetting/productsetting',
name: 'productsetting',
component: () => import('@/views/risksetting/productsetting'),
- meta: { title: '产品配置', keepAlive: true, permission: ['productsetting'] }
+ meta: { title: '产品配置', keepAlive: true, permission: ['productsetting'] },
},
{
path: '/risksetting/sharessetting',
name: 'sharessetting',
component: () => import('@/views/risksetting/sharessetting'),
- meta: { title: '股票风控', keepAlive: true, permission: ['sharessetting'] }
+ meta: { title: '股票风控', keepAlive: true, permission: ['sharessetting'] },
},
- {
- path: '/risksetting/indexsetting',
- name: 'indexsetting',
- component: () => import('@/views/risksetting/indexsetting'),
- meta: { title: '指数风控', keepAlive: true, permission: ['indexsetting'] }
- },
+ // {
+ // path: '/risksetting/indexsetting',
+ // name: 'indexsetting',
+ // component: () => import('@/views/risksetting/indexsetting'),
+ // meta: { title: '指数风控', keepAlive: true, permission: ['indexsetting'] },
+ // },
- {
- path: '/risksetting/spreadsetting',
- name: 'spreadsetting',
- component: () => import('@/views/risksetting/spreadsetting'),
- meta: { title: '点差设置', keepAlive: true, permission: ['spreadsetting'] }
- }
-
- ]
+ // {
+ // path: '/risksetting/spreadsetting',
+ // name: 'spreadsetting',
+ // component: () => import('@/views/risksetting/spreadsetting'),
+ // meta: { title: '点差设置', keepAlive: true, permission: ['spreadsetting'] },
+ // },
+ ],
},
// 系统设置
{
@@ -334,22 +333,21 @@
path: '/allsetting/noticesetting',
name: 'noticesetting',
component: () => import('@/views/allsetting/noticesetting'),
- meta: { title: '公告设置', keepAlive: true, permission: ['noticesetting'] }
+ meta: { title: '公告设置', keepAlive: true, permission: ['noticesetting'] },
},
{
path: '/allsetting/bannersetting',
name: 'bannersetting',
component: () => import('@/views/allsetting/bannersetting'),
- meta: { title: '轮播图设置', keepAlive: true, permission: ['bannersetting'] }
+ meta: { title: '轮播图设置', keepAlive: true, permission: ['bannersetting'] },
},
{
path: '/allsetting/paysetting',
name: 'paysetting',
component: () => import('@/views/allsetting/paysetting'),
- meta: { title: '支付渠道设置', keepAlive: true, permission: ['paysetting'] }
- }
-
- ]
+ meta: { title: '支付渠道设置', keepAlive: true, permission: ['paysetting'] },
+ },
+ ],
},
// forms
@@ -537,7 +535,7 @@
path: '/account/settings/basic',
name: 'BasicSettings',
component: () => import('@/views/account/settings/BasicSetting'),
- meta: { title: 'account.settings.menuMap.basic', hidden: true, permission: ['user'] }
+ meta: { title: 'account.settings.menuMap.basic', hidden: true, permission: ['user'] },
},
{
path: '/account/settings/security',
@@ -547,20 +545,25 @@
title: 'account.settings.menuMap.security',
hidden: true,
keepAlive: true,
- permission: ['user']
- }
+ permission: ['user'],
+ },
},
{
path: '/account/settings/custom',
name: 'CustomSettings',
component: () => import('@/views/account/settings/Custom'),
- meta: { title: 'account.settings.menuMap.custom', hidden: true, keepAlive: true, permission: ['user'] }
+ meta: { title: 'account.settings.menuMap.custom', hidden: true, keepAlive: true, permission: ['user'] },
},
{
path: '/account/settings/binding',
name: 'BindingSettings',
component: () => import('@/views/account/settings/Binding'),
- meta: { title: 'account.settings.menuMap.binding', hidden: true, keepAlive: true, permission: ['user'] }
+ meta: {
+ title: 'account.settings.menuMap.binding',
+ hidden: true,
+ keepAlive: true,
+ permission: ['user'],
+ },
},
{
path: '/account/settings/notification',
@@ -570,12 +573,12 @@
title: 'account.settings.menuMap.notification',
hidden: true,
keepAlive: true,
- permission: ['user']
- }
- }
- ]
- }
- ]
+ permission: ['user'],
+ },
+ },
+ ],
+ },
+ ],
},
{
path: '/loanmanage',
@@ -587,14 +590,14 @@
path: '/loanmanage/index',
name: 'Loanmanage',
component: () => import('@/views/loanmanage/index'),
- meta: { title: '贷款列表', keepAlive: true, permission: ['loanmanage'] }
+ meta: { title: '贷款列表', keepAlive: true, permission: ['loanmanage'] },
},
- {
- path: '/loanmanage/institution',
- name: 'institution',
- component: () => import('@/views/loanmanage/institution'),
- meta: { title: '贷款机构', keepAlive: true, permission: ['institution'] }
- },
+ {
+ path: '/loanmanage/institution',
+ name: 'institution',
+ component: () => import('@/views/loanmanage/institution'),
+ meta: { title: '贷款机构', keepAlive: true, permission: ['institution'] },
+ },
// {
// path: '/loanmanage/institution',
// name: 'Institution',
@@ -607,7 +610,7 @@
// component: () => import('@/views/loanmanage/index'),
// meta: { title: '贷款机构', keepAlive: true, permission: ['loanmanage'] }
// }
- ]
+ ],
},
{
path: '/interesttreasure',
@@ -619,22 +622,22 @@
path: '/interesttreasure/index',
name: 'InterestTreasure',
component: () => import('@/views/interesttreasure/index'),
- meta: { title: '利息宝列表', keepAlive: true, permission: ['interesttreasure'] }
+ meta: { title: '利息宝列表', keepAlive: true, permission: ['interesttreasure'] },
},
{
path: '/interesttreasure/set',
name: 'set',
component: () => import('@/views/interesttreasure/set'),
- meta: { title: '利息宝设置', keepAlive: true, permission: ['set'] }
- }
+ meta: { title: '利息宝设置', keepAlive: true, permission: ['set'] },
+ },
// {
// path: '/userlist/agentlist',
// name: 'Agentlist',
// component: () => import('@/views/userlist/agentlist'),
// meta: { title: '代理列表', keepAlive: true, permission: ['agentlist'] }
// }
- ]
- }
+ ],
+ },
// other
/*
{
@@ -696,14 +699,13 @@
}
]
} */
-
- ]
+ ],
},
{
path: '*',
redirect: '/404',
- hidden: true
- }
+ hidden: true,
+ },
]
/**
@@ -720,28 +722,28 @@
{
path: 'login',
name: 'login',
- component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
+ component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login'),
},
{
path: 'register',
name: 'register',
- component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
+ component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register'),
},
{
path: 'register-result',
name: 'registerResult',
- component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
+ component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult'),
},
{
path: 'recover',
name: 'recover',
- component: undefined
- }
- ]
+ component: undefined,
+ },
+ ],
},
{
path: '/404',
- component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
- }
+ component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404'),
+ },
]
diff --git a/src/main.js b/src/main.js
index 6089870..b402f68 100644
--- a/src/main.js
+++ b/src/main.js
@@ -18,7 +18,7 @@
import './permission' // permission control
import './utils/filter' // global filter
import './global.less'
-window['console']['log'] = function () {} // global style
+// window['console']['log'] = function () {} // global style
Vue.config.productionTip = false
@@ -38,5 +38,5 @@
i18n,
// init localstorage, vuex, Logo message
created: bootstrap,
- render: h => h(App)
+ render: (h) => h(App),
}).$mount('#app')
diff --git a/src/views/allsetting/paysetting.vue b/src/views/allsetting/paysetting.vue
index 3b9bfb4..fa5a7e9 100644
--- a/src/views/allsetting/paysetting.vue
+++ b/src/views/allsetting/paysetting.vue
@@ -17,13 +17,20 @@
type="primary"
icon="search"
style="margin-left: 8px"
- @click="queryParam.pageNum = 1, getlist()">查询</a-button>
+ @click=";(queryParam.pageNum = 1), getlist()"
+ >查询</a-button
+ >
<a-button
type="primary"
icon="plus"
style="margin-left: 8px"
- @click="addUserdialog = true; currentDetails = ''">
- 添加支付渠道</a-button>
+ @click="
+ addUserdialog = true
+ currentDetails = ''
+ "
+ >
+ 添加支付渠道</a-button
+ >
</span>
</a-form-item>
</a-col>
@@ -39,11 +46,11 @@
:pagination="pagination"
:columns="columns"
:data-source="datalist"
- rowKey="id">
-
+ rowKey="id"
+ >
<span slot="channelImg" slot-scope="text">
<template>
- <img :src="text" alt="" style="width:120px;height: 50px;object-fit: cover;">
+ <img :src="text" alt="" style="width: 120px; height: 50px; object-fit: cover" />
</template>
</span>
<span slot="isShow" slot-scope="text">
@@ -56,7 +63,7 @@
</template>
</span>
- <template slot="action" slot-scope="text,record">
+ <template slot="action" slot-scope="text, record">
<a slot="action" href="javascript:;" @click="geteditbaseCurrency(record)">修改通道</a>
<a-divider type="vertical" />
<a slot="action" href="javascript:;" @click="deletebaseCurrency(record.id)">删除通道</a>
@@ -70,41 +77,57 @@
:visible="addUserdialog"
:confirmLoading="addUserDialogloading"
@ok="OkaddUserdialog"
- @cancel="CanceladdUserdialog">
+ @cancel="CanceladdUserdialog"
+ >
<a-form :form="addUserform" ref="addUserform">
<a-row :gutter="48">
<a-col :md="12" :lg="12" :sm="12">
<a-form-item label="通道名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入通道名称"
- v-decorator="['channelType', { rules: [{ required: true, message: '请输入通道名称', }] }]" />
+ v-decorator="['channelType', { rules: [{ required: true, message: '请输入通道名称' }] }]"
+ />
</a-form-item>
</a-col>
<a-col :md="12" :lg="12" :sm="12">
+ <a-form-item label="银行卡归属" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-select
+ placeholder="请选择"
+ v-decorator="['assetsType', { rules: [{ required: true, message: '请选择' }] }]"
+ >
+ <a-select-option value="US">美国</a-select-option>
+ <a-select-option value="MAS">马来西亚</a-select-option>
+ </a-select>
+ </a-form-item>
+ </a-col>
+ <!-- <a-col :md="12" :lg="12" :sm="12">
<a-form-item label="通道类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select
placeholder="请选择通道类型"
- v-decorator="['ctype', { rules: [{ required: true, message: '请选择通道类型', }] }]">
+ v-decorator="['ctype', { rules: [{ required: true, message: '请选择通道类型' }] }]"
+ >
<a-select-option :value="0">支付宝</a-select-option>
<a-select-option :value="1">公户转账</a-select-option>
<a-select-option :value="2">其他</a-select-option>
</a-select>
</a-form-item>
- </a-col>
+ </a-col> -->
</a-row>
<a-row :gutter="48">
<a-col :md="12" :lg="12" :sm="12">
<a-form-item label="最小充值" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入最小充值"
- v-decorator="['channelMinLimit', { rules: [{ required: true, message: '请输入最小充值金额', }] }]" />
+ v-decorator="['channelMinLimit', { rules: [{ required: true, message: '请输入最小充值金额' }] }]"
+ />
</a-form-item>
</a-col>
<a-col :md="12" :lg="12" :sm="12">
<a-form-item label="最大充值" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入最大充值"
- v-decorator="['channelMaxLimit', { rules: [{ required: true, message: '请输入最大充值金额', }] }]" />
+ v-decorator="['channelMaxLimit', { rules: [{ required: true, message: '请输入最大充值金额' }] }]"
+ />
</a-form-item>
</a-col>
</a-row>
@@ -113,7 +136,8 @@
<a-form-item label="是否显示" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select
placeholder="请选择是否显示"
- v-decorator="['isShow', { rules: [{ required: true, message: '请选择是否显示', }] }]">
+ v-decorator="['isShow', { rules: [{ required: true, message: '请选择是否显示' }] }]"
+ >
<a-select-option :value="0">显示</a-select-option>
<a-select-option :value="1">不显示</a-select-option>
</a-select>
@@ -123,7 +147,8 @@
<a-form-item label="是否可用" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select
placeholder="请选择是否可用"
- v-decorator="['isLock', { rules: [{ required: true, message: '请选择是否可用', }] }]">
+ v-decorator="['isLock', { rules: [{ required: true, message: '请选择是否可用' }] }]"
+ >
<a-select-option :value="0">显示</a-select-option>
<a-select-option :value="1">不显示</a-select-option>
</a-select>
@@ -135,14 +160,16 @@
<a-form-item label="收款名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入收款名称,如:**公司"
- v-decorator="['channelName', { rules: [{ required: true, message: '请输入收款名称', }] }]" />
+ v-decorator="['channelName', { rules: [{ required: true, message: '请输入收款名称' }] }]"
+ />
</a-form-item>
</a-col>
<a-col :md="12" :lg="12" :sm="12">
<a-form-item label="收款账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入收款账号"
- v-decorator="['channelAccount', { rules: [{ required: true, message: '请输入收款账号', }] }]" />
+ v-decorator="['channelAccount', { rules: [{ required: true, message: '请输入收款账号' }] }]"
+ />
</a-form-item>
</a-col>
</a-row>
@@ -151,7 +178,8 @@
<a-form-item label="备注信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="对公转账备注请填写收款银行和支行"
- v-decorator="['channelDesc', { rules: [{ required: true, message: '请输入备注信息', }] }]" />
+ v-decorator="['channelDesc', { rules: [{ required: true, message: '请输入备注信息' }] }]"
+ />
</a-form-item>
</a-col>
<a-col :md="12" :lg="12" :sm="12">
@@ -159,7 +187,8 @@
<a-input
placeholder="/user/recharge/inMoney.do"
disabled
- v-if="addUserform.getFieldValue('ctype') == 0 || addUserform.getFieldValue('ctype') == 1" />
+ v-if="addUserform.getFieldValue('ctype') == 0 || addUserform.getFieldValue('ctype') == 1"
+ />
<a-input placeholder="支付提交的接口地址" v-else v-decorator="['formUrl', {}]" />
</a-form-item>
</a-col>
@@ -169,22 +198,26 @@
<a-form-item label="代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
placeholder="请输入代码"
- v-decorator="['code', { rules: [{ required: true, message: '请输入代码', }] }]" />
+ v-decorator="['code', { rules: [{ required: true, message: '请输入代码' }] }]"
+ />
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="48">
<a-col :md="12" :lg="12" :sm="12">
<a-form-item label="收款二维码" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <!-- { required: true, message: '请上传收款二维码' } -->
+
<a-upload
name="avatar"
list-type="picture-card"
accept=".jpg,.jpeg,.png"
class="avatar-uploader"
- v-decorator="['channelImg', { valuePropName: 'file', rules: [{ required: true, message: '请上传收款二维码', }] }]"
+ v-decorator="['channelImg', { valuePropName: 'file', rules: [] }]"
:showUploadList="false"
- :customRequest="customRequest">
- <img v-if="channelImg" :src="channelImg" alt="avatar" />
+ :customRequest="customRequest"
+ >
+ <img style="width: 100%" v-if="channelImg" :src="channelImg" alt="avatar" />
<div v-else>
<a-icon :type="imgloading ? 'loading' : 'plus'" />
</div>
@@ -200,222 +233,237 @@
import { paylist, payupdate, payadd, paydel, adminupload } from '@/api/allsetting'
import pick from 'lodash.pick'
export default {
- name: 'Basecurrency',
- data () {
- return {
- columns: [
- {
- title: '通道类型',
- dataIndex: 'channelType',
- align: 'center'
- },
- {
- title: '图片',
- dataIndex: 'channelImg',
- align: 'center',
- scopedSlots: { customRender: 'channelImg' }
- },
- {
- title: '通道名字',
- dataIndex: 'channelName',
- align: 'center'
- },
- {
- title: '账号',
- dataIndex: 'channelAccount',
- align: 'center'
- },
- {
- title: '描述',
- dataIndex: 'channelDesc',
- align: 'center'
- },
- {
- title: '最小充值金额',
- dataIndex: 'channelMinLimit',
- align: 'center'
- },
- {
- title: '最大充值金额',
- dataIndex: 'channelMaxLimit',
- align: 'center'
- },
- {
- title: '是否显示',
- dataIndex: 'isShow',
- align: 'center',
- scopedSlots: { customRender: 'isShow' }
- },
- {
- title: '操作',
- key: 'action',
- align: 'center',
- fixed: 'right',
- width: 200,
- scopedSlots: { customRender: 'action' }
- }
- ],
- // 表头
- pagination: {
- total: 0,
- pageSize: 10, // 每页中显示10条数据
- showSizeChanger: true,
- pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
- onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
- onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
- showTotal: total => `共有 ${total} 条数据` // 分页中显示总的数据
- },
- loading: false,
- queryParam: {
- pageNum: 1,
- pageSize: 10,
- channelType: ''
- },
- datalist: [],
+ name: 'Basecurrency',
+ data() {
+ return {
+ columns: [
+ {
+ title: '通道类型',
+ dataIndex: 'channelType',
+ align: 'center',
+ },
+ {
+ title: '图片',
+ dataIndex: 'channelImg',
+ align: 'center',
+ scopedSlots: { customRender: 'channelImg' },
+ },
+ {
+ title: '通道名字',
+ dataIndex: 'channelName',
+ align: 'center',
+ },
+ {
+ title: '账号',
+ dataIndex: 'channelAccount',
+ align: 'center',
+ },
+ {
+ title: '描述',
+ dataIndex: 'channelDesc',
+ align: 'center',
+ },
+ {
+ title: '最小充值金额',
+ dataIndex: 'channelMinLimit',
+ align: 'center',
+ },
+ {
+ title: '最大充值金额',
+ dataIndex: 'channelMaxLimit',
+ align: 'center',
+ },
+ {
+ title: '是否显示',
+ dataIndex: 'isShow',
+ align: 'center',
+ scopedSlots: { customRender: 'isShow' },
+ },
+ {
+ title: '操作',
+ key: 'action',
+ align: 'center',
+ fixed: 'right',
+ width: 200,
+ scopedSlots: { customRender: 'action' },
+ },
+ ],
+ // 表头
+ pagination: {
+ total: 0,
+ pageSize: 10, // 每页中显示10条数据
+ showSizeChanger: true,
+ pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
+ onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
+ onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
+ showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
+ },
+ loading: false,
+ queryParam: {
+ pageNum: 1,
+ pageSize: 10,
+ channelType: '',
+ },
+ datalist: [],
- addUserdialog: false,
- addUserDialogloading: false,
- addUserform: this.$form.createForm(this),
- labelCol: {
- xs: { span: 24 },
- sm: { span: 6 }
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 18 }
- },
- fields: ['channelType', 'channelName', 'channelDesc', 'channelAccount', 'channelMinLimit', 'channelMaxLimit', 'isShow', 'ctype', 'isLock', 'channelImg', 'code', 'formUrl'],
- currentDetails: '',
- channelImg: '',
- imgloading: false
- }
- },
- created () {
- this.getlist()
- },
- methods: {
- deletebaseCurrency (val) {
- var that = this
- this.$confirm({
- title: '提示',
- content: '确认删除该支付渠道?此操作不可恢复',
- onOk () {
- var data = {
- cId: val
- }
- paydel(data).then(res => {
- if (res.status == 0) {
- that.$message.success({ content: res.msg, duration: 2 })
- that.getlist()
- } else {
- that.$message.error({ content: res.msg })
- }
- })
- },
- onCancel () {
- console.log('Cancel')
- }
- })
- },
- customRequest (data) {
- this.imgloading = true
- var formData = new FormData()
- formData.append('upload_file', data.file)
- adminupload(formData).then(res => {
- if (res.status == 0) {
- this.channelImg = res.data.url
- this.addUserform.setFieldsValue(({
- channelImg: res.data.url
- }))
- } else {
- this.$message.error({ content: '上传失败请检查图片类型!' })
- }
- this.imgloading = false
- })
- },
- geteditbaseCurrency (val) {
- this.currentDetails = val
- this.channelImg = val.channelImg
- this.addUserdialog = true
- this.fields.forEach(v => this.addUserform.getFieldDecorator(v))
- this.addUserform.setFieldsValue(pick(val, this.fields))
- },
- CanceladdUserdialog () {
- this.addUserdialog = false
- const form = this.$refs.addUserform.form
- form.resetFields()
- this.channelImg = ''
- },
- OkaddUserdialog () {
- const form = this.$refs.addUserform.form
- form.validateFields((errors, values) => {
- if (!errors) {
- this.addUserDialogloading = true
- if (this.currentDetails != '') {
- values.id = this.currentDetails.id
- console.log(values)
- payupdate(values).then(res => {
- if (res.status == 0) {
- this.addUserdialog = false
- this.$message.success({ content: '修改成功', duration: 2 })
- form.resetFields()
- this.getlist()
- } else {
- this.$message.error({ content: res.msg })
- }
- this.addUserDialogloading = false
- })
- } else {
- values.id = 0
- payadd(values).then(res => {
- if (res.status == 0) {
- this.addUserdialog = false
- this.$message.success({ content: '添加成功', duration: 2 })
- form.resetFields()
- this.getlist()
- } else {
- this.$message.error({ content: res.msg })
- }
- this.addUserDialogloading = false
- })
- }
- this.channelImg = ''
- }
- })
- },
- getqueryParam () {
- this.queryParam = {
- pageNum: 1,
- pageSize: 10,
- channelType: ''
- }
- },
- getlist () {
- this.loading = true
- paylist(this.queryParam).then(res => {
- this.datalist = res.data.list
- this.pagination.total = res.data.total
- this.loading = false
- })
- },
- onPageChange (page, pageSize) {
- this.queryParam.pageNum = page
- this.getlist()
- },
- onSizeChange (current, pageSize) {
- this.queryParam.pageNum = current
- this.queryParam.pageSize = pageSize
- this.getlist()
- }
+ addUserdialog: false,
+ addUserDialogloading: false,
+ addUserform: this.$form.createForm(this),
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 6 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 18 },
+ },
+ fields: [
+ 'channelType',
+ 'channelName',
+ 'channelDesc',
+ 'channelAccount',
+ 'channelMinLimit',
+ 'channelMaxLimit',
+ 'isShow',
+ 'ctype',
+ 'isLock',
+ 'assetsType',
+ 'channelImg',
+ 'code',
+ 'formUrl',
+ ],
+ currentDetails: '',
+ channelImg: '',
+ imgloading: false,
}
+ },
+ created() {
+ this.getlist()
+ },
+ methods: {
+ deletebaseCurrency(val) {
+ var that = this
+ this.$confirm({
+ title: '提示',
+ content: '确认删除该支付渠道?此操作不可恢复',
+ onOk() {
+ var data = {
+ cId: val,
+ }
+ paydel(data).then((res) => {
+ if (res.status == 0) {
+ that.$message.success({ content: res.msg, duration: 2 })
+ that.getlist()
+ } else {
+ that.$message.error({ content: res.msg })
+ }
+ })
+ },
+ onCancel() {
+ console.log('Cancel')
+ },
+ })
+ },
+ customRequest(data) {
+ this.imgloading = true
+ var formData = new FormData()
+ formData.append('upload_file', data.file)
+ adminupload(formData).then((res) => {
+ if (res.status == 0) {
+ this.channelImg = res.data.url
+ this.addUserform.setFieldsValue({
+ channelImg: res.data.url,
+ })
+ } else {
+ this.$message.error({ content: '上传失败请检查图片类型!' })
+ }
+ this.imgloading = false
+ })
+ },
+ geteditbaseCurrency(val) {
+ this.currentDetails = val
+ this.channelImg = val.channelImg
+ this.addUserdialog = true
+ this.fields.forEach((v) => this.addUserform.getFieldDecorator(v))
+ this.addUserform.setFieldsValue(pick(val, this.fields))
+ },
+ CanceladdUserdialog() {
+ this.addUserdialog = false
+ const form = this.$refs.addUserform.form
+ form.resetFields()
+ this.channelImg = ''
+ },
+ OkaddUserdialog() {
+ const form = this.$refs.addUserform.form
+ form.validateFields((errors, values) => {
+ if (!errors) {
+ this.addUserDialogloading = true
+ if (this.currentDetails != '') {
+ values.id = this.currentDetails.id
+ values.ctype = 1
+ payupdate(values).then((res) => {
+ if (res.status == 0) {
+ this.addUserdialog = false
+ this.$message.success({ content: '修改成功', duration: 2 })
+ form.resetFields()
+ this.getlist()
+ } else {
+ this.$message.error({ content: res.msg })
+ }
+ this.addUserDialogloading = false
+ })
+ } else {
+ values.id = 0
+ values.ctype = 1
+ payadd(values).then((res) => {
+ if (res.status == 0) {
+ this.addUserdialog = false
+ this.$message.success({ content: '添加成功', duration: 2 })
+ form.resetFields()
+ this.getlist()
+ } else {
+ this.$message.error({ content: res.msg })
+ }
+ this.addUserDialogloading = false
+ })
+ }
+ this.channelImg = ''
+ }
+ })
+ },
+ getqueryParam() {
+ this.queryParam = {
+ pageNum: 1,
+ pageSize: 10,
+ channelType: '',
+ }
+ },
+ getlist() {
+ this.loading = true
+ paylist(this.queryParam).then((res) => {
+ this.datalist = res.data.list
+ this.pagination.total = res.data.total
+ this.loading = false
+ })
+ },
+ onPageChange(page, pageSize) {
+ this.queryParam.pageNum = page
+ this.getlist()
+ },
+ onSizeChange(current, pageSize) {
+ this.queryParam.pageNum = current
+ this.queryParam.pageSize = pageSize
+ this.getlist()
+ },
+ },
}
</script>
<style scoped>
.greens {
- color: #52c41a;
+ color: #52c41a;
}
.reds {
- color: #f5222d;
+ color: #f5222d;
}
</style>
diff --git a/src/views/userlist/agentlist.vue b/src/views/userlist/agentlist.vue
index 597c2b4..eb9613c 100644
--- a/src/views/userlist/agentlist.vue
+++ b/src/views/userlist/agentlist.vue
@@ -10,11 +10,9 @@
v-model="agentqueryParam.id"
placeholder="请选择下级代理"
@focus="getclickagentlist"
- :loading="agentloading">
- <a-select-option
- v-for="(item, index) in clickagentlist"
- :key="index"
- :value="item.id">
+ :loading="agentloading"
+ >
+ <a-select-option v-for="(item, index) in clickagentlist" :key="index" :value="item.id">
{{ `${item.agentName}/${item.id}` }}
</a-select-option>
</a-select>
@@ -37,13 +35,12 @@
<a-button
type="primary"
icon="search"
- @click="agentqueryParam.pageNum = 1, pagination.current = 1,getagentlist()">查询
+ @click=";(agentqueryParam.pageNum = 1), (pagination.current = 1), getagentlist()"
+ >查询
</a-button>
- <a-button
- style="margin-left: 8px"
- @click="() => this.agentqueryParam = {}"
- icon="redo">重置</a-button>
-
+ <a-button style="margin-left: 8px" @click="() => (this.agentqueryParam = {})" icon="redo"
+ >重置</a-button
+ >
</span>
</a-form-item>
</a-col>
@@ -51,10 +48,7 @@
</a-form>
</div>
<div class="table-operator">
- <a-button
- type="primary"
- icon="plus"
- @click="$refs.addagentdialog.addUserdialog = true">添加下级代理</a-button>
+ <a-button type="primary" icon="plus" @click="$refs.addagentdialog.addUserdialog = true">添加下级代理</a-button>
</div>
</a-card>
@@ -65,15 +59,16 @@
:pagination="pagination"
:columns="columns"
:data-source="agentlist"
- rowKey="id">
- <span slot="agentName" slot-scope="text,record">
+ rowKey="id"
+ >
+ <span slot="agentName" slot-scope="text, record">
<template>
<div>
<span>{{ record.agentName }}({{ record.id }})</span>
</div>
</template>
</span>
- <span slot="parentName" slot-scope="text,record">
+ <span slot="parentName" slot-scope="text, record">
<template>
<div>
<span>{{ record.parentName }}</span>
@@ -81,18 +76,15 @@
</div>
</template>
</span>
- <template slot="action" slot-scope="text,record">
- <a
+ <template slot="action" slot-scope="text, record">
+ <!-- <a
slot="action"
href="javascript:;"
@click="$refs.editCapitalAgentdialog.getEditorder(record)">修改资金</a>
- <a-divider type="vertical" />
+ <a-divider type="vertical" /> -->
<a slot="action" href="javascript:;" @click="getDelagent(record)">删除代理</a>
<a-divider type="vertical" />
- <a
- slot="action"
- href="javascript:;"
- @click="$refs.EditAgentinfodialog.getEditorder(record)">修改代理</a>
+ <a slot="action" href="javascript:;" @click="$refs.EditAgentinfodialog.getEditorder(record)">修改代理</a>
</template>
</a-table>
</a-card>
@@ -102,184 +94,183 @@
</page-header-wrapper>
</template>
<script>
-
import editCapitalAgentdialog from './agentcomponents/editCapitalAgentdialog'
import EditAgentinfodialog from './agentcomponents/EditAgentinfodialog'
import addagentdialog from './agentcomponents/addagentdialog'
import { nextagent, agentdelAgent } from '@/api/home'
import moment from 'moment'
export default {
- name: 'AgentList',
- components: {
- editCapitalAgentdialog,
- EditAgentinfodialog,
- addagentdialog
- },
- data () {
- return {
- columns: [
- {
- title: '所属代理(Id)',
- scopedSlots: { customRender: 'agentName' },
- align: 'center'
- },
- {
- title: '代理编码',
- dataIndex: 'agentCode',
- align: 'center'
- },
- {
- title: '上级代理',
- dataIndex: 'parentName',
- align: 'center',
- scopedSlots: { customRender: 'parentName' }
- },
- {
- title: '代理手机号',
- dataIndex: 'agentPhone',
- align: 'center'
- },
- {
- title: '真实姓名',
- dataIndex: 'agentRealName',
- align: 'center'
- },
-
- {
- title: '客服链接',
- dataIndex: 'onLineServices',
- align: 'center'
- },
- {
- title: '总资金',
- dataIndex: 'totalMoney',
- align: 'center',
- customRender: (text, row, index) => {
- return text
- }
- },
- {
- title: '代理状态',
- dataIndex: 'isLock',
- align: 'center',
- scopedSlots: { customRender: 'isLock' }
- },
- {
- title: '注册时间',
- dataIndex: 'addTime',
- align: 'center',
- customRender: (text, row, index) => {
- return moment(text).format('YYYY-MM-DD HH:mm:ss')
- }
- },
- {
- title: '操作',
- key: 'action',
- align: 'center',
- scopedSlots: { customRender: 'action' }
- }
- ],
- // 表头
- pagination: {
- total: 0,
- current: 1,
- pageSize: 10, // 每页中显示10条数据
- showSizeChanger: true,
- pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
- onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
- onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
- showTotal: total => `共有 ${total} 条数据` // 分页中显示总的数据
- },
- loading: false,
- agentqueryParam: {
- id: undefined,
- phone: '',
- realName: '',
- pageNum: 1,
- pageSize: 10
- },
- agentloading: false,
- agentlist: [],
- clickagentlist: []
- }
- },
- created () {
- this.getagentlist()
- },
- methods: {
- getDelagent (val) {
- var that = this
- this.$confirm({
- title: '提示',
- content: '确认删除代理?此操作不可恢复',
- onOk () {
- var data = {
- agentId: val.id
- }
- agentdelAgent(data).then(res => {
- if (res.status == 0) {
- that.$message.success({ content: res.msg, duration: 2 })
- that.getinit()
- } else {
- that.$message.error({ content: res.msg })
- }
- })
- },
- onCancel () {
- console.log('Cancel')
- }
- })
+ name: 'AgentList',
+ components: {
+ editCapitalAgentdialog,
+ EditAgentinfodialog,
+ addagentdialog,
+ },
+ data() {
+ return {
+ columns: [
+ {
+ title: '所属代理(Id)',
+ scopedSlots: { customRender: 'agentName' },
+ align: 'center',
},
- getinit () {
- this.queryParam = {
- id: undefined,
- phone: '',
- realName: '',
- pageNum: 1,
- pageSize: 10
- }
- this.pagination.current = 1
- this.getagentlist()
+ {
+ title: '代理编码',
+ dataIndex: 'agentCode',
+ align: 'center',
},
- geteditinit () {
- this.getagentlist()
+ {
+ title: '上级代理',
+ dataIndex: 'parentName',
+ align: 'center',
+ scopedSlots: { customRender: 'parentName' },
},
- getagentlist () {
- var that = this
- this.loading = true
- nextagent(this.agentqueryParam).then(res => {
- this.agentlist = res.data.list
- this.pagination.total = res.data.total
- setTimeout(() => {
- that.loading = false
- }, 500)
- })
+ {
+ title: '代理手机号',
+ dataIndex: 'agentPhone',
+ align: 'center',
},
- getclickagentlist () {
- var that = this
- this.agentloading = true
- var data = {
- pageNum: 1,
- pageSize: 100
- }
- nextagent(data).then(res => {
- this.clickagentlist = res.data.list
- setTimeout(() => {
- that.agentloading = false
- }, 500)
- })
+ {
+ title: '真实姓名',
+ dataIndex: 'agentRealName',
+ align: 'center',
},
- onPageChange (page, pageSize) {
- this.agentqueryParam.pageNum = page
- this.pagination.current = page
- this.getagentlist()
+
+ {
+ title: '客服链接',
+ dataIndex: 'onLineServices',
+ align: 'center',
},
- onSizeChange (current, pageSize) {
- this.agentqueryParam.pageNum = current
- this.pagination.current = page
- this.agentqueryParam.pageSize = pageSize
- this.getagentlist()
- }
+ {
+ title: '总资金',
+ dataIndex: 'totalMoney',
+ align: 'center',
+ customRender: (text, row, index) => {
+ return text
+ },
+ },
+ {
+ title: '代理状态',
+ dataIndex: 'isLock',
+ align: 'center',
+ scopedSlots: { customRender: 'isLock' },
+ },
+ {
+ title: '注册时间',
+ dataIndex: 'addTime',
+ align: 'center',
+ customRender: (text, row, index) => {
+ return moment(text).format('YYYY-MM-DD HH:mm:ss')
+ },
+ },
+ {
+ title: '操作',
+ key: 'action',
+ align: 'center',
+ scopedSlots: { customRender: 'action' },
+ },
+ ],
+ // 表头
+ pagination: {
+ total: 0,
+ current: 1,
+ pageSize: 10, // 每页中显示10条数据
+ showSizeChanger: true,
+ pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
+ onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
+ onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
+ showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
+ },
+ loading: false,
+ agentqueryParam: {
+ id: undefined,
+ phone: '',
+ realName: '',
+ pageNum: 1,
+ pageSize: 10,
+ },
+ agentloading: false,
+ agentlist: [],
+ clickagentlist: [],
}
+ },
+ created() {
+ this.getagentlist()
+ },
+ methods: {
+ getDelagent(val) {
+ var that = this
+ this.$confirm({
+ title: '提示',
+ content: '确认删除代理?此操作不可恢复',
+ onOk() {
+ var data = {
+ agentId: val.id,
+ }
+ agentdelAgent(data).then((res) => {
+ if (res.status == 0) {
+ that.$message.success({ content: res.msg, duration: 2 })
+ that.getinit()
+ } else {
+ that.$message.error({ content: res.msg })
+ }
+ })
+ },
+ onCancel() {
+ console.log('Cancel')
+ },
+ })
+ },
+ getinit() {
+ this.queryParam = {
+ id: undefined,
+ phone: '',
+ realName: '',
+ pageNum: 1,
+ pageSize: 10,
+ }
+ this.pagination.current = 1
+ this.getagentlist()
+ },
+ geteditinit() {
+ this.getagentlist()
+ },
+ getagentlist() {
+ var that = this
+ this.loading = true
+ nextagent(this.agentqueryParam).then((res) => {
+ this.agentlist = res.data.list
+ this.pagination.total = res.data.total
+ setTimeout(() => {
+ that.loading = false
+ }, 500)
+ })
+ },
+ getclickagentlist() {
+ var that = this
+ this.agentloading = true
+ var data = {
+ pageNum: 1,
+ pageSize: 100,
+ }
+ nextagent(data).then((res) => {
+ this.clickagentlist = res.data.list
+ setTimeout(() => {
+ that.agentloading = false
+ }, 500)
+ })
+ },
+ onPageChange(page, pageSize) {
+ this.agentqueryParam.pageNum = page
+ this.pagination.current = page
+ this.getagentlist()
+ },
+ onSizeChange(current, pageSize) {
+ this.agentqueryParam.pageNum = current
+ this.pagination.current = page
+ this.agentqueryParam.pageSize = pageSize
+ this.getagentlist()
+ },
+ },
}
</script>
diff --git a/src/views/userlist/components/detailuserdialog.vue b/src/views/userlist/components/detailuserdialog.vue
index 69a55fe..a572bbc 100644
--- a/src/views/userlist/components/detailuserdialog.vue
+++ b/src/views/userlist/components/detailuserdialog.vue
@@ -1,7 +1,11 @@
<template>
<div>
<a-modal title="用户详情" :width="1000" :visible="userDialog" :footer="false" @cancel="userDialog = false">
- <a-descriptions bordered :title="currentDetails.realName ? currentDetails.realName : '未认证'" :column="{ xxl: 3, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
+ <a-descriptions
+ bordered
+ :title="currentDetails.realName ? currentDetails.realName : '未认证'"
+ :column="{ xxl: 3, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }"
+ >
<a-descriptions-item label="用户ID">
{{ currentDetails.id ? currentDetails.id : '--' }}
</a-descriptions-item>
@@ -44,33 +48,33 @@
<!-- <a-descriptions-item label="总资金(¥)">
{{ Number(currentDetails.userAmt + currentDetails.userIndexAmt).toFixed(2) }}
</a-descriptions-item> -->
- <a-descriptions-item label="印股总资金(¥)">
+ <!-- <a-descriptions-item label="印股总资金(¥)">
{{ currentDetails.userAmt ? currentDetails.userAmt : '0' }}
</a-descriptions-item>
<a-descriptions-item label="美股总资金(¥)">
{{ currentDetails.userIndexAmt ? currentDetails.userIndexAmt : '0' }}
- </a-descriptions-item>
+ </a-descriptions-item> -->
<!-- <a-descriptions-item label="期货总资金(¥)">
{{ currentDetails.userFutAmt ? currentDetails.userFutAmt : '0' }}
</a-descriptions-item> -->
- <a-descriptions-item label="印股可用资金(¥)">
+ <!-- <a-descriptions-item label="印股可用资金(¥)">
{{ currentDetails.enableAmt ? currentDetails.enableAmt : '0' }}
</a-descriptions-item>
<a-descriptions-item label="美股可用资金(¥)">
{{ currentDetails.enableIndexAmt ? currentDetails.enableIndexAmt : '0' }}
- </a-descriptions-item>
+ </a-descriptions-item> -->
<!-- <a-descriptions-item label="期货可用资金(¥)">
{{ currentDetails.enableFutAmt ? currentDetails.enableFutAmt : '0' }}
</a-descriptions-item> -->
<a-descriptions-item label="身份证正面">
- <img :src="currentDetails.img2Key" alt="" style="width:140px;height: 70px;">
+ <img :src="currentDetails.img2Key" alt="" style="width: 140px; height: 70px" />
</a-descriptions-item>
<a-descriptions-item label="身份证背面">
- <img :src="currentDetails.img1Key" alt="" style="width:140px;height: 70px;">
+ <img :src="currentDetails.img1Key" alt="" style="width: 140px; height: 70px" />
</a-descriptions-item>
<a-descriptions-item label="手持身份证">
- <img :src="currentDetails.img3Key" alt="" style="width:140px;height: 70px;">
+ <img :src="currentDetails.img3Key" alt="" style="width: 140px; height: 70px" />
</a-descriptions-item>
</a-descriptions>
</a-modal>
@@ -78,19 +82,17 @@
</template>
<script>
export default {
- components: {},
- props: {
- currentDetails: {
- type: Object
- }
+ components: {},
+ props: {
+ currentDetails: {
+ type: Object,
},
- data () {
- return {
- userDialog: false
- }
- },
- methods: {
-
+ },
+ data() {
+ return {
+ userDialog: false,
}
+ },
+ methods: {},
}
</script>
diff --git a/src/views/userlist/components/editCapitaluserdialog.vue b/src/views/userlist/components/editCapitaluserdialog.vue
index a2a649d..79be9db 100644
--- a/src/views/userlist/components/editCapitaluserdialog.vue
+++ b/src/views/userlist/components/editCapitaluserdialog.vue
@@ -6,20 +6,35 @@
:visible="editUserdialog"
:confirmLoading="editUserDialogloading"
@ok="OkeditUserdialog"
- @cancel="CanceleditUserdialog">
+ @cancel="CanceleditUserdialog"
+ >
<a-form :form="editUserform" ref="editUserform">
<a-form-item label="用户id" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入用户id" disabled v-decorator="['userId', {}]" />
</a-form-item>
<a-form-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
- <a-input placeholder="请输入金额" v-decorator="['amt', {rules: [{ required: true, message: '请输入金额', }] }]" />
+ <a-input
+ placeholder="请输入金额"
+ v-decorator="['amt', { rules: [{ required: true, message: '请输入金额' }] }]"
+ />
</a-form-item>
<a-form-item label="扣入款" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select
placeholder="请选择扣入款"
- v-decorator="['direction', { rules: [{ required: true, message: '请选择扣入款', }] }]">
+ v-decorator="['direction', { rules: [{ required: true, message: '请选择扣入款' }] }]"
+ >
<a-select-option value="1">扣款</a-select-option>
<a-select-option value="0">入款</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label="账户" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-select
+ placeholder="请选择账户"
+ v-decorator="['accectType', { rules: [{ required: true, message: '请选择账户' }] }]"
+ >
+ <a-select-option v-for="item in activeArr" :key="item.id" :value="item.accectType">{{
+ item | formatDate
+ }}</a-select-option>
</a-select>
</a-form-item>
</a-form>
@@ -27,66 +42,87 @@
</div>
</template>
<script>
-import { userupdateAmt } from '@/api/home'
+import { userupdateAmt, updateMoney } from '@/api/home'
import pick from 'lodash.pick'
export default {
- components: {},
- props: {
- getinit: {
- type: Function,
- default: function () {
- }
- }
+ components: {},
+ filters: {
+ formatDate(value) {
+ switch (value.accectType) {
+ case 'US':
+ return `美元(${value.symbol} ${value.availableBalance})`
+ case 'MAS':
+ return `马来西亚(${value.symbol} ${value.availableBalance})`
+
+ default:
+ break
+ }
},
- data () {
- return {
- labelCol: {
- xs: { span: 24 },
- sm: { span: 7 }
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 13 }
- },
- editUserform: this.$form.createForm(this),
- editUserdialog: false,
- editUserDialogloading: false,
- fields: ['amt', 'direction', 'userId'],
- currentDetails: {}
- }
+ },
+ props: {
+ getinit: {
+ type: Function,
+ default: function () {},
},
- methods: {
- getEditorder (val) {
- this.currentDetails = val
- this.editUserdialog = true
- this.fields.forEach(v => this.editUserform.getFieldDecorator(v))
- this.editUserform.setFieldsValue(pick(val, this.fields))
- this.editUserform.setFieldsValue(pick({ userId: val.id }, this.fields))
- },
- CanceleditUserdialog () {
- this.editUserdialog = false
- const form = this.$refs.editUserform.form
- form.resetFields()
- },
- OkeditUserdialog () {
- const form = this.$refs.editUserform.form
- form.validateFields((errors, values) => {
- if (!errors) {
- this.editUserDialogloading = true
- userupdateAmt(values).then(res => {
- if (res.status == 0) {
- this.editUserdialog = false
- this.$message.success({ content: res.msg, duration: 2 })
- form.resetFields()
- this.getinit()
- } else {
- this.$message.error({ content: res.msg })
- }
- this.editUserDialogloading = false
- })
- }
- })
- }
+ activeArr: {
+ type: Array,
+ default: [],
+ },
+ },
+ data() {
+ return {
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 7 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 13 },
+ },
+ editUserform: this.$form.createForm(this),
+ editUserdialog: false,
+ editUserDialogloading: false,
+ fields: ['amt', 'direction', 'userId'],
+ currentDetails: {},
}
+ },
+ methods: {
+ getEditorder(val) {
+ this.currentDetails = val
+ this.editUserdialog = true
+ this.fields.forEach((v) => this.editUserform.getFieldDecorator(v))
+ this.editUserform.setFieldsValue(pick(val, this.fields))
+ this.editUserform.setFieldsValue(pick({ userId: val.id }, this.fields))
+ },
+ CanceleditUserdialog() {
+ this.editUserdialog = false
+ const form = this.$refs.editUserform.form
+ form.resetFields()
+ },
+ OkeditUserdialog() {
+ const form = this.$refs.editUserform.form
+ form.validateFields((errors, values) => {
+ console.log(values, 'from')
+ const arr = this.activeArr.filter((item) => item.accectType === values.accectType)
+ let amt = values.direction == '1' ? 0 - Number(values.amt) : Number(values.amt)
+ if (!errors) {
+ this.editUserDialogloading = true
+ updateMoney({ id: arr[0].id, amt: amt }).then((res) => {
+ if (res.status == 0) {
+ this.editUserdialog = false
+ this.$message.success({ content: res.msg, duration: 2 })
+ form.resetFields()
+ this.getinit()
+ } else {
+ this.$message.error({ content: res.msg || '划转成功' })
+ }
+ this.editUserDialogloading = false
+ })
+ } else {
+ console.log(3333)
+ }
+ })
+ },
+ },
}
</script>
diff --git a/src/views/userlist/index.vue b/src/views/userlist/index.vue
index 6c7d70f..7d5a519 100644
--- a/src/views/userlist/index.vue
+++ b/src/views/userlist/index.vue
@@ -16,7 +16,8 @@
<a-col :md="12" :lg="6" :sm="24">
<a-form-item label="下级代理">
<a-select v-model="queryParam.agentId" placeholder="请选择下级代理">
- <a-select-option v-for="(item, index) in agentlist" :key="index" :value="item.id">{{ item.agentName }}
+ <a-select-option v-for="(item, index) in agentlist" :key="index" :value="item.id"
+ >{{ item.agentName }}
</a-select-option>
</a-select>
</a-form-item>
@@ -33,23 +34,26 @@
<a-input v-model="queryParam.phone" style="width: 100%" placeholder="请填写用户手机号" />
</a-form-item>
</a-col>
-
</a-row>
<a-row :gutter="48">
<a-col :md="12" :lg="6" :sm="24">
<a-form-item>
<span class="table-page-search-submitButtons">
- <a-button icon="redo" @click="() => this.queryParam = {}">重置</a-button>
+ <a-button icon="redo" @click="() => (this.queryParam = {})">重置</a-button>
<a-button
type="primary"
icon="search"
style="margin-left: 8px"
- @click="queryParam.pageNum = 1, pagination.current = 1,getuserList()">查询</a-button>
+ @click=";(queryParam.pageNum = 1), (pagination.current = 1), getuserList()"
+ >查询</a-button
+ >
<a-button
type="primary"
icon="plus"
style="margin-left: 8px"
- @click="$refs.adduserdialog.addUserdialog = true">添加账户</a-button>
+ @click="$refs.adduserdialog.addUserdialog = true"
+ >添加账户</a-button
+ >
</span>
</a-form-item>
</a-col>
@@ -65,44 +69,59 @@
@change="handleTableChange"
:columns="columns"
:data-source="dataList"
- rowKey="phone">
- <span slot="agentName" slot-scope="text,record">
+ rowKey="phone"
+ >
+ <span slot="agentName" slot-scope="text, record">
<template>
<div>
<span>{{ record.agentName }}({{ record.agentId }})</span>
</div>
</template>
</span>
- <span slot="isLock" slot-scope="text,record">
+ <span slot="isLock" slot-scope="text, record">
<template>
<div>
- <a-tag :color="record.isLock == 0 ? 'green' : 'red'">{{ record.isLock == 0 ? '可交易' : '不可交易' }}</a-tag>
+ <a-tag :color="record.isLock == 0 ? 'green' : 'red'">{{
+ record.isLock == 0 ? '可交易' : '不可交易'
+ }}</a-tag>
</div>
</template>
</span>
- <span slot="isLogin" slot-scope="text,record">
+ <span slot="isLogin" slot-scope="text, record">
<template>
<div>
- <a-tag :color="record.isLogin == 0 ? 'green' : 'red'">{{ record.isLogin == 0 ? '可登陆' : '不可登陆' }}</a-tag>
+ <a-tag :color="record.isLogin == 0 ? 'green' : 'red'">{{
+ record.isLogin == 0 ? '可登陆' : '不可登陆'
+ }}</a-tag>
</div>
</template>
</span>
- <template slot="action" slot-scope="text,record">
+ <template slot="action" slot-scope="text, record">
<a
slot="action"
href="javascript:;"
- @click="currentDetails = record; $refs.detailuserdialog.userDialog = true">用户详情</a>
+ @click="
+ currentDetails = record
+ $refs.detailuserdialog.userDialog = true
+ "
+ >用户详情</a
+ >
<a-divider type="vertical" />
<a slot="action" href="javascript:;" @click="$refs.EditUserinfodialog.getEditorder(record)">编辑</a>
<a-divider type="vertical" />
<a slot="action" href="javascript:;" @click="$refs.editUserbankdialog.getbankinfo(record)">银行卡</a>
<a-divider type="vertical" />
- <a slot="action" href="javascript:;" @click="$refs.editCapitaluserdialog.getEditorder(record)">资金</a>
+ <a slot="action" href="javascript:;" @click="getMoneyzj(record)">资金</a>
<a-divider type="vertical" />
<a
slot="action"
href="javascript:;"
- @click="currentDetails = record; $refs.audituserdialog.userDialog = true">实名审核</a>
+ @click="
+ currentDetails = record
+ $refs.audituserdialog.userDialog = true
+ "
+ >实名审核</a
+ >
<a-divider type="vertical" />
<a slot="action" href="javascript:;" @click="getDeluser(record)">删除</a>
</template>
@@ -112,12 +131,16 @@
<detailuserdialog ref="detailuserdialog" :currentDetails="currentDetails"></detailuserdialog>
<EditUserinfodialog ref="EditUserinfodialog" :getinit="geteditinit" :agentlist="agentlist"></EditUserinfodialog>
<editUserbankdialog ref="editUserbankdialog" :getinit="geteditinit"></editUserbankdialog>
- <editCapitaluserdialog ref="editCapitaluserdialog" :getinit="geteditinit"></editCapitaluserdialog>
+ <editCapitaluserdialog
+ :activeArr="activeArr"
+ ref="editCapitaluserdialog"
+ :getinit="geteditinit"
+ ></editCapitaluserdialog>
<audituserdialog ref="audituserdialog" :currentDetails="currentDetails" :getinit="geteditinit"></audituserdialog>
</page-header-wrapper>
</template>
<script>
-import { usermanag, nextagent, userdelete } from '@/api/home'
+import { usermanag, nextagent, userdelete, getMoney, updateMoney } from '@/api/home'
import adduserdialog from './components/adduserdialog'
import detailuserdialog from './components/detailuserdialog'
import EditUserinfodialog from './components/EditUserinfodialog'
@@ -133,9 +156,9 @@
EditUserinfodialog,
editUserbankdialog,
editCapitaluserdialog,
- audituserdialog
+ audituserdialog,
},
- data () {
+ data() {
return {
queryParam: {
agentId: undefined,
@@ -143,36 +166,36 @@
phone: '',
pageNum: 1,
pageSize: 10,
- accountType: 0
+ accountType: 0,
},
labelCol: {
xs: { span: 24 },
- sm: { span: 7 }
+ sm: { span: 7 },
},
wrapperCol: {
xs: { span: 24 },
- sm: { span: 13 }
+ sm: { span: 13 },
},
columns: [
{
title: '用户ID',
dataIndex: 'id',
- align: 'center'
+ align: 'center',
},
{
title: '所属代理(Id)',
scopedSlots: { customRender: 'agentName' },
- align: 'center'
+ align: 'center',
},
{
title: '手机号',
dataIndex: 'phone',
- align: 'center'
+ align: 'center',
},
{
title: '真实姓名',
dataIndex: 'realName',
- align: 'center'
+ align: 'center',
},
{
title: '总资金',
@@ -180,7 +203,7 @@
align: 'center',
customRender: (text, row, index) => {
return text.toFixed(2)
- }
+ },
},
{
title: '认证信息',
@@ -188,19 +211,19 @@
align: 'center',
customRender: (text, row, index) => {
return text == 0 ? '待认证' : text == 1 ? '待审核' : text == 2 ? '认证成功' : text == 3 ? '驳回' : ''
- }
+ },
},
{
title: '交易状态',
dataIndex: 'isLock',
align: 'center',
- scopedSlots: { customRender: 'isLock' }
+ scopedSlots: { customRender: 'isLock' },
},
{
title: '登录状态',
dataIndex: 'isLogin',
align: 'center',
- scopedSlots: { customRender: 'isLogin' }
+ scopedSlots: { customRender: 'isLogin' },
},
{
title: '注册时间',
@@ -208,14 +231,14 @@
align: 'center',
customRender: (text, row, index) => {
return moment(text).format('YYYY-MM-DD HH:mm:ss')
- }
+ },
},
{
title: '操作',
key: 'action',
align: 'center',
- scopedSlots: { customRender: 'action' }
- }
+ scopedSlots: { customRender: 'action' },
+ },
], // 表头
dataList: [],
pagination: {
@@ -226,32 +249,45 @@
pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
- showTotal: total => `共有 ${total} 条数据` // 分页中显示总的数据
+ showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
},
loading: false,
agentqueryParam: {
pageNum: 1,
- pageSize: 100
+ pageSize: 100,
},
agentlist: [],
- currentDetails: {}
+ currentDetails: {},
+ activeArr: [],
}
},
- created () {
+ created() {
this.getuserList()
+
this.getagentlist()
},
methods: {
- getDeluser (val) {
+ getMoneyzj(record) {
+ console.log(record.id)
+ getMoney({ userId: 391 }).then((res) => {
+ if (res.status === 0) {
+ const arr = res.data.filter((item) => item.accectType !== 'ALL')
+ this.activeArr = arr
+ this.$refs.editCapitaluserdialog.getEditorder(record)
+ }
+ })
+ },
+
+ getDeluser(val) {
var that = this
this.$confirm({
title: '提示',
content: '确认删除该用户吗?此操作不可恢复,将删除该用户所有的充值、提现与持仓记录!',
- onOk () {
+ onOk() {
var data = {
- userId: val.id
+ userId: val.id,
}
- userdelete(data).then(res => {
+ userdelete(data).then((res) => {
if (res.status == 0) {
that.$message.success({ content: res.msg, duration: 2 })
that.getinit()
@@ -260,30 +296,30 @@
}
})
},
- onCancel () {
+ onCancel() {
console.log('Cancel')
- }
+ },
})
},
- getinit () {
+ getinit() {
this.queryParam = {
agentId: undefined,
realName: '',
phone: '',
pageNum: 1,
pageSize: 10,
- accountType: 0
+ accountType: 0,
}
this.pagination.current = 1
this.getuserList()
},
- geteditinit () {
+ geteditinit() {
this.getuserList()
},
- getuserList () {
+ getuserList() {
var that = this
this.loading = true
- usermanag(this.queryParam).then(res => {
+ usermanag(this.queryParam).then((res) => {
this.dataList = res.data.list
this.pagination.total = res.data.total
setTimeout(() => {
@@ -291,25 +327,23 @@
}, 500)
})
},
- getagentlist () {
- nextagent(this.agentqueryParam).then(res => {
+ getagentlist() {
+ nextagent(this.agentqueryParam).then((res) => {
this.agentlist = res.data.list
})
},
- onPageChange (page, pageSize) {
+ onPageChange(page, pageSize) {
this.queryParam.pageNum = page
this.pagination.current = page
this.getuserList()
},
- onSizeChange (current, pageSize) {
+ onSizeChange(current, pageSize) {
this.queryParam.pageNum = current
this.pagination.current = page
this.queryParam.pageSize = pageSize
this.getuserList()
},
- handleTableChange () {
-
- }
- }
+ handleTableChange() {},
+ },
}
</script>
--
Gitblit v1.9.3