Compare commits
7 Commits
gyq_openpl
...
wwz
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65ca15721e | ||
|
|
e0fb7fa514 | ||
|
|
3ead5c69ae | ||
|
|
7c2183ca3d | ||
|
|
b80274bc83 | ||
|
|
3db00932f7 | ||
| 786bceb7a4 |
@@ -3,4 +3,4 @@ ENV = development
|
||||
|
||||
# 本地环境接口地址
|
||||
# VITE_API_URL = 'http://admintestapi.sxczgkj.cn/admin/'
|
||||
VITE_API_URL = 'http://admintestapi.sxczgkj.cn/admin/'
|
||||
VITE_API_URL = 'https://openpm.sxczgkj.cn/'
|
||||
@@ -2,4 +2,4 @@
|
||||
ENV = production
|
||||
|
||||
# 线上环境接口地址
|
||||
VITE_API_URL = 'http://admintestapi.sxczgkj.cn/admin/'
|
||||
VITE_API_URL = 'https://openpm.sxczgkj.cn/'
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,7 +10,6 @@ lerna-debug.log*
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
dist.zip
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favico.ico" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "vue-admin",
|
||||
"private": true,
|
||||
"version": "1.3.14",
|
||||
"version": "1.3.25",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -13,7 +13,6 @@
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"axios": "^1.3.4",
|
||||
"clipboard": "^2.0.11",
|
||||
"echarts": "^5.4.2",
|
||||
"element-china-area-data": "^6.1.0",
|
||||
"element-plus": "^2.3.0",
|
||||
|
||||
@@ -7,32 +7,28 @@ import { dayjs } from 'element-plus';
|
||||
export function getIndexData() {
|
||||
return request({
|
||||
method: "POST",
|
||||
url: "/user/getIndexData"
|
||||
url: "/agent/index"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 获取首页图表数据
|
||||
* @returns
|
||||
*/
|
||||
export function getChartData(type, reqUserId) {
|
||||
const m = {
|
||||
1: '/user/getDayOrder', // 获取近七日收单额
|
||||
2: '/user/getDayProfit', // 获取近七日收益
|
||||
3: '/user/getMonthOrder', // 获取近一年的收单额
|
||||
4: '/user/getMonthProfit' // 获取近一年的收益数据
|
||||
}
|
||||
const params = {
|
||||
year: dayjs().format('YYYY'),
|
||||
reqUserId: reqUserId
|
||||
}
|
||||
export function getChartData() {//收益
|
||||
return request({
|
||||
method: "GET",
|
||||
url: m[type],
|
||||
params
|
||||
method: "POST",
|
||||
url: '/agent/profit',
|
||||
// params
|
||||
});
|
||||
}
|
||||
export function agentamount() {//流水
|
||||
return request({
|
||||
method: "POST",
|
||||
url: '/agent/amount',
|
||||
// params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传OSS
|
||||
* @param {*} params
|
||||
@@ -98,37 +94,16 @@ export function unread(params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取总流水
|
||||
* 身份证姓名认证
|
||||
|
||||
* @returns
|
||||
*/
|
||||
export function querySumAmount() {
|
||||
export function agentidcardoauth(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/open/querySumAmount"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取七日数据
|
||||
* @returns
|
||||
*/
|
||||
export function queryRecentlyData() {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/open/queryRecentlyData"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取近一年流水
|
||||
* @returns
|
||||
*/
|
||||
export function queryRecentYears() {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/open/queryRecentYears"
|
||||
method: "POST",
|
||||
url: "/agent/idcardoauth",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -41,11 +41,11 @@ export function modifyFee(params) {
|
||||
* 获取收益信息
|
||||
* @returns
|
||||
*/
|
||||
export function queryProfit(params) {
|
||||
export function queryProfit(data) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/agency/queryProfit",
|
||||
params
|
||||
method: "post",
|
||||
url: "/agent/accumulateprofit",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
@@ -76,22 +76,32 @@ export function getUserBalance() {
|
||||
* 提现
|
||||
* @returns
|
||||
*/
|
||||
export function withdrawalProfit(params) {
|
||||
export function withdrawalProfit(data) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/user/withdrawalProfit",
|
||||
params
|
||||
method: "post",
|
||||
url: "/agent/withdrowsub",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 绑定支付宝
|
||||
* @returns
|
||||
*/
|
||||
export function agentalipay(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/agent/alipay",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提现流水
|
||||
* @returns
|
||||
*/
|
||||
export function getUserOutFlow(params) {
|
||||
export function getUserOutFlow(data) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/user/getUserOutFlow",
|
||||
params
|
||||
method: "post",
|
||||
url: "/agent/withdrawerlist",
|
||||
data
|
||||
});
|
||||
}
|
||||
24
src/api/password.js
Normal file
24
src/api/password.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import request from "@/utils/request.js";
|
||||
import { dayjs } from 'element-plus';
|
||||
/**
|
||||
* 获取验证码
|
||||
* @returns
|
||||
*/
|
||||
export function agentsendsms(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/agent/sendsms",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 重置密码
|
||||
* @returns
|
||||
*/
|
||||
export function agentresetpwd(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "/agent/resetpwd",
|
||||
data
|
||||
});
|
||||
}
|
||||
@@ -4,11 +4,11 @@ import request from "@/utils/request.js";
|
||||
* 获取商户列表
|
||||
* @returns
|
||||
*/
|
||||
export function queryCustormerFlow(params) {
|
||||
export function queryCustormerFlow(data) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/agency/queryCustormerFlow",
|
||||
params
|
||||
method: "post",
|
||||
url: "/agent/storelist",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
@@ -273,27 +273,3 @@ export function updateAuthentication(params) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询开发私钥
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function queryOrgan() {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/open/queryOrgan'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单信息
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function queryOrder(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/open/queryOrder',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from "@/utils/request.js";
|
||||
export function login(data) {
|
||||
return request({
|
||||
method: "POST",
|
||||
url: "/user/doLogin",
|
||||
url: "agent/login",
|
||||
data,
|
||||
});
|
||||
}
|
||||
@@ -26,3 +26,28 @@ export function getNotices(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 代理商注册
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function register(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/agent/register',
|
||||
data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 发送验证码
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function agentsendsms(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/agent/sendsms',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import request from "@/utils/request.js";
|
||||
* 提现申请查询
|
||||
* @returns
|
||||
*/
|
||||
export function getOutFlow(params) {
|
||||
export function getOutFlow(data) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/user/getOutFlow",
|
||||
params
|
||||
method: "post",
|
||||
url: "/agent/withdrawerlist",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,10 +16,10 @@ export function getOutFlow(params) {
|
||||
* 提现审核
|
||||
* @returns
|
||||
*/
|
||||
export function modifyOutFlow(params) {
|
||||
export function modifyOutFlow(data) {
|
||||
return request({
|
||||
method: "get",
|
||||
url: "/user/modifyOutFlow",
|
||||
params
|
||||
method: "post",
|
||||
url: "/agent/withdrawalreview",
|
||||
data
|
||||
});
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="chart_header">
|
||||
<!-- <div class="item" :class="{ active1: chartType == 1 }" @click="chartTypeChange(1)">
|
||||
<div class="item" :class="{ active1: chartType == 1 }" @click="chartTypeChange(1)">
|
||||
<div class="icon"></div>
|
||||
<span>收益</span>
|
||||
</div> -->
|
||||
<div class="item" :class="{ active2: chartType == 2 }">
|
||||
</div>
|
||||
<div class="item" :class="{ active2: chartType == 2 }" @click="chartTypeChange(2)">
|
||||
<div class="icon"></div>
|
||||
<span>流水</span>
|
||||
</div>
|
||||
@@ -16,7 +16,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { queryRecentlyData, queryRecentYears } from '@/api/home.js'
|
||||
import { getChartData,agentamount } from '@/api/home.js'
|
||||
import * as echarts from "echarts"
|
||||
import { dayjs } from 'element-plus'
|
||||
import hooks from '@/hooks'
|
||||
@@ -31,7 +31,7 @@ const chartsObj = {
|
||||
};
|
||||
|
||||
const chartLoading = ref(true)
|
||||
const chartType = ref(2)
|
||||
const chartType = ref(1)
|
||||
const chartYear = ref(dayjs().format('YYYY'))
|
||||
const props = defineProps({
|
||||
userId: {
|
||||
@@ -127,31 +127,25 @@ async function getChartDataMethod() {
|
||||
let yearDataTime = ''
|
||||
let sevenData = ''
|
||||
let sevenDataTime = ''
|
||||
// if (chartType.value == 1) {
|
||||
// // 收益
|
||||
// const res1 = await getChartData(4, props.userId)
|
||||
// const res2 = await getChartData(2, props.userId)
|
||||
// yearData = res1.map(item => item.price.toFixed(2))
|
||||
// sevenData = res2.map(item => item.price.toFixed(2))
|
||||
// sevenDataTime = res2.map(item => dayjs(item.times).format('MM/DD'))
|
||||
// } else {
|
||||
// // 流水
|
||||
// const res1 = await getChartData(3, props.userId)
|
||||
// const res2 = await getChartData(1, props.userId)
|
||||
// yearData = res1.map(item => item.consumeFee)
|
||||
// sevenData = res2.map(item => item.consumeFee)
|
||||
// sevenDataTime = res2.map(item => dayjs(item.times).format('MM/DD'))
|
||||
// }
|
||||
const res1 = await queryRecentYears()
|
||||
const res2 = await queryRecentlyData()
|
||||
yearData = res1.map(item => item.amount)
|
||||
yearDataTime = res1.map(item => item.mymonth)
|
||||
sevenData = res2.map(item => item.amount)
|
||||
sevenDataTime = res2.map(item => item.createDate)
|
||||
if (chartType.value == 1) {
|
||||
// 收益
|
||||
const res = await getChartData()
|
||||
yearData = res.year_profit.map(item => item.profit)
|
||||
yearDataTime = res.year_profit.map(item => item.date)
|
||||
sevenData = res.m_profit.map(item => item.profit)
|
||||
sevenDataTime = res.m_profit.map(item => item.date)
|
||||
} else {
|
||||
// 流水agentamount
|
||||
const res = await agentamount()
|
||||
yearData = res.year_amount.map(item => item.amount)
|
||||
yearDataTime = res.year_amount.map(item => item.date)
|
||||
sevenData = res.m_amount.map(item => item.amount)
|
||||
sevenDataTime = res.m_amount.map(item => item.date)
|
||||
}
|
||||
initDeicount(yearData, yearDataTime, sevenData, sevenDataTime)
|
||||
chartLoading.value = false
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import { useUser } from "@/store/user.js";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
// history: createWebHistory('/dist'),
|
||||
routes: [...notFoundAndNoPower, ...fullScreenRouting, ...staticRoutes],
|
||||
});
|
||||
|
||||
@@ -17,7 +18,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
NProgress.start();
|
||||
const token = _hook.useLocalStorage.get("token");
|
||||
const storeUser = useUser();
|
||||
if (to.path === "/login" && !token) {
|
||||
if ((to.path === "/login" || to.path === "/register") && !token) {
|
||||
next();
|
||||
NProgress.done();
|
||||
} else {
|
||||
|
||||
@@ -59,6 +59,24 @@ export const fullScreenRouting = [
|
||||
isHide: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/register",
|
||||
name: "register",
|
||||
component: () => import("@/views/register/register.vue"),
|
||||
meta: {
|
||||
title: "注册",
|
||||
isHide: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/password",
|
||||
name: "password",
|
||||
component: () => import("@/views/password/password.vue"),
|
||||
meta: {
|
||||
title: "修改密码",
|
||||
isHide: true,
|
||||
},
|
||||
}
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -388,104 +406,62 @@ export const asyncRoutes = [
|
||||
path: '/shop_manage',
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '商户信息',
|
||||
title: '商家管理',
|
||||
// roles: ['FO', 'SO', 'AG', 'FB', 'SB'],
|
||||
icon: 'Handbag'
|
||||
},
|
||||
redirect: '/shop_manage/shop_list',
|
||||
children: [
|
||||
// {
|
||||
// path: '/shop_manage/shop_list',
|
||||
// name: 'shop_list',
|
||||
// component: () => import('@/views/organization/shop_list.vue'),
|
||||
// meta: {
|
||||
// title: '商家列表',
|
||||
// icon: 'Tickets'
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: '/shop_manage/shop_detail',
|
||||
name: 'shop_detail',
|
||||
component: () => import('@/views/organization/shop_detail.vue'),
|
||||
path: '/shop_manage/shop_list',
|
||||
name: 'shop_list',
|
||||
component: () => import('@/views/organization/shop_list.vue'),
|
||||
meta: {
|
||||
title: '基础信息',
|
||||
title: '用户列表',
|
||||
icon: 'Tickets'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: '/shop_manage/shop_detail',
|
||||
// name: 'shop_detail',
|
||||
// component: () => import('@/views/organization/shop_detail.vue'),
|
||||
// meta: {
|
||||
// title: '详情',
|
||||
// isHide: true,
|
||||
// activeMenu: '/shop_manage/shop_list'
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: '/shop_manage/maker_apply',
|
||||
// component: () => import('@/views/organization/maker_apply.vue'),
|
||||
// meta: {
|
||||
// title: '创客申请',
|
||||
// icon: 'User'
|
||||
// }
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/withdraw_manage',
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '提现管理',
|
||||
roles: ['admin'],
|
||||
// roles: ['FO', 'SO'],
|
||||
isHide: true
|
||||
},
|
||||
redirect: '/withdraw_manage/withdraw_list',
|
||||
children: [
|
||||
{
|
||||
path: '/shop_manage/appkey',
|
||||
component: () => import('@/views/organization/appkey.vue'),
|
||||
path: '/withdraw_manage/withdraw_list',
|
||||
component: () => import('@/views/withdraw/withdraw_list.vue'),
|
||||
meta: {
|
||||
title: '支付参数',
|
||||
icon: 'Connection'
|
||||
title: '提现申请',
|
||||
icon: 'CreditCard'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/order',
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '订单管理',
|
||||
// roles: ['FO', 'SO', 'AG', 'FB', 'SB'],
|
||||
icon: 'Handbag',
|
||||
isHide: true
|
||||
},
|
||||
redirect: '/order/order_list',
|
||||
children: [
|
||||
{
|
||||
path: '/order/order_list',
|
||||
name: 'order_list',
|
||||
component: () => import('@/views/order/order_list.vue'),
|
||||
meta: {
|
||||
title: '订单列表',
|
||||
icon: 'Tickets'
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/doc',
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '开发文档',
|
||||
// roles: ['FO', 'SO', 'AG', 'FB', 'SB'],
|
||||
icon: 'Handbag',
|
||||
isHide: true
|
||||
},
|
||||
redirect: '/doc/doc_detail',
|
||||
children: [
|
||||
{
|
||||
path: '/doc/doc_detail',
|
||||
name: 'doc_detail',
|
||||
component: () => import('@/views/doc/doc_detail.vue'),
|
||||
meta: {
|
||||
title: '开发文档',
|
||||
icon: 'Document'
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/withdraw_manage',
|
||||
// component: layout,
|
||||
// meta: {
|
||||
// title: '提现管理',
|
||||
// // roles: ['FO', 'SO'],
|
||||
// isHide: true
|
||||
// },
|
||||
// redirect: '/withdraw_manage/withdraw_list',
|
||||
// children: [
|
||||
// {
|
||||
// path: '/withdraw_manage/withdraw_list',
|
||||
// component: () => import('@/views/withdraw/withdraw_list.vue'),
|
||||
// meta: {
|
||||
// title: '提现申请',
|
||||
// icon: 'CreditCard'
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// path: '/device_manage',
|
||||
// component: layout,
|
||||
@@ -505,25 +481,26 @@ export const asyncRoutes = [
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// path: '/total_earnings',
|
||||
// component: layout,
|
||||
// meta: {
|
||||
// title: '累计收益管理',
|
||||
// isHide: true
|
||||
// },
|
||||
// redirect: '/total_earnings/total_earnings_list',
|
||||
// children: [
|
||||
// {
|
||||
// path: '/total_earnings/total_earnings_list',
|
||||
// component: () => import('@/views/total_earnings/total_earnings_list.vue'),
|
||||
// meta: {
|
||||
// title: '累计收益',
|
||||
// icon: 'Coin'
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/total_earnings',
|
||||
component: layout,
|
||||
meta: {
|
||||
title: '累计收益管理',
|
||||
isHide: true,
|
||||
roles: ['agent']
|
||||
},
|
||||
redirect: '/total_earnings/total_earnings_list',
|
||||
children: [
|
||||
{
|
||||
path: '/total_earnings/total_earnings_list',
|
||||
component: () => import('@/views/total_earnings/total_earnings_list.vue'),
|
||||
meta: {
|
||||
title: '累计收益',
|
||||
icon: 'Coin'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/promotion',
|
||||
// component: layout,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ENUMS } from "@/utils/enums.js";
|
||||
export const useConfigure = defineStore("useConfigure", {
|
||||
state: () => {
|
||||
return {
|
||||
projectName: '银收客开放平台',
|
||||
projectName: '银收客开放平台代理端',
|
||||
defaultActive: "/home", // 默认选中的菜单
|
||||
configure: {
|
||||
// ---------- 主题 ----------
|
||||
|
||||
@@ -30,9 +30,9 @@ export const useUser = defineStore("useUser", {
|
||||
userlogin(param) {
|
||||
return login(param).then((res) => {
|
||||
// console.log(res);
|
||||
this.userInfo = res;
|
||||
this.userInfo = res.userinfo;
|
||||
_hook.useLocalStorage.set("token", this.userInfo.token);
|
||||
_hook.useLocalStorage.set("userInfo", this.userInfo.user);
|
||||
_hook.useLocalStorage.set("userInfo", this.userInfo);
|
||||
return this.userInfo;
|
||||
});
|
||||
},
|
||||
@@ -47,17 +47,17 @@ export const useUser = defineStore("useUser", {
|
||||
/**
|
||||
* 获取消息列表
|
||||
*/
|
||||
async getNotices() {
|
||||
try {
|
||||
const res = await getNotices({
|
||||
currPage: 1,
|
||||
size: 10
|
||||
})
|
||||
this.notices.num = res.unread
|
||||
this.notices.list = res.list.list
|
||||
} catch (error) {
|
||||
console.error('获取消息列表error=', error)
|
||||
}
|
||||
}
|
||||
// async getNotices() {
|
||||
// try {
|
||||
// const res = await getNotices({
|
||||
// currPage: 1,
|
||||
// size: 10
|
||||
// })
|
||||
// this.notices.num = res.unread
|
||||
// this.notices.list = res.list.list
|
||||
// } catch (error) {
|
||||
// console.error('获取消息列表error=', error)
|
||||
// }
|
||||
// }
|
||||
},
|
||||
});
|
||||
|
||||
@@ -5,8 +5,8 @@ import NProgress from "nprogress";
|
||||
import router from '@/router'
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: import.meta.env.MODE == 'development' ? '/api/' : '/api/admin',
|
||||
// withCredentials: true, // 跨域请求时发送 cookies
|
||||
baseURL: import.meta.env.MODE == 'development' ? '/api/' : 'https://openpm.sxczgkj.cn/proxy/',
|
||||
// withCredentials: false, // 跨域请求时发送 cookies
|
||||
timeout: 5000, // 请求超时
|
||||
});
|
||||
|
||||
@@ -20,6 +20,7 @@ service.interceptors.request.use(
|
||||
// ['X-Token'] 是自定义标题键
|
||||
// 请根据实际情况修改
|
||||
config.headers["token"] = _hook.useLocalStorage.get("token");
|
||||
// config.headers["token"] = '967d5389-d853-48eb-b46e-4353208f5e05';
|
||||
config.headers["loginName"] = _hook.useLocalStorage.get("userInfo").loginName;
|
||||
config.headers["userId"] = _hook.useLocalStorage.get("userInfo").userId;
|
||||
// config.headers['Content-Type'] = 'application/json'
|
||||
@@ -39,7 +40,7 @@ service.interceptors.response.use(
|
||||
NProgress.done();
|
||||
// 对响应数据做点什么
|
||||
if (+response.status === 200) {
|
||||
if (+response.data.code == '000000') {
|
||||
if (+response.data.code == 1) {
|
||||
return response.data.data;
|
||||
} else if (+response.data.code == '999999') {
|
||||
ElMessage.error('登录已过期,请重新登录')
|
||||
@@ -49,8 +50,8 @@ service.interceptors.response.use(
|
||||
return Promise.reject('登录已过期,请重新登录')
|
||||
} else {
|
||||
// 响应错误
|
||||
ElMessage.error(response.data.message)
|
||||
return Promise.reject(response.data.message)
|
||||
ElMessage.error(response.data.msg)
|
||||
return Promise.reject(response.data.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<template>
|
||||
<iframe src="https://openplat.sxczgkj.cn/" class="iframe"></iframe>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.iframe {
|
||||
border: none;
|
||||
width: 100%;
|
||||
height: 99%;
|
||||
border-radius: 14px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<div class="header_title">
|
||||
欢迎回来!{{ storeUser.userInfo.loginName }}
|
||||
<div>
|
||||
欢迎回来!{{ storeUser.userInfo.username }}
|
||||
</div>
|
||||
<div v-if="storeUser.userInfo.invite">邀请码:{{ storeUser.userInfo.invite }}</div>
|
||||
</div>
|
||||
<div class="data_row">
|
||||
<div class="item">
|
||||
@@ -9,10 +12,10 @@
|
||||
<img class="img" src="../assets/home_icon1.png">
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="title">今日收款</div>
|
||||
<div class="title">团队总流水</div>
|
||||
<div class="num">
|
||||
<count-to :start-val="0" :decimals="2" :end-val="homeData.sumConsumeFee" :duration="1000" />
|
||||
<!-- {{ homeData.sumConsumeFee }} -->
|
||||
<!-- <count-to :start-val="0" :decimals="2" :end-val="homeData.sumConsumeFee" :duration="1000" /> -->
|
||||
{{ homeData.sumConsumeFee }}
|
||||
<span class="i">元</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,26 +25,28 @@
|
||||
<img class="img" src="../assets/home_icon2.png">
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="title">总收款</div>
|
||||
<div class="title">总收益</div>
|
||||
<div class="num">
|
||||
<count-to :start-val="0" :decimals="2" :end-val="homeData.sumfansShareMoney" :duration="1000" />
|
||||
<!-- <count-to :start-val="0" :decimals="2" :end-val="homeData.sumfansShareMoney" :duration="1000" /> -->
|
||||
{{ homeData.sumfansShareMoney }}
|
||||
<span class="i">元</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item">
|
||||
<div class="item">
|
||||
<div class="icon">
|
||||
<img class="img" src="../assets/home_icon3.png">
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="title">今日收益</div>
|
||||
<div class="num">
|
||||
<count-to :start-val="0" :decimals="2" :end-val="homeData.yestedayShareMoney" :duration="1000" />
|
||||
<!-- <count-to :start-val="0" :decimals="2" :end-val="homeData.yestedayShareMoney" :duration="1000" /> -->
|
||||
{{ homeData.yestedayShareMoney }}
|
||||
<span class="i">元</span>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="item">
|
||||
</div>
|
||||
<div class="item" v-if="storeUser.userInfo.is_admin != 1">
|
||||
<div class="icon">
|
||||
<img class="img" src="../assets/home_icon4.png">
|
||||
</div>
|
||||
@@ -52,21 +57,90 @@
|
||||
<span class="i">%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mt15">
|
||||
<chart-card :user-id="storeUser.userInfo.userId" />
|
||||
</div>
|
||||
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" :show-close="false" v-model="dialogVisible"
|
||||
title="实名认证" width="500" :before-close="handleClose">
|
||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" :rules="rules" label-width="auto"
|
||||
class="demo-ruleForm" :size="formSize" status-icon>
|
||||
<el-form-item label="身份姓名" prop="id_card_name">
|
||||
<el-input v-model="ruleForm.id_card_name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="id_number">
|
||||
<el-input v-model="ruleForm.id_number" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" :loading="ruleForm.loading" style="width:70%; margin: 0 auto;"
|
||||
@click="submitFormdialog">
|
||||
确认
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getIndexData, querySumAmount } from '@/api/home.js'
|
||||
import { getIndexData, agentidcardoauth } from '@/api/home.js'
|
||||
import { useUser } from "@/store/user.js";
|
||||
import chartCard from '@/components/chartCard.vue';
|
||||
import _hook from "@/hooks/index.js";
|
||||
|
||||
const storeUser = useUser();
|
||||
|
||||
const dialogVisible = ref(storeUser.userInfo.is_id_card == 0 ? true : false)
|
||||
|
||||
let ruleForm = reactive({
|
||||
id_card_name: '',
|
||||
id_number: '',
|
||||
loading: false
|
||||
|
||||
})
|
||||
|
||||
const rules = reactive({
|
||||
id_card_name: [
|
||||
{
|
||||
required: true,
|
||||
message: '身份姓名不能为空',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
id_number: [
|
||||
{
|
||||
required: true,
|
||||
message: '身份证号不能为空',
|
||||
trigger: 'change',
|
||||
},
|
||||
]
|
||||
})
|
||||
const ruleFormRef = ref("");
|
||||
|
||||
const submitFormdialog = async () => {
|
||||
//通过 ref 的值触发验证
|
||||
await ruleFormRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
ruleForm.loading = true
|
||||
const data = {
|
||||
id_card_name: ruleForm.id_card_name,
|
||||
id_number: ruleForm.id_number
|
||||
};
|
||||
agentidcardoauth(data).then((res) => {
|
||||
ElMessage.success('实名验证通过')
|
||||
console.log(res)
|
||||
_hook.useLocalStorage.set("token", res.userinfo.token);
|
||||
_hook.useLocalStorage.set("userInfo", res.userinfo);
|
||||
dialogVisible.value = false
|
||||
ruleForm.loading = false
|
||||
}).catch(err => {
|
||||
ruleForm.loading = false
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let homeData = reactive({
|
||||
sumConsumeFee: 0,
|
||||
sumfansShareMoney: 0,
|
||||
@@ -77,11 +151,11 @@ let homeData = reactive({
|
||||
// 获取首页数据
|
||||
async function getIndexDataHandle() {
|
||||
try {
|
||||
const res = await querySumAmount()
|
||||
homeData.sumConsumeFee = res.yestedayAmount
|
||||
homeData.sumfansShareMoney = res.sumAmount
|
||||
homeData.yestedayShareMoney = res.yestedayShareMoney
|
||||
homeData.currentFee = res.currentFee
|
||||
const res = await getIndexData()
|
||||
homeData.sumConsumeFee = res.amount_price
|
||||
homeData.sumfansShareMoney = res.amount_price_income
|
||||
homeData.yestedayShareMoney = res.amount_price_income_day
|
||||
homeData.currentFee = res.rate
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
@@ -96,8 +170,10 @@ onMounted(() => {
|
||||
.header_title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
padding: 15px 0 30px 0;
|
||||
padding: 15px 50px 30px 50px;
|
||||
border-bottom: 1px solid #ececec;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.data_row {
|
||||
|
||||
@@ -64,6 +64,9 @@
|
||||
<el-dropdown-menu>
|
||||
<!-- <el-dropdown-item>个人中心</el-dropdown-item> -->
|
||||
<el-dropdown-item @click="logOut">退出登录</el-dropdown-item>
|
||||
<router-link :to="{ name: 'password' }">
|
||||
<el-dropdown-item >修改密码</el-dropdown-item>
|
||||
</router-link>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
@@ -121,7 +124,7 @@ function toDetail(item) {
|
||||
})
|
||||
if (!item.isdeal) {
|
||||
unread({ noticecode: item.noticecode })
|
||||
storeUser.getNotices()
|
||||
// storeUser.getNotices()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<div class="login-case">
|
||||
<div class="form-case">
|
||||
<span class="Hello">Hello !</span>
|
||||
<span class="title">欢迎来到银收客开放平台</span>
|
||||
<span class="title">欢迎登录银收客开放平台代理</span>
|
||||
<el-form ref="ruleFormRef" :rules="rules" :model="form">
|
||||
<el-form-item prop="loginName">
|
||||
<el-input class="inp" v-model="form.loginName" clearable autocomplete="new-password" size="large"
|
||||
:prefix-icon="User" placeholder="请输入账号" style="width: 100%;" />
|
||||
:prefix-icon="User" placeholder="请输入手机号" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input class="inp" v-model="form.password" clearable autocomplete="new-password" size="large" type="password"
|
||||
@@ -26,6 +26,11 @@
|
||||
<verificationCode @getCode="getCode" :key="verificationCodeKey"></verificationCode>
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
<div class="to_register">
|
||||
<router-link :to="{ name: 'register' }">
|
||||
<el-text type="primary">注册代理商</el-text>
|
||||
</router-link>
|
||||
</div>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="large" :loading="loading" @click="login" style="width: 100%;">登录</el-button>
|
||||
</el-form-item>
|
||||
@@ -65,7 +70,7 @@ function getCode(code) {
|
||||
const form = reactive({
|
||||
loginName: "",
|
||||
password: "",
|
||||
userType: 'MC',
|
||||
userType: 'MG',
|
||||
code: "",
|
||||
});
|
||||
/**
|
||||
@@ -107,9 +112,9 @@ async function login() {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
const params = {
|
||||
loginName: form.loginName,
|
||||
password: form.password,
|
||||
userType: form.userType
|
||||
account: form.loginName,
|
||||
password: form.password
|
||||
// userType: form.userType
|
||||
};
|
||||
store.userlogin(params).then((res) => {
|
||||
router.replace("/home");
|
||||
@@ -166,4 +171,11 @@ _hook.useKeyStroke("Enter", login);
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.to_register {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
font-size: 14px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -77,7 +77,7 @@ const tableOptions = reactive({
|
||||
// 分页回调
|
||||
function paginationChange() {
|
||||
tableOptions.loading = true
|
||||
getNoticesAjax()
|
||||
// getNoticesAjax()
|
||||
}
|
||||
|
||||
// 获取消息列表
|
||||
|
||||
@@ -1,272 +0,0 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<el-space>
|
||||
<el-input v-model="tableOptions.orderNo" placeholder="请输入订单号" style="width: 200px;" />
|
||||
<el-select v-model="tableOptions.status" placeholder="请选择状态">
|
||||
<el-option :label="item.label" :value="item.state" v-for="item in status" :key="item.state"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="tableOptions.payType" placeholder="请选择支付类型">
|
||||
<el-option :label="item.label" :value="item.key" v-for="item in payTypes" :key="item.key"></el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
||||
<el-button icon="RefreshRight" @click="resizeTable">重置</el-button>
|
||||
</el-space>
|
||||
<div class="table mt15">
|
||||
<el-table ref="table" :data="tableOptions.list" border height="100%" v-loading="tableOptions.loading">
|
||||
<el-table-column prop="amount" label="金额">
|
||||
<template #default="scope">
|
||||
¥{{ scope.row.amount }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="orderType" label="订单类型">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.orderType == 1">反扫收款</span>
|
||||
<span v-if="scope.row.orderType == 2">收款码</span>
|
||||
<span v-if="scope.row.orderType == 3">会员充值</span>
|
||||
<span v-if="scope.row.orderType == 4">POS</span>
|
||||
<span v-if="scope.row.orderType == 5">反扫会员充值</span>
|
||||
<span v-if="scope.row.orderType == 6">扫码王、QR68机具收款</span>
|
||||
<span v-if="scope.row.orderType == 7">H5</span>
|
||||
<span v-if="scope.row.orderType == 8">升级收费</span>
|
||||
<span v-if="scope.row.orderType == 9">小程序</span>
|
||||
<span v-if="scope.row.orderType == 10">小程序线上店订单</span>
|
||||
<span v-if="scope.row.orderType == 11">缴费通</span>
|
||||
<span v-if="scope.row.orderType == 99">插件</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column prop="merchantCode" label="商户号"></el-table-column> -->
|
||||
<el-table-column prop="orderNo" label="订单号"></el-table-column>
|
||||
<el-table-column prop="transNo" label="三方订单号"></el-table-column>
|
||||
<el-table-column prop="appletsAppId" label="小程序appid"></el-table-column>
|
||||
<el-table-column prop="payType" label="支付类型">
|
||||
<template #default="scope">
|
||||
{{ filterPayType(scope.row.payType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template #default="scope">
|
||||
<el-tag type="info" disable-transitions round v-if="scope.row.status == 0">交易失败</el-tag>
|
||||
<el-tag type="success" disable-transitions round v-if="scope.row.status == 1">交易成功</el-tag>
|
||||
<el-tag type="danger" disable-transitions round v-if="scope.row.status == 2">退款成功</el-tag>
|
||||
<el-tag type="danger" disable-transitions round v-if="scope.row.status == 3">退款失败</el-tag>
|
||||
<el-tag type="danger" disable-transitions round v-if="scope.row.status == 4">退款中</el-tag>
|
||||
<el-tag type="danger" disable-transitions round v-if="scope.row.status == 5">待付款</el-tag>
|
||||
<el-tag type="danger" disable-transitions round v-if="scope.row.status == 6">部分退款</el-tag>
|
||||
<el-tag type="warning" disable-transitions round v-if="scope.row.status == 7">待支付</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderInfo" label="订单备注"></el-table-column>
|
||||
<el-table-column prop="transTime" label="支付时间">
|
||||
<template #default="scope">
|
||||
{{ scope.row.transTime && dayjs(scope.row.transTime).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间">
|
||||
<template #default="scope">
|
||||
<el-text>{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" width="120">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.status == 0">
|
||||
<el-popconfirm title="是否通过审核?" width="200" confirm-button-text="通过" cancel-button-text="驳回"
|
||||
@cancel="checkHandle(scope.row, 5)" @confirm="checkHandle(scope.row, 1)">
|
||||
<template #reference>
|
||||
<el-button type="primary" size="small" icon="EditPen">待审核</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button type="default" size="small" icon="EditPen" disabled v-if="scope.row.status == 1">
|
||||
已通过
|
||||
</el-button>
|
||||
<el-button type="default" size="small" icon="EditPen" disabled v-if="scope.row.status == 5">
|
||||
已驳回
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<el-pagination layout="prev, pager, next, total, sizes, jumper" background
|
||||
v-model:current-page="tableOptions.pageNum" v-model:page-size="tableOptions.pageSize"
|
||||
:page-size="tableOptions.pageSize" :page-sizes="[10, 20, 30, 50]" :total="tableOptions.total"
|
||||
@size-change="paginationChange" @current-change="paginationChange" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { dayjs, ElMessage } from 'element-plus';
|
||||
import { queryOrder } from '@/api/shop.js'
|
||||
|
||||
const payTypes = ref([
|
||||
{
|
||||
key: 'alipay',
|
||||
label: '支付宝App支付'
|
||||
},
|
||||
{
|
||||
key: 'alipay_qr',
|
||||
label: '支付宝正扫'
|
||||
},
|
||||
{
|
||||
key: 'alipay_wap',
|
||||
label: '支付宝H5支付'
|
||||
},
|
||||
{
|
||||
key: 'alipay_lite',
|
||||
label: '支付宝小程序支付'
|
||||
},
|
||||
{
|
||||
key: 'alipay_pub',
|
||||
label: '支付宝生活号支付'
|
||||
},
|
||||
{
|
||||
key: 'alipay_scan',
|
||||
label: '支付宝反扫'
|
||||
},
|
||||
{
|
||||
key: 'wx_pub',
|
||||
label: '微信公众号支付'
|
||||
},
|
||||
{
|
||||
key: 'wx_lite',
|
||||
label: '微信小程序支付'
|
||||
},
|
||||
{
|
||||
key: 'wx_scan',
|
||||
label: '微信反扫'
|
||||
},
|
||||
{
|
||||
key: 'union',
|
||||
label: '银联云闪付App'
|
||||
},
|
||||
{
|
||||
key: 'union_qr',
|
||||
label: '银联云闪付正扫'
|
||||
},
|
||||
{
|
||||
key: 'union_wap',
|
||||
label: '银联云闪付H5支付'
|
||||
},
|
||||
{
|
||||
key: 'union_scan',
|
||||
label: '银联云闪付反扫'
|
||||
},
|
||||
{
|
||||
key: 'union_online',
|
||||
label: '银联H5支付'
|
||||
},
|
||||
{
|
||||
key: 'union_checkout',
|
||||
label: '银联统一收银台支付'
|
||||
},
|
||||
{
|
||||
key: 'fast_pay',
|
||||
label: '快捷支付'
|
||||
},
|
||||
{
|
||||
key: 'b2c',
|
||||
label: '个人网银支付'
|
||||
}
|
||||
])
|
||||
|
||||
const status = ref([
|
||||
{
|
||||
state: 0,
|
||||
label: '交易失败'
|
||||
},
|
||||
{
|
||||
state: 1,
|
||||
label: '交易成功'
|
||||
},
|
||||
{
|
||||
state: 2,
|
||||
label: '退款成功'
|
||||
},
|
||||
{
|
||||
state: 3,
|
||||
label: '退款失败'
|
||||
},
|
||||
{
|
||||
state: 4,
|
||||
label: '退款中'
|
||||
},
|
||||
// {
|
||||
// state: 5,
|
||||
// label: '待付款'
|
||||
// },
|
||||
{
|
||||
state: 6,
|
||||
label: '部分退款'
|
||||
},
|
||||
{
|
||||
state: 7,
|
||||
label: '待支付'
|
||||
}
|
||||
])
|
||||
|
||||
const table = ref(null)
|
||||
|
||||
function filterPayType(type) {
|
||||
return type ? payTypes.value.find(item => item.key == type).label : type
|
||||
}
|
||||
|
||||
// 表格参数
|
||||
const tableOptions = reactive({
|
||||
loading: true,
|
||||
status: '',
|
||||
orderNo: '',
|
||||
payType: '',
|
||||
list: [],
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
})
|
||||
|
||||
// 重置表格
|
||||
function resizeTable() {
|
||||
tableOptions.orderNo = ''
|
||||
tableOptions.status = ''
|
||||
tableOptions.payType = ''
|
||||
searchHandle()
|
||||
}
|
||||
|
||||
// 搜索
|
||||
function searchHandle() {
|
||||
tableOptions.pageNum = 1;
|
||||
paginationChange()
|
||||
}
|
||||
|
||||
// 分页回调
|
||||
function paginationChange() {
|
||||
tableOptions.loading = true
|
||||
getUserMarkAjax()
|
||||
}
|
||||
|
||||
async function getUserMarkAjax() {
|
||||
try {
|
||||
const res = await queryOrder({
|
||||
page: tableOptions.pageNum,
|
||||
pageSize: tableOptions.pageSize,
|
||||
orderNo: tableOptions.orderNo,
|
||||
status: tableOptions.status,
|
||||
payType: tableOptions.payType
|
||||
})
|
||||
tableOptions.loading = false
|
||||
tableOptions.list = res.list
|
||||
tableOptions.total = res.total
|
||||
table.value.setScrollTop(0)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getUserMarkAjax()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
@@ -1,149 +0,0 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<!-- <el-space>
|
||||
<el-input v-model="tableOptions.phone" placeholder="请输入手机号" style="width: 200px;" />
|
||||
<el-input v-model="tableOptions.name" placeholder="请输入姓名" style="width: 200px;" />
|
||||
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
||||
<el-button icon="RefreshRight" @click="resizeTable">重置</el-button>
|
||||
</el-space> -->
|
||||
<div class="table mt15">
|
||||
<el-table ref="table" :data="tableOptions.list" border height="100%" v-loading="tableOptions.loading">
|
||||
<el-table-column prop="organNo" label="商户号"></el-table-column>
|
||||
<el-table-column prop="privateKey" label="私钥">
|
||||
<template #default="scope">
|
||||
<el-tooltip>
|
||||
<template #content>
|
||||
<div class="content">点击复制:{{ scope.row.privateKey }}</div>
|
||||
</template>
|
||||
<el-text line-clamp="1" type="primary" @click="copy(scope.row.privateKey)">{{
|
||||
scope.row.privateKey }}</el-text>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="publicKey" label="公钥">
|
||||
<template #default="scope">
|
||||
<el-tooltip>
|
||||
<template #content>
|
||||
<div class="content">点击复制:{{ scope.row.publicKey }}</div>
|
||||
</template>
|
||||
<el-text line-clamp="1" type="primary" @click="copy(scope.row.publicKey)">{{ scope.row.publicKey
|
||||
}}</el-text>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template #default="scope">
|
||||
<el-tag type="success" disable-transitions round v-if="scope.row.status == 0">正常</el-tag>
|
||||
<el-tag type="info" disable-transitions round v-if="scope.row.status == 1">禁用</el-tag>
|
||||
<el-tag type="warning" disable-transitions round v-if="scope.row.status == 2">待激活</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="更新时间">
|
||||
<template #default="scope">
|
||||
<el-text>{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" width="120">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.status == 0">
|
||||
<el-popconfirm title="是否通过审核?" width="200" confirm-button-text="通过" cancel-button-text="驳回"
|
||||
@cancel="checkHandle(scope.row, 5)" @confirm="checkHandle(scope.row, 1)">
|
||||
<template #reference>
|
||||
<el-button type="primary" size="small" icon="EditPen">待审核</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button type="default" size="small" icon="EditPen" disabled v-if="scope.row.status == 1">
|
||||
已通过
|
||||
</el-button>
|
||||
<el-button type="default" size="small" icon="EditPen" disabled v-if="scope.row.status == 5">
|
||||
已驳回
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<el-pagination layout="prev, pager, next, total, sizes, jumper" background
|
||||
v-model:current-page="tableOptions.pageNum" v-model:page-size="tableOptions.pageSzie"
|
||||
:page-size="tableOptions.pageSzie" :page-sizes="[10, 20, 30, 50]" :total="tableOptions.total"
|
||||
@size-change="paginationChange" @current-change="paginationChange" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { dayjs, ElMessage } from 'element-plus';
|
||||
import useClipboard from 'vue-clipboard3'
|
||||
import { getUserMark, updateUserMark, queryOrgan } from '@/api/shop.js'
|
||||
const { toClipboard } = useClipboard()
|
||||
|
||||
const table = ref(null)
|
||||
|
||||
|
||||
// 表格参数
|
||||
const tableOptions = reactive({
|
||||
loading: true,
|
||||
phone: '',
|
||||
name: '',
|
||||
list: [],
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
})
|
||||
|
||||
// 复制
|
||||
async function copy(text) {
|
||||
try {
|
||||
await toClipboard(text)
|
||||
ElMessage.success('复制成功')
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
// 重置表格
|
||||
function resizeTable() {
|
||||
tableOptions.phone = ''
|
||||
tableOptions.name = ''
|
||||
searchHandle()
|
||||
}
|
||||
|
||||
// 搜索
|
||||
function searchHandle() {
|
||||
tableOptions.pageNum = 1;
|
||||
paginationChange()
|
||||
}
|
||||
|
||||
// 分页回调
|
||||
function paginationChange() {
|
||||
tableOptions.loading = true
|
||||
getUserMarkAjax()
|
||||
}
|
||||
|
||||
// 获取创客审核列表
|
||||
async function getUserMarkAjax() {
|
||||
try {
|
||||
const res = await queryOrgan()
|
||||
tableOptions.loading = false
|
||||
tableOptions.list = [res]
|
||||
tableOptions.total = 1
|
||||
table.value.setScrollTop(0)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getUserMarkAjax()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,17 +1,6 @@
|
||||
<template>
|
||||
<div class="img_box" v-if="fileList.length">
|
||||
<el-image :src="fileList[0].url" style="width: 150px;height: 150px;display: block;" fit="cover"></el-image>
|
||||
<div class="mask">
|
||||
<el-icon @click="previewHandle({ url: fileList[0].url })">
|
||||
<Search />
|
||||
</el-icon>
|
||||
<el-icon @click="fileList = []">
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<el-upload ref="uploadRef" v-model:file-list="fileList" list-type="picture-card" :limit="1" :on-exceed="handleExceed"
|
||||
:auto-upload="false" @change="selectFile" @remove="removeFile" @preview="previewHandle" v-else>
|
||||
:auto-upload="false" @change="selectFile" @remove="removeFile" @preview="previewHandle">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@@ -67,35 +56,4 @@ defineExpose({
|
||||
.img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.img_box {
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
|
||||
.mask {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.mask {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
gap: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -60,9 +60,6 @@ import { messageChannel, manualMerchantIncom } from '@/api/shop.js'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
|
||||
import { useUser } from "@/store/user.js";
|
||||
const storeUser = useUser();
|
||||
|
||||
const reviewRemarks = ref([])
|
||||
const merchantChannels = ref([])
|
||||
const status = ref([
|
||||
@@ -90,7 +87,7 @@ const loading = ref(false)
|
||||
// 通道进件信息
|
||||
async function messageChannelAjax() {
|
||||
try {
|
||||
const res = await messageChannel(storeUser.userInfo.userId)
|
||||
const res = await messageChannel(route.query.id)
|
||||
reviewRemarks.value = res.reviewRemarks
|
||||
merchantChannels.value = res.merchantChannels
|
||||
form.value = res.merchantChannelMessage
|
||||
@@ -106,7 +103,7 @@ async function submitHandle(state, index) {
|
||||
await manualMerchantIncom({
|
||||
type: state,
|
||||
errMsg: form.value[index].remake || '',
|
||||
userId: storeUser.userInfo.userId,
|
||||
userId: route.query.id,
|
||||
channelId: form.value[index].channel || '',
|
||||
wxLiteAppld: form.value[index].wxLiteAppld,
|
||||
wxPubAppld: form.value[index].wxPubAppld,
|
||||
|
||||
@@ -117,9 +117,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitHandle">立即提交</el-button>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
@@ -135,9 +135,6 @@ import { merchantInfoDetail, getBranchList, updatePromoterInformation } from '@/
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
|
||||
import { useUser } from "@/store/user.js";
|
||||
const storeUser = useUser();
|
||||
|
||||
const formRef = ref(null)
|
||||
const idCardRef1 = ref(null)
|
||||
const idCardRef2 = ref(null)
|
||||
@@ -152,8 +149,8 @@ const gutter = ref(50)
|
||||
const form = reactive({
|
||||
status: '',
|
||||
id: '',
|
||||
merchantcode: storeUser.userInfo.merchantcode,
|
||||
userid: storeUser.userInfo.userId,
|
||||
merchantcode: route.query.merchantcode,
|
||||
userid: route.query.id,
|
||||
username: '',
|
||||
loginname: '',
|
||||
idCard: {},
|
||||
@@ -216,7 +213,7 @@ async function submitHandle() {
|
||||
// 获取实名认证信息
|
||||
async function merchantInfoDetailAjax() {
|
||||
try {
|
||||
const res = await merchantInfoDetail(storeUser.userInfo.userId)
|
||||
const res = await merchantInfoDetail(route.query.id)
|
||||
await banknameChange(res.bankCard.bankname, res.bankCard.branchcity)
|
||||
form.id = res.id
|
||||
form.status = res.status
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
</el-col>
|
||||
<el-col :span="span">
|
||||
<el-form-item label="法人身份证号">
|
||||
<el-input v-model="form.idCard.certno" placeholder="请输入法人身份证号"
|
||||
@input="e => form.idCard.certno = removeSpaces(e)" />
|
||||
<el-input v-model="form.idCard.certno" placeholder="请输入法人身份证号" @input="e => form.idCard.certno = removeSpaces(e)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -31,14 +30,12 @@
|
||||
<el-row :gutter="gutter">
|
||||
<el-col :span="span">
|
||||
<el-form-item label="执照名称">
|
||||
<el-input v-model="form.license.bussauthname" placeholder="请输入执照名称"
|
||||
@input="e => form.license.bussauthname = removeSpaces(e)" />
|
||||
<el-input v-model="form.license.bussauthname" placeholder="请输入执照名称" @input="e => form.license.bussauthname = removeSpaces(e)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="span">
|
||||
<el-form-item label="工商注册号">
|
||||
<el-input v-model="form.license.bussauthnum" placeholder="请输入工商注册号"
|
||||
@input="e => form.license.bussauthnum = removeSpaces(e)" />
|
||||
<el-input v-model="form.license.bussauthnum" placeholder="请输入工商注册号" @input="e => form.license.bussauthnum = removeSpaces(e)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -96,8 +93,6 @@ import { merchLicense, updatemerchLicense } from '@/api/shop.js'
|
||||
|
||||
import uploadCard from './uploadCard.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useUser } from "@/store/user.js";
|
||||
const storeUser = useUser();
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
@@ -142,7 +137,7 @@ async function submitHandel() {
|
||||
// 营业执照信息
|
||||
async function merchLicenseAjax() {
|
||||
try {
|
||||
const res = await merchLicense(storeUser.userInfo.userId)
|
||||
const res = await merchLicense(route.query.id)
|
||||
form.license = res.license
|
||||
form.idCard = res.idCard
|
||||
uploadRef1.value.pselectFile({ url: form.license.licenseimage })
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- 结算信息 -->
|
||||
<template>
|
||||
<el-row :gutter="gutter">
|
||||
<el-col :span="24">
|
||||
<el-col :span="span">
|
||||
<el-form ref="d1FormRef" :model="d1Form" label-width="120" label-position="left">
|
||||
<div class="title_wrap">
|
||||
<el-text>D1</el-text>
|
||||
@@ -71,12 +71,12 @@
|
||||
<uploadCard ref="d1BankRef5" @selectFile="file => d1Form.publicimage = file"
|
||||
@removeFile="d1Form.publicimage = ''" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="d1SubmitHandle">保存-D1</el-button>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="span" v-if="false">
|
||||
<el-col :span="span">
|
||||
<el-form ref="d0FormRef" :model="d0Form" label-width="120" label-position="left">
|
||||
<div class="title_wrap">
|
||||
<el-text>D0</el-text>
|
||||
@@ -146,9 +146,9 @@
|
||||
<uploadCard ref="d0BankRef5" @selectFile="file => d0Form.publicimage = file"
|
||||
@removeFile="d0Form.publicimage = ''" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="d0SubmitHandle">保存-D0</el-button>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -164,9 +164,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="updateAuthenticationAjax" :loading="authFormLoading">保存认证信息</el-button>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
@@ -183,8 +183,6 @@ import { merchBaseAccount, getBranchList, updateAccount, authentication, updateA
|
||||
import { useRoute } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus';
|
||||
const route = useRoute()
|
||||
import { useUser } from "@/store/user.js";
|
||||
const storeUser = useUser();
|
||||
|
||||
const span = ref(12)
|
||||
const gutter = ref(50)
|
||||
@@ -198,7 +196,7 @@ const d1BankRef4 = ref(null)
|
||||
const d1BankRef5 = ref(null)
|
||||
const bankBranchs = ref([])
|
||||
const d1Form = reactive({
|
||||
userid: storeUser.userInfo.userId,
|
||||
userid: route.query.id,
|
||||
channeltype: 'D1',
|
||||
bankCard: {},
|
||||
idcard: {},
|
||||
@@ -270,7 +268,7 @@ const d0BankRef4 = ref(null)
|
||||
const d0BankRef5 = ref(null)
|
||||
const d0FormRef = ref(null)
|
||||
const d0Form = reactive({
|
||||
userid: storeUser.userInfo.userId,
|
||||
userid: route.query.id,
|
||||
channeltype: 'D0',
|
||||
bankCard: {},
|
||||
idcard: {},
|
||||
@@ -337,7 +335,7 @@ async function d0SubmitHandle() {
|
||||
// 结算信息
|
||||
async function merchBaseAccountAjax() {
|
||||
try {
|
||||
const res = await merchBaseAccount(storeUser.userInfo.userId)
|
||||
const res = await merchBaseAccount(route.query.id)
|
||||
await d1BanknameChange(res.D1.bankCard.bankname, res.D1.bankCard.branchcity)
|
||||
await d0BanknameChange(res.D1.bankCard.bankname, res.D1.bankCard.branchcity)
|
||||
|
||||
@@ -387,7 +385,7 @@ async function merchBaseAccountAjax() {
|
||||
|
||||
// 结算人与收银台合照 结算人手持身份证照
|
||||
const authForm = reactive({
|
||||
merchantCode: storeUser.userInfo.merchantcode,
|
||||
merchantCode: route.query.merchantcode,
|
||||
picUrl: ''
|
||||
})
|
||||
const authFormLoading = ref(false)
|
||||
@@ -396,7 +394,7 @@ const authFormUpload1 = ref(null)
|
||||
// 认证信息
|
||||
async function authenticationAjax() {
|
||||
try {
|
||||
const res = await authentication(storeUser.userInfo.userId)
|
||||
const res = await authentication(route.query.id)
|
||||
authForm.picUrl = res.image
|
||||
authFormUpload1.value.pselectFile({ url: res.image })
|
||||
} catch (error) {
|
||||
|
||||
@@ -33,8 +33,7 @@
|
||||
</el-col>
|
||||
<el-col :span="span">
|
||||
<el-form-item prop="contactmobile" label="联系人电话">
|
||||
<el-input v-model="form.contactmobile" placeholder="请输入联系人电话"
|
||||
@input="e => form.contactmobile = removeSpaces(e)" />
|
||||
<el-input v-model="form.contactmobile" placeholder="请输入联系人电话" @input="e => form.contactmobile = removeSpaces(e)"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -80,9 +79,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitHandel">立即提交</el-button>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-dialog title="经营类目" v-model="showDialog" @open="mccOpen">
|
||||
<el-space>
|
||||
@@ -123,8 +122,6 @@ import { useRoute } from 'vue-router'
|
||||
import { reactive } from 'vue';
|
||||
import { ElDialog } from 'element-plus';
|
||||
const route = useRoute()
|
||||
import { useUser } from "@/store/user.js";
|
||||
const storeUser = useUser();
|
||||
|
||||
const span = ref(8)
|
||||
const gutter = ref(50)
|
||||
@@ -137,10 +134,10 @@ const uploadRef3 = ref(null)
|
||||
|
||||
const form = reactive({
|
||||
id: '',
|
||||
userid: storeUser.userInfo.userId,
|
||||
userid: route.query.id,
|
||||
merchantname: '',
|
||||
merchanttype: '',
|
||||
merchantcode: storeUser.userInfo.merchantcode,
|
||||
merchantcode: route.query.merchantcode,
|
||||
alias: '',
|
||||
contactname: '',
|
||||
email: '',
|
||||
@@ -240,7 +237,7 @@ function selectMcc(row) {
|
||||
// 商户基本信息
|
||||
async function merchBaseInfoAjax() {
|
||||
try {
|
||||
const res = await merchBaseInfo(storeUser.userInfo.userId)
|
||||
const res = await merchBaseInfo(route.query.id)
|
||||
const m = {
|
||||
1: '小微',
|
||||
2: '个体',
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="compont_wrap">
|
||||
<component :is="componentList[type]" />
|
||||
</div>
|
||||
<!-- <div class="shop_info">
|
||||
<div class="shop_info">
|
||||
<div class="header">
|
||||
<el-text size="large">商户关联信息</el-text>
|
||||
</div>
|
||||
@@ -58,7 +58,7 @@
|
||||
@size-change="paginationChange" @current-change="paginationChange" />
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -75,10 +75,7 @@ import businessLicense from './components/businessLicense.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { reactive } from 'vue'
|
||||
import { dayjs } from 'element-plus'
|
||||
import { useUser } from "@/store/user.js";
|
||||
const storeUser = useUser();
|
||||
|
||||
// const route = useRoute()
|
||||
const route = useRoute()
|
||||
|
||||
const authInfo = ref({})
|
||||
|
||||
@@ -112,7 +109,7 @@ function paginationChange() {
|
||||
// 实名认证信息页面(实名个数)
|
||||
async function connectInfoAjax() {
|
||||
try {
|
||||
const res = await connectInfo(storeUser.userInfo.userId)
|
||||
const res = await connectInfo(route.query.id)
|
||||
authInfo.value = res
|
||||
} catch (error) {
|
||||
console.log('实名认证信息页面error:', error)
|
||||
@@ -123,7 +120,7 @@ async function connectInfoAjax() {
|
||||
async function userIpPageAjax() {
|
||||
try {
|
||||
const res = await userIpPage({
|
||||
userId: storeUser.userInfo.userId,
|
||||
userId: route.query.id,
|
||||
currPage: tableOptions.pageNum,
|
||||
size: tableOptions.pageSzie
|
||||
})
|
||||
@@ -138,7 +135,7 @@ async function userIpPageAjax() {
|
||||
// 实名认证信息
|
||||
async function merchantInfoDetailAjax() {
|
||||
try {
|
||||
const res = await merchantInfoDetail(storeUser.userInfo.userId)
|
||||
const res = await merchantInfoDetail(route.query.id)
|
||||
if (res.bankCard.bankname) {
|
||||
navs.push(
|
||||
{
|
||||
@@ -155,7 +152,7 @@ async function merchantInfoDetailAjax() {
|
||||
// 商户基本信息
|
||||
async function merchBaseInfoAjax() {
|
||||
try {
|
||||
const res = await merchBaseInfo(storeUser.userInfo.userId)
|
||||
const res = await merchBaseInfo(route.query.id)
|
||||
if (res.merchantBaseInfo.mccname) {
|
||||
navs.push(
|
||||
{
|
||||
@@ -172,7 +169,7 @@ async function merchBaseInfoAjax() {
|
||||
// 营业执照信息
|
||||
async function merchLicenseAjax() {
|
||||
try {
|
||||
const res = await merchLicense(storeUser.userInfo.userId)
|
||||
const res = await merchLicense(route.query.id)
|
||||
if (res.license.principalperson) {
|
||||
navs.push(
|
||||
{
|
||||
@@ -189,7 +186,7 @@ async function merchLicenseAjax() {
|
||||
// 结算信息
|
||||
async function merchBaseAccountAjax() {
|
||||
try {
|
||||
const res = await merchBaseAccount(storeUser.userInfo.userId)
|
||||
const res = await merchBaseAccount(route.query.id)
|
||||
if (res.D0.bankCard) {
|
||||
navs.push(
|
||||
{
|
||||
@@ -206,7 +203,7 @@ async function merchBaseAccountAjax() {
|
||||
// 通道进件信息
|
||||
async function messageChannelAjax() {
|
||||
try {
|
||||
const res = await messageChannel(storeUser.userInfo.userId, storeUser.userInfo.merchantcode)
|
||||
const res = await messageChannel(route.query.id, route.query.merchantcode)
|
||||
if (res.merchantChannelMessage.length) {
|
||||
navs.push(
|
||||
{
|
||||
@@ -222,17 +219,17 @@ async function messageChannelAjax() {
|
||||
|
||||
onMounted(async () => {
|
||||
tableOptions.loading = false
|
||||
// connectInfoAjax()
|
||||
// userIpPageAjax()
|
||||
connectInfoAjax()
|
||||
userIpPageAjax()
|
||||
await merchantInfoDetailAjax()
|
||||
await merchBaseInfoAjax()
|
||||
await merchLicenseAjax()
|
||||
await merchBaseAccountAjax()
|
||||
// await messageChannelAjax()
|
||||
await messageChannelAjax()
|
||||
type.value = navs[0].type
|
||||
// if (route.query.type && route.query.type == 'msg1') {
|
||||
// type.value = 5
|
||||
// }
|
||||
if (route.query.type && route.query.type == 'msg1') {
|
||||
type.value = 5
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<div class="data_row">
|
||||
<!-- <div class="data_row">
|
||||
<div class="item">
|
||||
<div class="icon">
|
||||
<img class="img" src="@/assets/home_icon6.png">
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item">
|
||||
<div class="item">
|
||||
<div class="icon">
|
||||
<img class="img" src="../assets/home_icon2.png">
|
||||
</div>
|
||||
@@ -69,15 +69,15 @@
|
||||
<span class="i">%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="card mt15">
|
||||
<el-space>
|
||||
<el-input placeholder="请输入商户登录号" v-model="tableOptions.agencyCode" style="width: 200px;" />
|
||||
<!-- <el-input placeholder="请输入商户登录号" v-model="tableOptions.agencyCode" style="width: 200px;" /> -->
|
||||
<el-input placeholder="请输入商户号" v-model="tableOptions.merchantCode" style="width: 200px;" />
|
||||
<el-input placeholder="请输入商户号" v-model="tableOptions.phone" style="width: 200px;" />
|
||||
<el-input placeholder="请输入用户ID" v-model="tableOptions.reqUserId" style="width: 200px;" />
|
||||
<el-input placeholder="请输入商户名称" v-model="tableOptions.merchant_name" style="width: 200px;" />
|
||||
<!-- <el-input placeholder="请输入用户ID" v-model="tableOptions.reqUserId" style="width: 200px;" />
|
||||
<el-select placeholder="请选择进件状态" v-model="tableOptions.status">
|
||||
<el-option :value="0" label="待审核"></el-option>
|
||||
<el-option :value="1" label="审核中"></el-option>
|
||||
@@ -88,7 +88,7 @@
|
||||
<el-option :value="1" label="小微"></el-option>
|
||||
<el-option :value="2" label="个体"></el-option>
|
||||
<el-option :value="3" label="企业"></el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
||||
<el-button icon="RefreshRight" @click="resizeTable">重置</el-button>
|
||||
</el-space>
|
||||
@@ -96,12 +96,31 @@
|
||||
<el-table ref="table" :data="tableOptions.list" size="large" stripe border height="100%"
|
||||
v-loading="tableOptions.loading">
|
||||
<el-table-column prop="id" label="ID"></el-table-column>
|
||||
<el-table-column prop="agencyName" label="商家名称">
|
||||
<el-table-column prop="merchant_code" label="商户号"></el-table-column>
|
||||
<el-table-column prop="merchant_name" label="商家名称">
|
||||
<template #default="scope">
|
||||
<el-text>{{ scope.row.agencyName || scope.row.agencyCode }}</el-text>
|
||||
<el-text>{{ scope.row.merchant_name || scope.row.merchant_name }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agencyCode" label="手机号"></el-table-column>
|
||||
<!-- <el-table-column prop="merchant_alias" label="商户简称"></el-table-column> -->
|
||||
<!-- <el-table-column prop="merchant_type" label="商户类型">
|
||||
<template #default="scope">
|
||||
<el-tag type="info" disable-transitions v-if="scope.row.merchant_type == 0">企业 </el-tag>
|
||||
<el-tag type="info" disable-transitions v-if="scope.row.merchant_type == 1">⼩微个⼈</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="contacts_name" label="联系人名称"></el-table-column>
|
||||
<el-table-column prop="contacts_phone" label="手机号"></el-table-column>
|
||||
<!-- <el-table-column prop="contacts_email" label="联系人邮箱"></el-table-column> -->
|
||||
<el-table-column prop="mcc_code" label="经营类目"></el-table-column>
|
||||
<!-- <el-table-column prop="province_code" label="省份代码"></el-table-column> -->
|
||||
<el-table-column prop="province_name" label="城市">
|
||||
<template #default="scope">
|
||||
<el-text>{{ scope.row.province_name}} {{ scope.row.city_name}}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="city_code" label="城市代码"></el-table-column> -->
|
||||
<!-- <el-table-column prop="city_name" label="城市名称"></el-table-column> -->
|
||||
<!-- <el-table-column prop="current_fee" label="推广费率">
|
||||
<template #default="scope">
|
||||
<el-text type="info" v-if="scope.row.is_extend == 0">无</el-text>
|
||||
@@ -112,17 +131,17 @@
|
||||
<template #default="scope">
|
||||
<el-text>{{ scope.row.sumConsumeFee.toFixed(2) }}</el-text>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="inviteNum" label="邀请码"></el-table-column>
|
||||
<el-table-column prop="agencyName" label="实名状态">
|
||||
</el-table-column>
|
||||
<el-table-column prop="inviteNum" label="邀请码"></el-table-column> -->
|
||||
<!-- <el-table-column prop="agencyName" label="实名状态">
|
||||
<template #default="scope">
|
||||
<el-tag type="info" disable-transitions v-if="scope.row.status == 0">未实名</el-tag>
|
||||
<el-tag type="warning" disable-transitions v-if="scope.row.status == 1">审核中</el-tag>
|
||||
<el-tag type="danger" disable-transitions v-if="scope.row.status == 2">审核失败</el-tag>
|
||||
<el-tag type="success" disable-transitions v-if="scope.row.status == 3">已审核</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sumfansShareMoney" label="累计收款">
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column prop="sumfansShareMoney" label="累计收款">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" icon="search" @click="showTotalEarnings(scope.row.id)">
|
||||
{{ scope.row.sumConsumeFee }}
|
||||
@@ -140,7 +159,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商户基本信息">
|
||||
<el-table-column label="商户基本信息">
|
||||
<template #default="scope">
|
||||
<div class="column">
|
||||
<el-text type="primary" size="small">{{ scope.row.merchantBaseInfo.merchantTypeName }}</el-text>
|
||||
@@ -230,7 +249,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="创客等级" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag type="info" disable-transitions v-if="scope.row.is_extend == 0">普通商户</el-tag>
|
||||
@@ -242,8 +261,8 @@
|
||||
<template #default="scope">
|
||||
{{ dayjs(scope.row.createDt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
</el-table-column>-->
|
||||
<!-- <el-table-column label="操作" width="150" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="small" disabled icon="Search" v-permission="['MG']"
|
||||
v-if="!scope.row.merchantBaseInfo.alias">
|
||||
@@ -257,7 +276,7 @@
|
||||
</el-button>
|
||||
</RouterLink>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
@@ -339,7 +358,7 @@ function dialogSearchHandle() {
|
||||
// 分页回调
|
||||
function dialogPaginationChange() {
|
||||
dialogTableOptions.loading = true
|
||||
getTableDate()
|
||||
// getTableDate()
|
||||
}
|
||||
|
||||
// 获取机构列表
|
||||
@@ -379,7 +398,7 @@ const tableOptions = reactive({
|
||||
loading: true,
|
||||
agencyCode: '', // 商户登录号
|
||||
merchantCode: '', // 商户号
|
||||
phone: '',
|
||||
merchant_name: '',
|
||||
status: '', // 进件状态。0或无、待审核,1、审核中 2、审核失败 3、审核通过
|
||||
merchantType: '', // 1:小微 2:个体 3:企业
|
||||
reqUserId: '', // 用户id
|
||||
@@ -415,20 +434,20 @@ function paginationChange() {
|
||||
async function queryCustormerFlowHandle() {
|
||||
try {
|
||||
const res = await queryCustormerFlow({
|
||||
agencyCode: tableOptions.agencyCode,
|
||||
merchantCode: tableOptions.merchantCode,
|
||||
phone: tableOptions.phone,
|
||||
status: tableOptions.status,
|
||||
merchantType: tableOptions.merchantType,
|
||||
reqUserId: tableOptions.reqUserId,
|
||||
pageNum: tableOptions.pageNum,
|
||||
pageSzie: tableOptions.pageSzie,
|
||||
userType: 'MC',
|
||||
isExtend: 'shop'
|
||||
// agencyCode: tableOptions.agencyCode,
|
||||
merchant_code: tableOptions.merchantCode,
|
||||
merchant_name: tableOptions.merchant_name,
|
||||
// status: tableOptions.status,
|
||||
// merchantType: tableOptions.merchantType,
|
||||
// reqUserId: tableOptions.reqUserId,
|
||||
page: tableOptions.pageNum,
|
||||
// pageSzie: tableOptions.pageSzie,
|
||||
// userType: 'MC',
|
||||
// isExtend: 'shop',
|
||||
})
|
||||
tableOptions.loading = false
|
||||
tableOptions.list = res.list
|
||||
tableOptions.total = res.total
|
||||
tableOptions.list = res.data
|
||||
tableOptions.total = res.count
|
||||
table.value.setScrollTop(0)
|
||||
} catch (error) { }
|
||||
}
|
||||
@@ -481,7 +500,7 @@ function filterData(arr, type) {
|
||||
|
||||
onMounted(() => {
|
||||
queryCustormerFlowHandle()
|
||||
queryCustormSumAjax()
|
||||
// queryCustormSumAjax()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
221
src/views/password/password.vue
Normal file
221
src/views/password/password.vue
Normal file
@@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<div class="login-case">
|
||||
<div class="form-case">
|
||||
<span class="Hello">Hello !</span>
|
||||
<span class="title">欢迎修改银收客开放平台代理</span>
|
||||
<el-form ref="ruleFormRef" :rules="rules" :model="form">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input class="inp" v-model="form.mobile" disabled clearable autocomplete="new-password" size="large"
|
||||
:prefix-icon="User" placeholder="请输入手机号" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="newpassword">
|
||||
<el-input class="inp" v-model="form.newpassword" newpassword autocomplete="new-password" size="large"
|
||||
:prefix-icon="User" placeholder="请输入密码" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="captcha">
|
||||
<div class="code-case">
|
||||
<el-input class="inp" v-model="form.captcha" clearable autocomplete="new-password" size="large"
|
||||
:prefix-icon="CircleCheck" width="100px" placeholder="验证码" />
|
||||
<!-- <verificationCode @getCode="getCode" :key="verificationCodeKey"></verificationCode> -->
|
||||
<el-button style="height:40px;" @click="getCaptcha"
|
||||
:disabled="textword === '获取验证码' ? false : true">{{ textword
|
||||
}}</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="large" :loading="loading" @click="passwords"
|
||||
style="width: 100%;">修改密码</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import verificationCode from "@/components/verificationCode.vue"
|
||||
import { User, Lock, CircleCheck } from "@element-plus/icons-vue"
|
||||
import { useUser } from "@/store/user.js"
|
||||
import { register } from "@/api/user.js"
|
||||
import { ElMessage } from "element-plus";
|
||||
import { agentsendsms, agentresetpwd } from "@/api/password.js"
|
||||
import _hook from "@/hooks/index.js";
|
||||
const ruleFormRef = ref("");
|
||||
const store = useUser();
|
||||
const router = useRouter();
|
||||
const loading = ref(false)
|
||||
onMounted(() => {
|
||||
// ElMessage({
|
||||
// message: "请使用用户名为 admin、yonghu1、yonghu2 进行登录测试,来获取不同的权限",
|
||||
// type: "success",
|
||||
// duration: 5000,
|
||||
// });
|
||||
});
|
||||
let verificationCodeKey = ref(0);
|
||||
let trueCode = ref("");
|
||||
const textword = ref("获取验证码");
|
||||
const getCaptcha = async () => {
|
||||
if (textword.value == '获取验证码') {
|
||||
clickagentsendsms()
|
||||
console.log(textword.value, 111)
|
||||
}
|
||||
let n = 60;
|
||||
textword.value = n + "秒钟重新获取";
|
||||
const timer = setInterval(() => {
|
||||
if (n === 0) {
|
||||
clearInterval(timer);
|
||||
textword.value = "获取验证码";
|
||||
|
||||
} else {
|
||||
n--;
|
||||
textword.value = n + "秒钟重新获取";
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
/**
|
||||
* @description: 获取正确的验证码值
|
||||
* @param {*} captcha: 正确的验证码
|
||||
*/
|
||||
function getCode(captcha) {
|
||||
trueCode.value = captcha;
|
||||
}
|
||||
|
||||
const form = reactive({
|
||||
mobile: _hook.useLocalStorage.get("userInfo").phone,
|
||||
newpassword: "",
|
||||
userType: 'MG',
|
||||
captcha: "",
|
||||
});
|
||||
/**
|
||||
* @description: 自定义验证 - 验证账号
|
||||
*/
|
||||
function checkName(rule, value, callback) {
|
||||
if (value === "") {
|
||||
callback(new Error("账号不可为空"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 自定义验证 - 验证验证码
|
||||
*/
|
||||
function checkCode(rule, value, callback) {
|
||||
if (value === "") {
|
||||
callback(new Error("验证码不可为空"));
|
||||
} else if (value !== trueCode.value) {
|
||||
verificationCodeKey.value++;
|
||||
callback(new Error("验证码不正确"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
// form 验证
|
||||
const rules = reactive({
|
||||
mobile: [{ validator: checkName, required: true, trigger: "blur" }],
|
||||
newpassword: [{ required: true, message: "密码不可为空", trigger: "blur" }],
|
||||
captcha: [{ required: true, message: "验证码不能为空", trigger: "blur" }],
|
||||
});
|
||||
//验证码
|
||||
async function clickagentsendsms() {
|
||||
const res = {
|
||||
mobile: form.mobile
|
||||
}
|
||||
agentsendsms(res).then((res) => {
|
||||
ElMessage.success('发送成功!')
|
||||
// router.replace("/home");
|
||||
}).catch(err => {
|
||||
});
|
||||
}
|
||||
// 密码
|
||||
async function passwords() {
|
||||
//通过 ref 的值触发验证
|
||||
await ruleFormRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
const datares = {
|
||||
mobile: form.mobile,
|
||||
newpassword: form.newpassword,
|
||||
captcha: form.captcha
|
||||
};
|
||||
agentresetpwd(datares).then((res) => {
|
||||
ElMessage.success('修改成功')
|
||||
// 清除缓存 / token 等
|
||||
setTimeout(() => {
|
||||
_hook.useLocalStorage.clear();
|
||||
// 使用 reload 时,不需要调用 resetRoute() 重置路由
|
||||
// 且刷新页面时 pinia 数据会重置
|
||||
window.location.reload();
|
||||
}, 1500);
|
||||
|
||||
// console.log(res, '返回')
|
||||
// store.setUserInfo()
|
||||
// _hook.useLocalStorage.set("token", res.userinfo.token);
|
||||
// _hook.useLocalStorage.set("userInfo", res.userinfo.userInfo);
|
||||
// ElMessage.success('修改成功')
|
||||
// loading.value = false
|
||||
// router.replace("/home");
|
||||
}).catch(err => {
|
||||
loading.value = false
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 回车键触发更改操作
|
||||
_hook.useKeyStroke("Enter", passwords);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login-case {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: url('../../assets/logo_bg.png') no-repeat right bottom / contain;
|
||||
}
|
||||
|
||||
.form-case {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// height: 450px;
|
||||
left: 20%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.Hello {
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: #000;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
||||
font-size: 40px;
|
||||
color: #000;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.code-case {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.inp {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.to_register {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
font-size: 14px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
199
src/views/register/register.vue
Normal file
199
src/views/register/register.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<div class="login-case">
|
||||
<div class="form-case">
|
||||
<span class="Hello">Hello !</span>
|
||||
<span class="title">欢迎注册银收客开放平台代理</span>
|
||||
<el-form ref="ruleFormRef" :rules="rules" :model="form">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input class="inp" v-model="form.mobile" clearable autocomplete="new-password" size="large"
|
||||
placeholder="请输入手机号" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input class="inp" v-model="form.password" clearable autocomplete="new-password" size="large"
|
||||
type="password" placeholder="请输入密码" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-select v-model="form.userType" placeholder="请选择机构类型" size="large" style="width: 100%;">
|
||||
<el-option key="MG" label="平台" value="MG"></el-option>
|
||||
<el-option key="FO" label="大机构" value="FO"></el-option>
|
||||
<el-option key="SO" label="小机构" value="SO"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item prop="captcha">
|
||||
<div class="code-case">
|
||||
<el-input class="inp" v-model="form.captcha" clearable autocomplete="new-password" size="large"
|
||||
type="text" placeholder="验证码" style="width: 100%;" />
|
||||
<el-button :type="state.countdown > 0 ? 'info' : 'primary'" :disabled='state.countdown > 0'
|
||||
@click='sendVerificationCode'>
|
||||
<span v-if="state.countdown > 0">{{ state.countdown }} 秒后重新发送</span>
|
||||
<span v-else>发送验证码</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div class="to_register">
|
||||
<router-link :to="{ name: 'login' }">
|
||||
<el-text type="primary">登录</el-text>
|
||||
</router-link>
|
||||
</div>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="large" :loading="loading" @click="login"
|
||||
style="width: 100%;">注册</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useUser } from "@/store/user.js"
|
||||
import { register, agentsendsms } from "@/api/user.js"
|
||||
import { ElMessage } from "element-plus";
|
||||
import _hook from "@/hooks/index.js";
|
||||
|
||||
const ruleFormRef = ref("");
|
||||
const store = useUser();
|
||||
const loading = ref(false)
|
||||
const router = useRouter();
|
||||
onMounted(() => {
|
||||
// ElMessage({
|
||||
// message: "请使用用户名为 admin、yonghu1、yonghu2 进行登录测试,来获取不同的权限",
|
||||
// type: "success",
|
||||
// duration: 5000,
|
||||
// });
|
||||
});
|
||||
|
||||
// 倒计时
|
||||
const state = reactive({
|
||||
countdown: 0,
|
||||
timer: null
|
||||
})
|
||||
const sendVerificationCode = () => {
|
||||
if (form.mobile) {
|
||||
try {
|
||||
agentsendsms({
|
||||
mobile: form.mobile,
|
||||
event: 'register'
|
||||
}).then((res) => {
|
||||
ElMessage.success('验证码发送成功')
|
||||
state.countdown = 60
|
||||
state.timer = setInterval(() => {
|
||||
if (state.countdown > 0) {
|
||||
state.countdown--
|
||||
} else {
|
||||
clearInterval(state.timer)
|
||||
}
|
||||
}, 1000)
|
||||
}).catch(err => {
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
ElMessage.error('手机号不可为空')
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
const form = reactive({
|
||||
mobile: "",
|
||||
password: "",
|
||||
userType: 'MG',
|
||||
captcha: "",
|
||||
});
|
||||
/**
|
||||
* @description: 自定义验证 - 验证账号
|
||||
*/
|
||||
function checkName(rule, value, callback) {
|
||||
if (value === "") {
|
||||
callback(new Error("账号不可为空"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
// form 验证
|
||||
const rules = reactive({
|
||||
mobile: [{ validator: checkName, required: true, trigger: "blur" }],
|
||||
password: [{ required: true, message: "密码不可为空", trigger: "blur" }],
|
||||
captcha: [{ required: true, message: "密码不可为空", trigger: "blur" }],
|
||||
});
|
||||
|
||||
// 登录
|
||||
async function login() {
|
||||
//通过 ref 的值触发验证
|
||||
await ruleFormRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
loading.value = true
|
||||
const data = {
|
||||
mobile: form.mobile,
|
||||
password: form.password,
|
||||
captcha: form.captcha
|
||||
};
|
||||
register(data).then((res) => {
|
||||
console.log(res)
|
||||
ElMessage.success('注册成功')
|
||||
loading.value = false
|
||||
_hook.useLocalStorage.set("token",res.userinfo.token);
|
||||
_hook.useLocalStorage.set("userInfo",res.userinfo);
|
||||
router.replace("/home");
|
||||
}).catch(err => {
|
||||
loading.value = false
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 回车键触发登录操作
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login-case {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: url('../../assets/logo_bg.png') no-repeat right bottom / contain;
|
||||
}
|
||||
|
||||
.form-case {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// height: 450px;
|
||||
left: 20%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.Hello {
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: #000;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
||||
font-size: 40px;
|
||||
color: #000;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.code-case {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.inp {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.to_register {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
font-size: 14px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -8,7 +8,8 @@
|
||||
<div class="info">
|
||||
<div class="title">总收益</div>
|
||||
<div class="num">
|
||||
<count-to :start-val="0" :end-val="earnings.sumProfit" :duration="1000" :decimals="2" prefix="¥" />
|
||||
<count-to :start-val="0" :end-val="earnings.sumProfit" :duration="1000" :decimals="2"
|
||||
prefix="¥" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,8 +23,8 @@
|
||||
<count-to :start-val="0" :end-val="earnings.availableBalance" :duration="1000" :decimals="2"
|
||||
prefix="¥" />
|
||||
</div>
|
||||
<div class="btn_wrap">
|
||||
<div class="btn">
|
||||
<div class="btn_wrap" v-if="earnings.is_alipay == '1'">
|
||||
<div class="btn" v-if="userInfo != 1">
|
||||
<el-button type="primary" size="small" icon="CreditCard"
|
||||
@click="showWithdraw = true">申请提现</el-button>
|
||||
</div>
|
||||
@@ -32,6 +33,12 @@
|
||||
@click="getUserOutFlowHandleResize">提现记录</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn_wrap" v-if="earnings.is_alipay == '0' && userInfo != 1">
|
||||
<div class="btn">
|
||||
<el-button type="primary" size="small" icon="CreditCard"
|
||||
@click="showWithdzfb = true">绑定账号</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
@@ -41,36 +48,36 @@
|
||||
<div class="info">
|
||||
<div class="title">提现中收益</div>
|
||||
<div class="num">
|
||||
<count-to :start-val="0" :end-val="earnings.fronZenAmt" :duration="1000" :decimals="2" prefix="¥" />
|
||||
<count-to :start-val="0" :end-val="earnings.fronZenAmt" :duration="1000" :decimals="2"
|
||||
prefix="¥" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mt15">
|
||||
<el-space>
|
||||
<!-- <el-space>
|
||||
<el-input placeholder="请输入订单号搜索" v-model="tableOptions.orderNumber" style="width: 200px;" />
|
||||
<el-input placeholder="请输入商户号搜索" v-model="tableOptions.merchantCode" style="width: 200px;" />
|
||||
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
||||
</el-space>
|
||||
</el-space> -->
|
||||
<div class="mt15">
|
||||
<div class="table">
|
||||
<el-table :data="tableOptions.list" size="large" stripe border height="100%"
|
||||
v-loading="tableOptions.loading">
|
||||
<el-table-column prop="price" label="收益"></el-table-column>
|
||||
<el-table-column prop="consumeFee" label="收款金额"></el-table-column>
|
||||
<!-- <el-table-column prop="loginName" label="名称"></el-table-column> -->
|
||||
<el-table-column prop="merchantName" label="商家名称"></el-table-column>
|
||||
<el-table-column prop="merchantName" label="收益来源">
|
||||
<el-table-column prop="profit" label="收益"></el-table-column>
|
||||
<el-table-column prop="amount" label="收款金额"></el-table-column>
|
||||
<el-table-column prop="merchant" label="收益来源">
|
||||
<template #default="scope">
|
||||
<el-text>{{ scope.row.loginName }}</el-text>
|
||||
<el-tag disable-transitions style="margin-left: 8px;">{{ typeNames[scope.row.typeCode]
|
||||
}}</el-tag>
|
||||
<el-text>{{ scope.row.merchant.merchant_name }}</el-text>
|
||||
<!-- <el-tag disable-transitions style="margin-left: 8px;">{{ typeNames[scope.row.typeCode]
|
||||
}}</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createDt" label="时间">
|
||||
|
||||
<template #default="scope">
|
||||
{{ dayjs(scope.row.createDt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
{{ scope.row.create_time }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -83,6 +90,34 @@
|
||||
@size-change="paginationChange" @current-change="paginationChange" />
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog v-model="showWithdzfb" title="绑定账号" width="600" @closed="formRefzfb.resetFields()">
|
||||
<el-space>
|
||||
<el-form ref="formRefzfb" :model="formzfb">
|
||||
<el-form-item label="账号名" prop="alipay_fullname">
|
||||
<el-space>
|
||||
<el-input v-model="formzfb.alipay_fullname" placeholder="请输入姓名" style="width: 450px;" />
|
||||
</el-space>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号" prop="alipay_username">
|
||||
<el-space>
|
||||
<el-input v-model="formzfb.alipay_username" placeholder="请输入账号" style="width: 450px;" />
|
||||
</el-space>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" >
|
||||
<el-space>
|
||||
<el-input v-model="formzfb.notes" placeholder="支付宝/对公账号/银行卡" style="width: 450px;" />
|
||||
</el-space>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-space>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="showWithdzfb = false">取消</el-button>
|
||||
<el-button type="primary" :loading="form.loading" @click="submitHandlezfb">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showWithdraw" title="申请提现" width="600" @closed="formRef.resetFields()">
|
||||
<el-space>
|
||||
<el-form ref="formRef" :model="form" :rules="rules">
|
||||
@@ -90,13 +125,15 @@
|
||||
<el-space>
|
||||
<el-input placeholder="请输入提现金额" clearable style="width: 300px;" :model-value="form.num"
|
||||
@input="numInput" />
|
||||
<el-button type="primary" @click="form.num = ((earnings.availableBalance / 100) * 100).toFixed(2)">
|
||||
<el-button type="primary"
|
||||
@click="form.num = ((earnings.availableBalance / 100) * 100).toFixed(2)">
|
||||
全部提现(¥{{ ((earnings.availableBalance / 100) * 100).toFixed(2) }})
|
||||
</el-button>
|
||||
</el-space>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-space>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="showWithdraw = false">取消</el-button>
|
||||
@@ -104,8 +141,8 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="records.show" title="提现记录">
|
||||
<el-row>
|
||||
<el-dialog v-model="records.show" title="提现记录" width="1200px">
|
||||
<!-- <el-row>
|
||||
<el-select v-model="records.status" @change="recordsPaginationChange">
|
||||
<el-option label="全部" value="" key="" />
|
||||
<el-option label="待审核" :value="0" :key="0" />
|
||||
@@ -113,41 +150,85 @@
|
||||
<el-option label="提现失败" :value="2" :key="2" />
|
||||
<el-option label="审核中" :value="3" :key="3" />
|
||||
</el-select>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<div class="records_table mt15">
|
||||
<el-table :data="records.list" size="large" border height="100%" v-loading="records.loading">
|
||||
<el-table-column prop="id" label="机构id"></el-table-column>
|
||||
<el-table-column prop="cashAmt" label="提现金额">
|
||||
<el-table-column prop="user_id" label="代理id"></el-table-column>
|
||||
<el-table-column prop="username" label="代理账户" v-if="userInfo == 1">
|
||||
|
||||
<template #default="scope">
|
||||
<el-text type="primary">{{ scope.row.cashamt }}元</el-text>
|
||||
<el-text type="primary">{{ scope.row.user.username }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createDt" label="提现时间" width="250">
|
||||
<el-table-column prop="nick_name" label="代理昵称" v-if="userInfo == 1">
|
||||
|
||||
<template #default="scope">
|
||||
<el-text>{{ dayjs(scope.row.createdt).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
|
||||
<el-text type="primary">{{ scope.row.user.nick_name }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<el-table-column prop="phone" label="代理手机号" v-if="userInfo == 1">
|
||||
|
||||
<template #default="scope">
|
||||
<el-text type="primary">{{ scope.row.user.phone }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="alipay_username" label="账户"></el-table-column>
|
||||
<el-table-column prop="alipay_fullname" label="账号名"></el-table-column>
|
||||
<el-table-column prop="alipay_notes" label="备注"></el-table-column>
|
||||
<el-table-column prop="amount" label="提现金额">
|
||||
|
||||
<template #default="scope">
|
||||
<el-text type="primary">{{ scope.row.amount }}元</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="提现时间" width="250">
|
||||
|
||||
<template #default="scope">
|
||||
<el-text>{{ scope.row.create_time }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待审状态">
|
||||
|
||||
<template #default="scope">
|
||||
<el-tag type="info" disable-transitions v-if="scope.row.status == 0">待审核</el-tag>
|
||||
<el-tag type="success" disable-transitions v-if="scope.row.status == 1">提现成功</el-tag>
|
||||
<el-tag type="warning" disable-transitions v-if="scope.row.status == 2">提现失败</el-tag>
|
||||
<el-tag type="info" disable-transitions v-if="scope.row.status == 3">审核中</el-tag>
|
||||
<el-tag type="success" disable-transitions v-if="scope.row.status == 1">审核成功</el-tag>
|
||||
<el-tag type="warning" disable-transitions v-if="scope.row.status == 2">审核失败</el-tag>
|
||||
<!-- <el-tag type="info" disable-transitions v-if="scope.row.status == 3">审核中</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cashStatus" label="上级审核信息">
|
||||
<el-table-column label="转账状态">
|
||||
|
||||
<template #default="scope">
|
||||
<el-tag type="success" disable-transitions
|
||||
v-if="scope.row.status == 1 && scope.row.transfer_status == 3">转账成功</el-tag>
|
||||
|
||||
<el-tooltip v-if="scope.row.status == 1 && scope.row.transfer_status == 4" class="box-item"
|
||||
effect="dark" :content="scope.row.notes" placement="top-start">
|
||||
<el-tag type="danger" disable-transitions
|
||||
v-if="scope.row.status == 1 && scope.row.transfer_status == 4 && userInfo == 1">转账失败
|
||||
<el-icon>
|
||||
<WarningFilled />
|
||||
</el-icon></el-tag>
|
||||
</el-tooltip>
|
||||
<el-tag type="danger" disable-transitions
|
||||
v-if="scope.row.status == 1 && scope.row.transfer_status == 4 && userInfo != 1">转账失败
|
||||
</el-tag>
|
||||
<!-- <el-tag type="info" disable-transitions v-if="scope.row.status == 3">审核中</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="cashStatus" label="上级审核信息">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" icon="Search"
|
||||
@click="showCheckModle(scope.$index, scope.row.cashstatus)">查看进度</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="mt15">
|
||||
<el-pagination layout="prev, pager, next, total, sizes, jumper" background
|
||||
v-model:current-page="records.pageNum" v-model:page-size="records.pageSize" :page-size="records.pageSize"
|
||||
:page-sizes="[10, 20, 30, 50]" :total="records.total" @size-change="recordsPaginationChange"
|
||||
@current-change="recordsPaginationChange" />
|
||||
v-model:current-page="records.pageNum" v-model:page-size="records.pageSize"
|
||||
:page-size="records.pageSize" :page-sizes="[10, 20, 30, 50]" :total="records.total"
|
||||
@size-change="recordsPaginationChange" @current-change="recordsPaginationChange" />
|
||||
</div>
|
||||
<el-dialog v-model="records.showProgress" title="审核进度">
|
||||
<el-steps :active="rowProgressActive" align-center>
|
||||
@@ -163,10 +244,15 @@
|
||||
import hooks from '@/hooks'
|
||||
import { dayjs } from 'element-plus';
|
||||
import { typeNames, clearNoNum } from '@/utils/index.js'
|
||||
import { queryProfit, getUserBalance, withdrawalProfit, getUserOutFlow } from '@/api/organization.js'
|
||||
import { queryProfit, getUserBalance, withdrawalProfit, getUserOutFlow, agentalipay } from '@/api/organization.js'
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessage } from 'element-plus'
|
||||
import _hook from "@/hooks/index.js";
|
||||
|
||||
// 本地数据
|
||||
const userInfo = reactive(
|
||||
_hook.useLocalStorage.get("userInfo").is_admin
|
||||
)
|
||||
// 表格参数
|
||||
const tableOptions = reactive({
|
||||
loading: true,
|
||||
@@ -183,18 +269,25 @@ const tableOptions = reactive({
|
||||
const earnings = reactive({
|
||||
sumProfit: 0,
|
||||
availableBalance: 0,
|
||||
fronZenAmt: 0
|
||||
fronZenAmt: 0,
|
||||
is_alipay: 0
|
||||
})
|
||||
|
||||
// 显示提现弹窗
|
||||
const formRefzfb = ref()
|
||||
const formRef = ref()
|
||||
const showWithdraw = ref(false)
|
||||
|
||||
const showWithdzfb = ref(false)
|
||||
const form = reactive({
|
||||
num: '',
|
||||
loading: false
|
||||
})
|
||||
|
||||
const formzfb = reactive({
|
||||
alipay_username: '',
|
||||
alipay_fullname: '',
|
||||
notes:'',
|
||||
loading: false
|
||||
})
|
||||
const rules = reactive({
|
||||
num: [
|
||||
{
|
||||
@@ -214,7 +307,26 @@ function numInput(e) {
|
||||
form.num = ((earnings.availableBalance / 100) * 100).toFixed(2)
|
||||
}
|
||||
}
|
||||
|
||||
//提交
|
||||
async function submitHandlezfb() {
|
||||
await formRefzfb.value.validate(async (valid) => {
|
||||
if (valid) {
|
||||
try {
|
||||
formzfb.loading = true
|
||||
await agentalipay({
|
||||
alipay_username: formzfb.alipay_username,
|
||||
alipay_fullname: formzfb.alipay_fullname,
|
||||
notes:formzfb.notes,
|
||||
})
|
||||
formzfb.loading = false
|
||||
showWithdzfb.value = false
|
||||
getTableDate()
|
||||
} catch (error) {
|
||||
formzfb.loading = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 提交提现申请
|
||||
async function submitHandle() {
|
||||
await formRef.value.validate(async (valid) => {
|
||||
@@ -226,7 +338,7 @@ async function submitHandle() {
|
||||
})
|
||||
form.loading = false
|
||||
showWithdraw.value = false
|
||||
getUserBalanceHandle()
|
||||
getTableDate()
|
||||
} catch (error) {
|
||||
form.loading = false
|
||||
}
|
||||
@@ -293,14 +405,14 @@ function getUserOutFlowHandleResize() {
|
||||
// 获取提现流水
|
||||
async function getUserOutFlowHandle() {
|
||||
try {
|
||||
const { total, list } = await getUserOutFlow({
|
||||
const res = await getUserOutFlow({
|
||||
status: records.status,
|
||||
pageNum: records.pageNum,
|
||||
page: records.pageNum,
|
||||
pageSize: records.pageSize
|
||||
})
|
||||
records.loading = false
|
||||
records.list = list
|
||||
records.total = total
|
||||
records.list = res.data
|
||||
records.total = res.count
|
||||
} catch (error) {
|
||||
records.loading = false
|
||||
}
|
||||
@@ -322,15 +434,18 @@ function paginationChange() {
|
||||
async function getTableDate() {
|
||||
try {
|
||||
const res = await queryProfit({
|
||||
reqUserId: hooks.useLocalStorage.get('userInfo').userId,
|
||||
orderNumber: tableOptions.orderNumber,
|
||||
merchantCode: tableOptions.merchantCode,
|
||||
pageNum: tableOptions.pageNum,
|
||||
page: tableOptions.pageNum,
|
||||
pageSize: tableOptions.pageSize
|
||||
})
|
||||
tableOptions.loading = false
|
||||
tableOptions.list = res.list
|
||||
tableOptions.total = res.total
|
||||
tableOptions.list = res.data
|
||||
earnings.sumProfit = res.z_profit
|
||||
earnings.availableBalance = res.pro_profit
|
||||
earnings.fronZenAmt = res.l_profit
|
||||
earnings.is_alipay = res.is_alipay
|
||||
tableOptions.total = res.count
|
||||
} catch (error) { }
|
||||
}
|
||||
|
||||
@@ -346,7 +461,7 @@ async function getUserBalanceHandle() {
|
||||
|
||||
onMounted(() => {
|
||||
getTableDate()
|
||||
getUserBalanceHandle()
|
||||
// getUserBalanceHandle()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<el-space>
|
||||
<!-- <el-space>
|
||||
<el-input placeholder="用户名称" v-model="tableOptions.userName" style="width: 200px;" />
|
||||
<el-input placeholder="商户号" v-model="tableOptions.merchantCode" style="width: 200px;" />
|
||||
<el-select v-model="tableOptions.status">
|
||||
@@ -11,46 +11,80 @@
|
||||
<el-option :key="3" :value="3" label="审核中"></el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
||||
</el-space>
|
||||
</el-space> -->
|
||||
<div class="table mt15">
|
||||
<el-table :data="tableOptions.list" size="large" stripe border height="100%" v-loading="tableOptions.loading">
|
||||
<el-table-column prop="id" label="机构id"></el-table-column>
|
||||
<el-table-column prop="merchantCode" label="商户号"></el-table-column>
|
||||
<el-table-column prop="userName" label="商户名称"></el-table-column>
|
||||
<el-table-column prop="accountNo" label="账户号"></el-table-column>
|
||||
<el-table-column prop="cashAmt" label="提现金额">
|
||||
<el-table-column prop="user_id" label="代理id"></el-table-column>
|
||||
<el-table-column prop="username" label="代理账户">
|
||||
<template #default="scope">
|
||||
<el-text type="primary">{{ scope.row.cashAmt }}元</el-text>
|
||||
<el-text type="primary">{{ scope.row.user.username }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="用户id"></el-table-column>
|
||||
<el-table-column prop="createDt" label="提现时间">
|
||||
<el-table-column prop="nick_name" label="代理昵称">
|
||||
<template #default="scope">
|
||||
<el-text>{{ dayjs(scope.row.createDt).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
|
||||
<el-text type="primary">{{ scope.row.user.nick_name }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="typeCode" label="提现人身份">
|
||||
<el-table-column prop="phone" label="代理手机号">
|
||||
<template #default="scope">
|
||||
<el-tag disable-transitions>{{ typeNames[scope.row.typeCode] }}</el-tag>
|
||||
<el-text type="primary">{{ scope.row.user.phone }}</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<el-table-column prop="alipay_username" label="账户名"></el-table-column>
|
||||
<el-table-column prop="alipay_fullname" label="账号"></el-table-column>
|
||||
<el-table-column prop="alipay_notes" label="备注"></el-table-column>
|
||||
|
||||
<!-- <el-table-column prop="merchantCode" label="商户号"></el-table-column> -->
|
||||
<!-- <el-table-column prop="userName" label="商户名称"></el-table-column>
|
||||
<el-table-column prop="accountNo" label="账户号"></el-table-column> -->
|
||||
<el-table-column prop="amount" label="提现金额">
|
||||
<template #default="scope">
|
||||
<el-tag type="info" v-if="scope.row.status == 0">待审核</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.status == 1">提现成功</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.status == 2">提现失败</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.status == 3">审核中</el-tag>
|
||||
<el-text type="primary">{{ scope.row.amount }}元</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cashStatus" label="上级审核信息">
|
||||
<!-- <el-table-column prop="userId" label="用户id"></el-table-column> -->
|
||||
<!-- <el-table-column prop="notes" label="提现时间">
|
||||
<template #default="scope">
|
||||
<el-text>{{ dayjs(scope.row.notes).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="create_time" label="提现时间"></el-table-column>
|
||||
<!-- <el-table-column prop="user" label="提现人身份" >
|
||||
<template #default="scope">
|
||||
<el-tag disable-transitions>{{ scope.row.user.nick_name }}</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="待审状态" v-if="userInfo == 1">
|
||||
<template #default="scope">
|
||||
<el-tag type="info" disable-transitions v-if="scope.row.status == 0">待审核</el-tag>
|
||||
<el-tag type="success" disable-transitions v-if="scope.row.status == 1">审核成功</el-tag>
|
||||
<el-tag type="warning" disable-transitions v-if="scope.row.status == 2">审核失败</el-tag>
|
||||
<!-- <el-tag type="info" disable-transitions v-if="scope.row.status == 3">审核中</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="转账状态" v-if="userInfo == 1">
|
||||
<template #default="scope">
|
||||
<el-tag type="success" disable-transitions
|
||||
v-if="scope.row.status == 1 && scope.row.transfer_status == 3">转账成功</el-tag>
|
||||
<el-tooltip v-if="scope.row.status == 1 && scope.row.transfer_status == 4 && userInfo == 1"
|
||||
class="box-item" effect="dark" :content="scope.row.notes" placement="top-start">
|
||||
<el-tag type="danger" disable-transitions
|
||||
v-if="scope.row.status == 1 && scope.row.transfer_status == 4 && userInfo == 1">转账失败<el-icon>
|
||||
<WarningFilled />
|
||||
</el-icon></el-tag>
|
||||
</el-tooltip>
|
||||
<!-- <el-tag type="info" disable-transitions v-if="scope.row.status == 3">审核中</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="cashStatus" label="上级审核信息">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" icon="Search"
|
||||
@click="showCheckModle(scope.$index, scope.row.cashStatus)">查看进度</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.show && scope.row.status != 2">
|
||||
<template v-if="scope.row.status == 0 && userInfo == 1">
|
||||
<el-popconfirm title="是否审核通过?" width="200" confirm-button-text="通过" cancel-button-text="驳回"
|
||||
@cancel="checkHandle(scope.row, 2)" @confirm="checkHandle(scope.row, 1)">
|
||||
<template #reference>
|
||||
@@ -90,7 +124,7 @@ import { typeNames } from '@/utils/index.js'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { dayjs } from 'element-plus'
|
||||
import hooks from '@/hooks'
|
||||
|
||||
import _hook from "@/hooks/index.js";
|
||||
// 显示进度dialog
|
||||
const show = ref(false)
|
||||
// 当前表格索引
|
||||
@@ -106,7 +140,6 @@ const statusEmun = ref({
|
||||
"2": '提现失败',
|
||||
"3": '审核中'
|
||||
})
|
||||
|
||||
// 查看当前进度
|
||||
function showCheckModle(row, cashStatus) {
|
||||
show.value = true
|
||||
@@ -120,13 +153,18 @@ function showCheckModle(row, cashStatus) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 本地数据
|
||||
const userInfo = reactive(
|
||||
_hook.useLocalStorage.get("userInfo").is_admin
|
||||
)
|
||||
|
||||
// 审核操作
|
||||
async function checkHandle(row, status) {
|
||||
console.log(row, status)
|
||||
try {
|
||||
await modifyOutFlow({
|
||||
id: row.id,
|
||||
status: status
|
||||
type: status
|
||||
})
|
||||
ElMessage.success('提交成功')
|
||||
paginationChange()
|
||||
@@ -161,36 +199,33 @@ function paginationChange() {
|
||||
async function getOutFlowHandle() {
|
||||
try {
|
||||
const res = await getOutFlow({
|
||||
userName: tableOptions.userName,
|
||||
merchantCode: tableOptions.merchantCode,
|
||||
status: tableOptions.status,
|
||||
pageNum: tableOptions.pageNum,
|
||||
pageSize: tableOptions.pageSize
|
||||
page: tableOptions.pageNum
|
||||
})
|
||||
|
||||
const userInfo = hooks.useLocalStorage.get('userInfo')
|
||||
const data = [...res.list];
|
||||
const data = [...res.data];
|
||||
|
||||
// console.log(userInfo.userType)
|
||||
console.log(data, '1111111')
|
||||
|
||||
for (let item of data) {
|
||||
item.show = false;
|
||||
const arr = JSON.parse(item.cashStatus);
|
||||
// console.log(arr);
|
||||
for (let child of arr) {
|
||||
if (child.userType == userInfo.userType && child.status == 0) {
|
||||
item.show = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (let item of data) {
|
||||
// item.show = false;
|
||||
// const arr = JSON.parse(item.cashStatus);
|
||||
// // console.log(arr);
|
||||
// for (let child of arr) {
|
||||
// if (child.userType == userInfo.userType && child.status == 0) {
|
||||
// item.show = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
tableOptions.loading = false
|
||||
tableOptions.list = data
|
||||
tableOptions.total = res.total
|
||||
tableOptions.total = res.count
|
||||
} catch (error) { }
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
getOutFlowHandle()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -6,14 +6,16 @@ import AutoImport from "unplugin-auto-import/vite";
|
||||
export default defineConfig({
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 1111,
|
||||
open: true,
|
||||
proxy: {
|
||||
'/api': {
|
||||
// target: 'http://192.168.2.161:18071/admin/',
|
||||
// target: 'http://newadminapi.sxczgkj.cn/admin/',
|
||||
// target: 'http://admintestapi.sxczgkj.cn/admin/',
|
||||
target: 'http://gw.sxczgkj.cn/admin/', // 测试
|
||||
// target: 'http://gw.sxczgkj.cn/admin/', // 测试
|
||||
// target: 'http://192.168.2.128:18071/admin/',
|
||||
target: 'http://192.168.2.23:7777/proxy/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user