2024.2.21
This commit is contained in:
@@ -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 = 'http://admintestapi.sxczgkj.cn/admin/'
|
VITE_API_URL = 'https://openpm.sxczgkj.cn/'
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
ENV = production
|
ENV = production
|
||||||
|
|
||||||
# 线上环境接口地址
|
# 线上环境接口地址
|
||||||
VITE_API_URL = 'http://admintestapi.sxczgkj.cn/admin/'
|
VITE_API_URL = 'https://openpm.sxczgkj.cn/'
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-admin",
|
"name": "vue-admin",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.3.3",
|
"version": "1.3.20",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -7,32 +7,28 @@ import { dayjs } from 'element-plus';
|
|||||||
export function getIndexData() {
|
export function getIndexData() {
|
||||||
return request({
|
return request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/user/getIndexData"
|
url: "/agent/index"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
/**
|
/**
|
||||||
* 获取首页图表数据
|
* 获取首页图表数据
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function getChartData(type, reqUserId) {
|
export function getChartData() {//收益
|
||||||
const m = {
|
|
||||||
1: '/user/getDayOrder', // 获取近七日收单额
|
|
||||||
2: '/user/getDayProfit', // 获取近七日收益
|
|
||||||
3: '/user/getMonthOrder', // 获取近一年的收单额
|
|
||||||
4: '/user/getMonthProfit' // 获取近一年的收益数据
|
|
||||||
}
|
|
||||||
const params = {
|
|
||||||
year: dayjs().format('YYYY'),
|
|
||||||
reqUserId: reqUserId
|
|
||||||
}
|
|
||||||
return request({
|
return request({
|
||||||
method: "GET",
|
method: "POST",
|
||||||
url: m[type],
|
url: '/agent/profit',
|
||||||
params
|
// params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export function agentamount() {//流水
|
||||||
|
return request({
|
||||||
|
method: "POST",
|
||||||
|
url: '/agent/amount',
|
||||||
|
// params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传OSS
|
* 上传OSS
|
||||||
* @param {*} params
|
* @param {*} params
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ export function modifyFee(params) {
|
|||||||
* 获取收益信息
|
* 获取收益信息
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function queryProfit(params) {
|
export function queryProfit(data) {
|
||||||
return request({
|
return request({
|
||||||
method: "get",
|
method: "post",
|
||||||
url: "/agency/queryProfit",
|
url: "/agent/accumulateprofit",
|
||||||
params
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,22 +76,32 @@ export function getUserBalance() {
|
|||||||
* 提现
|
* 提现
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function withdrawalProfit(params) {
|
export function withdrawalProfit(data) {
|
||||||
return request({
|
return request({
|
||||||
method: "get",
|
method: "post",
|
||||||
url: "/user/withdrawalProfit",
|
url: "/agent/withdrowsub",
|
||||||
params
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 绑定支付宝
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function agentalipay(data) {
|
||||||
|
return request({
|
||||||
|
method: "post",
|
||||||
|
url: "/agent/alipay",
|
||||||
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取提现流水
|
* 获取提现流水
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function getUserOutFlow(params) {
|
export function getUserOutFlow(data) {
|
||||||
return request({
|
return request({
|
||||||
method: "get",
|
method: "post",
|
||||||
url: "/user/getUserOutFlow",
|
url: "/agent/withdrawerlist",
|
||||||
params
|
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
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function queryCustormerFlow(params) {
|
export function queryCustormerFlow(data) {
|
||||||
return request({
|
return request({
|
||||||
method: "get",
|
method: "post",
|
||||||
url: "/agency/queryCustormerFlow",
|
url: "/agent/storelist",
|
||||||
params
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import request from "@/utils/request.js";
|
|||||||
* 提现申请查询
|
* 提现申请查询
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function getOutFlow(params) {
|
export function getOutFlow(data) {
|
||||||
return request({
|
return request({
|
||||||
method: "get",
|
method: "post",
|
||||||
url: "/user/getOutFlow",
|
url: "/agent/withdrawerlist",
|
||||||
params
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,10 +16,10 @@ export function getOutFlow(params) {
|
|||||||
* 提现审核
|
* 提现审核
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function modifyOutFlow(params) {
|
export function modifyOutFlow(data) {
|
||||||
return request({
|
return request({
|
||||||
method: "get",
|
method: "post",
|
||||||
url: "/user/modifyOutFlow",
|
url: "/agent/withdrawalreview",
|
||||||
params
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getChartData } from '@/api/home.js'
|
import { getChartData,agentamount } from '@/api/home.js'
|
||||||
import * as echarts from "echarts"
|
import * as echarts from "echarts"
|
||||||
import { dayjs } from 'element-plus'
|
import { dayjs } from 'element-plus'
|
||||||
import hooks from '@/hooks'
|
import hooks from '@/hooks'
|
||||||
@@ -41,7 +41,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 初始化折线图
|
// 初始化折线图
|
||||||
function initDeicount(yearData = [], sevenData = [], sevenDataTime = []) {
|
function initDeicount(yearData = [], yearDataTime = [], sevenData = [], sevenDataTime = []) {
|
||||||
if (!chartsObj.lineRef1 && !chartsObj.lineRef2) {
|
if (!chartsObj.lineRef1 && !chartsObj.lineRef2) {
|
||||||
chartsObj.lineRef1 = echarts.init(lineRef1.value);
|
chartsObj.lineRef1 = echarts.init(lineRef1.value);
|
||||||
chartsObj.lineRef2 = echarts.init(lineRef2.value);
|
chartsObj.lineRef2 = echarts.init(lineRef2.value);
|
||||||
@@ -58,7 +58,7 @@ function initDeicount(yearData = [], sevenData = [], sevenDataTime = []) {
|
|||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二'],
|
data: yearDataTime,
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'shadow'
|
type: 'shadow'
|
||||||
},
|
},
|
||||||
@@ -124,26 +124,29 @@ function chartTypeChange(t) {
|
|||||||
async function getChartDataMethod() {
|
async function getChartDataMethod() {
|
||||||
try {
|
try {
|
||||||
let yearData = ''
|
let yearData = ''
|
||||||
|
let yearDataTime = ''
|
||||||
let sevenData = ''
|
let sevenData = ''
|
||||||
let sevenDataTime = ''
|
let sevenDataTime = ''
|
||||||
if (chartType.value == 1) {
|
if (chartType.value == 1) {
|
||||||
// 收益
|
// 收益
|
||||||
const res1 = await getChartData(4, props.userId)
|
const res = await getChartData()
|
||||||
const res2 = await getChartData(2, props.userId)
|
yearData = res.year_profit.map(item => item.profit)
|
||||||
yearData = res1.map(item => item.price.toFixed(2))
|
yearDataTime = res.year_profit.map(item => item.date)
|
||||||
sevenData = res2.map(item => item.price.toFixed(2))
|
sevenData = res.m_profit.map(item => item.profit)
|
||||||
sevenDataTime = res2.map(item => dayjs(item.times).format('MM/DD'))
|
sevenDataTime = res.m_profit.map(item => item.date)
|
||||||
} else {
|
} else {
|
||||||
// 流水
|
// 流水agentamount
|
||||||
const res1 = await getChartData(3, props.userId)
|
const res = await agentamount()
|
||||||
const res2 = await getChartData(1, props.userId)
|
yearData = res.year_amount.map(item => item.amount)
|
||||||
yearData = res1.map(item => item.consumeFee)
|
yearDataTime = res.year_amount.map(item => item.date)
|
||||||
sevenData = res2.map(item => item.consumeFee)
|
sevenData = res.m_amount.map(item => item.amount)
|
||||||
sevenDataTime = res2.map(item => dayjs(item.times).format('MM/DD'))
|
sevenDataTime = res.m_amount.map(item => item.date)
|
||||||
}
|
}
|
||||||
initDeicount(yearData, sevenData, sevenDataTime)
|
initDeicount(yearData, yearDataTime, sevenData, sevenDataTime)
|
||||||
chartLoading.value = false
|
chartLoading.value = false
|
||||||
} catch (error) { }
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 批量设置 echarts resize
|
// 批量设置 echarts resize
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { useUser } from "@/store/user.js";
|
|||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHistory(),
|
||||||
|
// history: createWebHistory('/dist'),
|
||||||
routes: [...notFoundAndNoPower, ...fullScreenRouting, ...staticRoutes],
|
routes: [...notFoundAndNoPower, ...fullScreenRouting, ...staticRoutes],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,15 @@ export const fullScreenRouting = [
|
|||||||
title: "注册",
|
title: "注册",
|
||||||
isHide: true,
|
isHide: true,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/password",
|
||||||
|
name: "password",
|
||||||
|
component: () => import("@/views/password/password.vue"),
|
||||||
|
meta: {
|
||||||
|
title: "修改密码",
|
||||||
|
isHide: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -284,115 +293,115 @@ export const asyncRoutes = [
|
|||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
path: '/organization',
|
// path: '/organization',
|
||||||
component: layout,
|
// component: layout,
|
||||||
meta: {
|
// meta: {
|
||||||
title: '大机构管理',
|
// title: '大机构管理',
|
||||||
// roles: ['MG'],
|
// // roles: ['MG'],
|
||||||
isHide: true
|
// isHide: true
|
||||||
},
|
// },
|
||||||
redirect: '/organization/big_organization',
|
// redirect: '/organization/big_organization',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/organization/big_organization',
|
// path: '/organization/big_organization',
|
||||||
component: () => import('@/views/organization/big_organization.vue'),
|
// component: () => import('@/views/organization/big_organization.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '大机构',
|
// title: '大机构',
|
||||||
icon: 'Tickets'
|
// icon: 'Tickets'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/organization/big_organization/agent_detail',
|
// path: '/organization/big_organization/agent_detail',
|
||||||
name: 'agent_detail',
|
// name: 'agent_detail',
|
||||||
component: () => import('@/views/organization/agent_detail.vue'),
|
// component: () => import('@/views/organization/agent_detail.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '机构详情',
|
// title: '机构详情',
|
||||||
isHide: true,
|
// isHide: true,
|
||||||
activeMenu: '/organization/big_organization'
|
// activeMenu: '/organization/big_organization'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/mini_organization_manage',
|
// path: '/mini_organization_manage',
|
||||||
component: layout,
|
// component: layout,
|
||||||
meta: {
|
// meta: {
|
||||||
title: '小机构管理',
|
// title: '小机构管理',
|
||||||
// roles: ['FO'],
|
// // roles: ['FO'],
|
||||||
isHide: true
|
// isHide: true
|
||||||
},
|
// },
|
||||||
redirect: '/mini_organization_manage/mini_organization',
|
// redirect: '/mini_organization_manage/mini_organization',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/mini_organization/mini_organization',
|
// path: '/mini_organization/mini_organization',
|
||||||
component: () => import('@/views/organization/mini_organization.vue'),
|
// component: () => import('@/views/organization/mini_organization.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '小机构',
|
// title: '小机构',
|
||||||
icon: 'SetUp'
|
// icon: 'SetUp'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/organization/mini_organization/mini_agent_detail',
|
// path: '/organization/mini_organization/mini_agent_detail',
|
||||||
name: 'mini_agent_detail',
|
// name: 'mini_agent_detail',
|
||||||
component: () => import('@/views/organization/mini_agent_detail.vue'),
|
// component: () => import('@/views/organization/mini_agent_detail.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '小机构详情',
|
// title: '小机构详情',
|
||||||
isHide: true,
|
// isHide: true,
|
||||||
activeMenu: '/mini_organization/mini_organization'
|
// activeMenu: '/mini_organization/mini_organization'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/agent_manage',
|
// path: '/agent_manage',
|
||||||
component: layout,
|
// component: layout,
|
||||||
meta: {
|
// meta: {
|
||||||
title: '大代理管理',
|
// title: '大代理管理',
|
||||||
// roles: ['FO', 'SO'],
|
// // roles: ['FO', 'SO'],
|
||||||
isHide: true
|
// isHide: true
|
||||||
},
|
// },
|
||||||
redirect: '/agent_manage/agent_list',
|
// redirect: '/agent_manage/agent_list',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/agent_manage/agent_list',
|
// path: '/agent_manage/agent_list',
|
||||||
component: () => import('@/views/organization/agent_list.vue'),
|
// component: () => import('@/views/organization/agent_list.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '大代理',
|
// title: '大代理',
|
||||||
icon: 'Discount'
|
// icon: 'Discount'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/promotion_manage',
|
// path: '/promotion_manage',
|
||||||
component: layout,
|
// component: layout,
|
||||||
meta: {
|
// meta: {
|
||||||
title: '代理',
|
// title: '代理',
|
||||||
icon: 'Connection',
|
// icon: 'Connection',
|
||||||
},
|
// },
|
||||||
redirect: '/promotion_manage/one_promotion_list',
|
// redirect: '/promotion_manage/one_promotion_list',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/promotion_manage/one_promotion_list',
|
// path: '/promotion_manage/one_promotion_list',
|
||||||
component: () => import('@/views/organization/one_promotion_list.vue'),
|
// component: () => import('@/views/organization/one_promotion_list.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '一级代理',
|
// title: '一级代理',
|
||||||
icon: 'User',
|
// icon: 'User',
|
||||||
// roles: ['FO', 'SO', 'AG']
|
// // roles: ['FO', 'SO', 'AG']
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/promotion_manage/two_promotion_list',
|
// path: '/promotion_manage/two_promotion_list',
|
||||||
component: () => import('@/views/organization/two_promotion_list.vue'),
|
// component: () => import('@/views/organization/two_promotion_list.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '二级代理',
|
// title: '二级代理',
|
||||||
icon: 'User',
|
// icon: 'User',
|
||||||
// roles: ['FO', 'SO', 'AG', 'FB']
|
// // roles: ['FO', 'SO', 'AG', 'FB']
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: '/shop_manage',
|
path: '/shop_manage',
|
||||||
component: layout,
|
component: layout,
|
||||||
@@ -408,28 +417,28 @@ export const asyncRoutes = [
|
|||||||
name: 'shop_list',
|
name: 'shop_list',
|
||||||
component: () => import('@/views/organization/shop_list.vue'),
|
component: () => import('@/views/organization/shop_list.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '商家列表',
|
title: '用户列表',
|
||||||
icon: 'Tickets'
|
icon: 'Tickets'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: '/shop_manage/shop_detail',
|
// path: '/shop_manage/shop_detail',
|
||||||
name: 'shop_detail',
|
// name: 'shop_detail',
|
||||||
component: () => import('@/views/organization/shop_detail.vue'),
|
// component: () => import('@/views/organization/shop_detail.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '详情',
|
// title: '详情',
|
||||||
isHide: true,
|
// isHide: true,
|
||||||
activeMenu: '/shop_manage/shop_list'
|
// activeMenu: '/shop_manage/shop_list'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/shop_manage/maker_apply',
|
// path: '/shop_manage/maker_apply',
|
||||||
component: () => import('@/views/organization/maker_apply.vue'),
|
// component: () => import('@/views/organization/maker_apply.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '创客申请',
|
// title: '创客申请',
|
||||||
icon: 'User'
|
// icon: 'User'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -452,25 +461,25 @@ export const asyncRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: '/device_manage',
|
// path: '/device_manage',
|
||||||
component: layout,
|
// component: layout,
|
||||||
meta: {
|
// meta: {
|
||||||
title: '设备管理',
|
// title: '设备管理',
|
||||||
isHide: true
|
// isHide: true
|
||||||
},
|
// },
|
||||||
redirect: '/device_manage/device_list',
|
// redirect: '/device_manage/device_list',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/device_manage/device_list',
|
// path: '/device_manage/device_list',
|
||||||
component: () => import('@/views/device/device_list.vue'),
|
// component: () => import('@/views/device/device_list.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '设备列表',
|
// title: '设备列表',
|
||||||
icon: 'TakeawayBox'
|
// icon: 'TakeawayBox'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: '/total_earnings',
|
path: '/total_earnings',
|
||||||
component: layout,
|
component: layout,
|
||||||
@@ -490,66 +499,66 @@ export const asyncRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: '/promotion',
|
// path: '/promotion',
|
||||||
component: layout,
|
// component: layout,
|
||||||
meta: {
|
// meta: {
|
||||||
title: '推广图片管理',
|
// title: '推广图片管理',
|
||||||
isHide: true,
|
// isHide: true,
|
||||||
// roles: ['MG']
|
// // roles: ['MG']
|
||||||
},
|
// },
|
||||||
redirect: '/promotion/promotion_list',
|
// redirect: '/promotion/promotion_list',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/promotion/promotion_list',
|
// path: '/promotion/promotion_list',
|
||||||
component: () => import('@/views/promotion/promotion_list.vue'),
|
// component: () => import('@/views/promotion/promotion_list.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '推广图片',
|
// title: '推广图片',
|
||||||
icon: 'PictureRounded'
|
// icon: 'PictureRounded'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/app_manage',
|
// path: '/app_manage',
|
||||||
component: layout,
|
// component: layout,
|
||||||
meta: {
|
// meta: {
|
||||||
title: 'APP管理',
|
// title: 'APP管理',
|
||||||
icon: 'Iphone',
|
// icon: 'Iphone',
|
||||||
// roles: ['MG']
|
// // roles: ['MG']
|
||||||
},
|
// },
|
||||||
redirect: '/app_manage/menu_list',
|
// redirect: '/app_manage/menu_list',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/app_manage/menu_list',
|
// path: '/app_manage/menu_list',
|
||||||
component: () => import('@/views/app_manage/menu_list.vue'),
|
// component: () => import('@/views/app_manage/menu_list.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: '菜单管理',
|
// title: '菜单管理',
|
||||||
icon: 'Tickets'
|
// icon: 'Tickets'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/setting',
|
// path: '/setting',
|
||||||
component: layout,
|
// component: layout,
|
||||||
meta: {
|
// meta: {
|
||||||
title: '系统设置',
|
// title: '系统设置',
|
||||||
icon: 'Setting',
|
// icon: 'Setting',
|
||||||
// roles: ['MG']
|
// // roles: ['MG']
|
||||||
},
|
// },
|
||||||
redirect: '/setting/appid_manage',
|
// redirect: '/setting/appid_manage',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '/setting/appid_manage',
|
// path: '/setting/appid_manage',
|
||||||
component: () => import('@/views/setting/appid_manage.vue'),
|
// component: () => import('@/views/setting/appid_manage.vue'),
|
||||||
meta: {
|
// meta: {
|
||||||
title: 'Appid管理',
|
// title: 'Appid管理',
|
||||||
icon: 'Tickets'
|
// icon: 'Tickets'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: '/notice',
|
path: '/notice',
|
||||||
component: layout,
|
component: layout,
|
||||||
|
|||||||
@@ -47,17 +47,17 @@ export const useUser = defineStore("useUser", {
|
|||||||
/**
|
/**
|
||||||
* 获取消息列表
|
* 获取消息列表
|
||||||
*/
|
*/
|
||||||
async getNotices() {
|
// async getNotices() {
|
||||||
try {
|
// try {
|
||||||
const res = await getNotices({
|
// const res = await getNotices({
|
||||||
currPage: 1,
|
// currPage: 1,
|
||||||
size: 10
|
// size: 10
|
||||||
})
|
// })
|
||||||
this.notices.num = res.unread
|
// this.notices.num = res.unread
|
||||||
this.notices.list = res.list.list
|
// this.notices.list = res.list.list
|
||||||
} catch (error) {
|
// } catch (error) {
|
||||||
console.error('获取消息列表error=', error)
|
// console.error('获取消息列表error=', error)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import NProgress from "nprogress";
|
|||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: import.meta.env.MODE == 'development' ? '/api/' : '/api/admin',
|
baseURL: import.meta.env.MODE == 'development' ? '/api/' : 'https://openpm.sxczgkj.cn/proxy/',
|
||||||
// withCredentials: true, // 跨域请求时发送 cookies
|
// withCredentials: false, // 跨域请求时发送 cookies
|
||||||
timeout: 5000, // 请求超时
|
timeout: 5000, // 请求超时
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ service.interceptors.request.use(
|
|||||||
// ['X-Token'] 是自定义标题键
|
// ['X-Token'] 是自定义标题键
|
||||||
// 请根据实际情况修改
|
// 请根据实际情况修改
|
||||||
config.headers["token"] = _hook.useLocalStorage.get("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["loginName"] = _hook.useLocalStorage.get("userInfo").loginName;
|
||||||
config.headers["userId"] = _hook.useLocalStorage.get("userInfo").userId;
|
config.headers["userId"] = _hook.useLocalStorage.get("userInfo").userId;
|
||||||
// config.headers['Content-Type'] = 'application/json'
|
// config.headers['Content-Type'] = 'application/json'
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="header_title">
|
<div class="header_title">
|
||||||
欢迎回来!{{ storeUser.userInfo.loginName }}
|
<div>
|
||||||
|
欢迎回来!{{ storeUser.userInfo.username }}
|
||||||
|
</div>
|
||||||
|
<div v-if="storeUser.userInfo.invite">邀请码:{{ storeUser.userInfo.invite }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="data_row">
|
<div class="data_row">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@@ -78,10 +81,10 @@ let homeData = reactive({
|
|||||||
async function getIndexDataHandle() {
|
async function getIndexDataHandle() {
|
||||||
try {
|
try {
|
||||||
const res = await getIndexData()
|
const res = await getIndexData()
|
||||||
homeData.sumConsumeFee = res.sumConsumeFee
|
homeData.sumConsumeFee = res.amount_price
|
||||||
homeData.sumfansShareMoney = res.sumfansShareMoney
|
homeData.sumfansShareMoney = res.amount_price_income
|
||||||
homeData.yestedayShareMoney = res.yestedayShareMoney
|
homeData.yestedayShareMoney = res.amount_price_income_day
|
||||||
homeData.currentFee = res.currentFee
|
homeData.currentFee = res.rate
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
@@ -96,8 +99,10 @@ onMounted(() => {
|
|||||||
.header_title {
|
.header_title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 15px 0 30px 0;
|
padding: 15px 50px 30px 50px;
|
||||||
border-bottom: 1px solid #ececec;
|
border-bottom: 1px solid #ececec;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data_row {
|
.data_row {
|
||||||
|
|||||||
@@ -64,6 +64,9 @@
|
|||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<!-- <el-dropdown-item>个人中心</el-dropdown-item> -->
|
<!-- <el-dropdown-item>个人中心</el-dropdown-item> -->
|
||||||
<el-dropdown-item @click="logOut">退出登录</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>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -121,7 +124,7 @@ function toDetail(item) {
|
|||||||
})
|
})
|
||||||
if (!item.isdeal) {
|
if (!item.isdeal) {
|
||||||
unread({ noticecode: item.noticecode })
|
unread({ noticecode: item.noticecode })
|
||||||
storeUser.getNotices()
|
// storeUser.getNotices()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
<verificationCode @getCode="getCode" :key="verificationCodeKey"></verificationCode>
|
<verificationCode @getCode="getCode" :key="verificationCodeKey"></verificationCode>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<div class="to_register">
|
<!-- <div class="to_register">
|
||||||
<router-link :to="{ name: 'register' }">
|
<router-link :to="{ name: 'register' }">
|
||||||
<el-text type="primary">注册代理商</el-text>
|
<el-text type="primary">注册代理商</el-text>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" size="large" :loading="loading" @click="login" style="width: 100%;">登录</el-button>
|
<el-button type="primary" size="large" :loading="loading" @click="login" style="width: 100%;">登录</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const tableOptions = reactive({
|
|||||||
// 分页回调
|
// 分页回调
|
||||||
function paginationChange() {
|
function paginationChange() {
|
||||||
tableOptions.loading = true
|
tableOptions.loading = true
|
||||||
getNoticesAjax()
|
// getNoticesAjax()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取消息列表
|
// 获取消息列表
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="data_row">
|
<!-- <div class="data_row">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<img class="img" src="@/assets/home_icon6.png">
|
<img class="img" src="@/assets/home_icon6.png">
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="item">
|
<div class="item">
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<img class="img" src="../assets/home_icon2.png">
|
<img class="img" src="../assets/home_icon2.png">
|
||||||
</div>
|
</div>
|
||||||
@@ -69,15 +69,15 @@
|
|||||||
<span class="i">%</span>
|
<span class="i">%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="card mt15">
|
<div class="card mt15">
|
||||||
<el-space>
|
<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.merchantCode" style="width: 200px;" />
|
||||||
<el-input placeholder="请输入商户号" v-model="tableOptions.phone" 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-input placeholder="请输入用户ID" v-model="tableOptions.reqUserId" style="width: 200px;" />
|
||||||
<el-select placeholder="请选择进件状态" v-model="tableOptions.status">
|
<el-select placeholder="请选择进件状态" v-model="tableOptions.status">
|
||||||
<el-option :value="0" label="待审核"></el-option>
|
<el-option :value="0" label="待审核"></el-option>
|
||||||
<el-option :value="1" label="审核中"></el-option>
|
<el-option :value="1" label="审核中"></el-option>
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
<el-option :value="1" label="小微"></el-option>
|
<el-option :value="1" label="小微"></el-option>
|
||||||
<el-option :value="2" label="个体"></el-option>
|
<el-option :value="2" label="个体"></el-option>
|
||||||
<el-option :value="3" 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 type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
||||||
<el-button icon="RefreshRight" @click="resizeTable">重置</el-button>
|
<el-button icon="RefreshRight" @click="resizeTable">重置</el-button>
|
||||||
</el-space>
|
</el-space>
|
||||||
@@ -96,12 +96,31 @@
|
|||||||
<el-table ref="table" :data="tableOptions.list" size="large" stripe border height="100%"
|
<el-table ref="table" :data="tableOptions.list" size="large" stripe border height="100%"
|
||||||
v-loading="tableOptions.loading">
|
v-loading="tableOptions.loading">
|
||||||
<el-table-column prop="id" label="ID"></el-table-column>
|
<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">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</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="推广费率">
|
<!-- <el-table-column prop="current_fee" label="推广费率">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-text type="info" v-if="scope.row.is_extend == 0">无</el-text>
|
<el-text type="info" v-if="scope.row.is_extend == 0">无</el-text>
|
||||||
@@ -112,8 +131,8 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-text>{{ scope.row.sumConsumeFee.toFixed(2) }}</el-text>
|
<el-text>{{ scope.row.sumConsumeFee.toFixed(2) }}</el-text>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column>
|
||||||
<el-table-column prop="inviteNum" label="邀请码"></el-table-column>
|
<el-table-column prop="inviteNum" label="邀请码"></el-table-column> -->
|
||||||
<el-table-column prop="agencyName" label="实名状态">
|
<el-table-column prop="agencyName" label="实名状态">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info" disable-transitions v-if="scope.row.status == 0">未实名</el-tag>
|
<el-tag type="info" disable-transitions v-if="scope.row.status == 0">未实名</el-tag>
|
||||||
@@ -122,7 +141,7 @@
|
|||||||
<el-tag type="success" disable-transitions v-if="scope.row.status == 3">已审核</el-tag>
|
<el-tag type="success" disable-transitions v-if="scope.row.status == 3">已审核</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="sumfansShareMoney" label="累计收款">
|
<!-- <el-table-column prop="sumfansShareMoney" label="累计收款">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link type="primary" icon="search" @click="showTotalEarnings(scope.row.id)">
|
<el-link type="primary" icon="search" @click="showTotalEarnings(scope.row.id)">
|
||||||
{{ scope.row.sumConsumeFee }}
|
{{ scope.row.sumConsumeFee }}
|
||||||
@@ -140,7 +159,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商户基本信息">
|
<el-table-column label="商户基本信息">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<el-text type="primary" size="small">{{ scope.row.merchantBaseInfo.merchantTypeName }}</el-text>
|
<el-text type="primary" size="small">{{ scope.row.merchantBaseInfo.merchantTypeName }}</el-text>
|
||||||
@@ -230,7 +249,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创客等级" align="center">
|
<el-table-column label="创客等级" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info" disable-transitions v-if="scope.row.is_extend == 0">普通商户</el-tag>
|
<el-tag type="info" disable-transitions v-if="scope.row.is_extend == 0">普通商户</el-tag>
|
||||||
@@ -242,8 +261,8 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ dayjs(scope.row.createDt).format('YYYY-MM-DD HH:mm:ss') }}
|
{{ dayjs(scope.row.createDt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>-->
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<!-- <el-table-column label="操作" width="150" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" size="small" disabled icon="Search" v-permission="['MG']"
|
<el-button type="primary" size="small" disabled icon="Search" v-permission="['MG']"
|
||||||
v-if="!scope.row.merchantBaseInfo.alias">
|
v-if="!scope.row.merchantBaseInfo.alias">
|
||||||
@@ -257,7 +276,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt15">
|
<div class="mt15">
|
||||||
@@ -339,7 +358,7 @@ function dialogSearchHandle() {
|
|||||||
// 分页回调
|
// 分页回调
|
||||||
function dialogPaginationChange() {
|
function dialogPaginationChange() {
|
||||||
dialogTableOptions.loading = true
|
dialogTableOptions.loading = true
|
||||||
getTableDate()
|
// getTableDate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取机构列表
|
// 获取机构列表
|
||||||
@@ -379,7 +398,7 @@ const tableOptions = reactive({
|
|||||||
loading: true,
|
loading: true,
|
||||||
agencyCode: '', // 商户登录号
|
agencyCode: '', // 商户登录号
|
||||||
merchantCode: '', // 商户号
|
merchantCode: '', // 商户号
|
||||||
phone: '',
|
merchant_name: '',
|
||||||
status: '', // 进件状态。0或无、待审核,1、审核中 2、审核失败 3、审核通过
|
status: '', // 进件状态。0或无、待审核,1、审核中 2、审核失败 3、审核通过
|
||||||
merchantType: '', // 1:小微 2:个体 3:企业
|
merchantType: '', // 1:小微 2:个体 3:企业
|
||||||
reqUserId: '', // 用户id
|
reqUserId: '', // 用户id
|
||||||
@@ -415,20 +434,20 @@ function paginationChange() {
|
|||||||
async function queryCustormerFlowHandle() {
|
async function queryCustormerFlowHandle() {
|
||||||
try {
|
try {
|
||||||
const res = await queryCustormerFlow({
|
const res = await queryCustormerFlow({
|
||||||
agencyCode: tableOptions.agencyCode,
|
// agencyCode: tableOptions.agencyCode,
|
||||||
merchantCode: tableOptions.merchantCode,
|
merchant_code: tableOptions.merchantCode,
|
||||||
phone: tableOptions.phone,
|
merchant_name: tableOptions.merchant_name,
|
||||||
status: tableOptions.status,
|
// status: tableOptions.status,
|
||||||
merchantType: tableOptions.merchantType,
|
// merchantType: tableOptions.merchantType,
|
||||||
reqUserId: tableOptions.reqUserId,
|
// reqUserId: tableOptions.reqUserId,
|
||||||
pageNum: tableOptions.pageNum,
|
page: tableOptions.pageNum,
|
||||||
pageSzie: tableOptions.pageSzie,
|
// pageSzie: tableOptions.pageSzie,
|
||||||
userType: 'MC',
|
// userType: 'MC',
|
||||||
isExtend: 'shop'
|
// isExtend: 'shop',
|
||||||
})
|
})
|
||||||
tableOptions.loading = false
|
tableOptions.loading = false
|
||||||
tableOptions.list = res.list
|
tableOptions.list = res.data
|
||||||
tableOptions.total = res.total
|
tableOptions.total = res.count
|
||||||
table.value.setScrollTop(0)
|
table.value.setScrollTop(0)
|
||||||
} catch (error) { }
|
} catch (error) { }
|
||||||
}
|
}
|
||||||
@@ -481,7 +500,7 @@ function filterData(arr, type) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
queryCustormerFlowHandle()
|
queryCustormerFlowHandle()
|
||||||
queryCustormSumAjax()
|
// queryCustormSumAjax()
|
||||||
})
|
})
|
||||||
</script>
|
</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>
|
||||||
|
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
<count-to :start-val="0" :end-val="earnings.availableBalance" :duration="1000" :decimals="2"
|
<count-to :start-val="0" :end-val="earnings.availableBalance" :duration="1000" :decimals="2"
|
||||||
prefix="¥" />
|
prefix="¥" />
|
||||||
</div>
|
</div>
|
||||||
<div class="btn_wrap">
|
<div class="btn_wrap" v-if="earnings.is_alipay == '1'">
|
||||||
<div class="btn">
|
<div class="btn" v-if="userInfo != 1">
|
||||||
<el-button type="primary" size="small" icon="CreditCard"
|
<el-button type="primary" size="small" icon="CreditCard"
|
||||||
@click="showWithdraw = true">申请提现</el-button>
|
@click="showWithdraw = true">申请提现</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,6 +32,12 @@
|
|||||||
@click="getUserOutFlowHandleResize">提现记录</el-button>
|
@click="getUserOutFlowHandleResize">提现记录</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="btn_wrap" v-else>
|
||||||
|
<div class="btn">
|
||||||
|
<el-button type="primary" size="small" icon="CreditCard"
|
||||||
|
@click="showWithdzfb = true">绑定支付宝</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@@ -48,29 +54,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card mt15">
|
<div class="card mt15">
|
||||||
<el-space>
|
<!-- <el-space>
|
||||||
<el-input placeholder="请输入订单号搜索" v-model="tableOptions.orderNumber" style="width: 200px;" />
|
<el-input placeholder="请输入订单号搜索" v-model="tableOptions.orderNumber" style="width: 200px;" />
|
||||||
<el-input placeholder="请输入商户号搜索" v-model="tableOptions.merchantCode" style="width: 200px;" />
|
<el-input placeholder="请输入商户号搜索" v-model="tableOptions.merchantCode" style="width: 200px;" />
|
||||||
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
||||||
</el-space>
|
</el-space> -->
|
||||||
<div class="mt15">
|
<div class="mt15">
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<el-table :data="tableOptions.list" size="large" stripe border height="100%"
|
<el-table :data="tableOptions.list" size="large" stripe border height="100%"
|
||||||
v-loading="tableOptions.loading">
|
v-loading="tableOptions.loading">
|
||||||
<el-table-column prop="price" label="收益"></el-table-column>
|
<el-table-column prop="profit" label="收益"></el-table-column>
|
||||||
<el-table-column prop="consumeFee" label="收款金额"></el-table-column>
|
<el-table-column prop="amount" label="收款金额"></el-table-column>
|
||||||
<!-- <el-table-column prop="loginName" 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="merchant" label="商家名称"></el-table-column> -->
|
||||||
<el-table-column prop="merchantName" label="收益来源">
|
<el-table-column prop="merchant" label="收益来源">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-text>{{ scope.row.loginName }}</el-text>
|
<el-text>{{ scope.row.merchant.merchant_name }}</el-text>
|
||||||
<el-tag disable-transitions style="margin-left: 8px;">{{ typeNames[scope.row.typeCode]
|
<!-- <el-tag disable-transitions style="margin-left: 8px;">{{ typeNames[scope.row.typeCode]
|
||||||
}}</el-tag>
|
}}</el-tag> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createDt" label="时间">
|
<el-table-column prop="createDt" label="时间">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ dayjs(scope.row.createDt).format('YYYY-MM-DD HH:mm:ss') }}
|
{{ scope.row.create_time }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -83,6 +89,28 @@
|
|||||||
@size-change="paginationChange" @current-change="paginationChange" />
|
@size-change="paginationChange" @current-change="paginationChange" />
|
||||||
</div>
|
</div>
|
||||||
</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_username">
|
||||||
|
<el-space>
|
||||||
|
<el-input v-model="formzfb.alipay_username" placeholder="请输入支付宝账号" style="width: 450px;"/>
|
||||||
|
</el-space>
|
||||||
|
</el-form-item>
|
||||||
|
<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>
|
||||||
|
</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-dialog v-model="showWithdraw" title="申请提现" width="600" @closed="formRef.resetFields()">
|
||||||
<el-space>
|
<el-space>
|
||||||
<el-form ref="formRef" :model="form" :rules="rules">
|
<el-form ref="formRef" :model="form" :rules="rules">
|
||||||
@@ -111,20 +139,20 @@
|
|||||||
<el-option label="待审核" :value="0" :key="0" />
|
<el-option label="待审核" :value="0" :key="0" />
|
||||||
<el-option label="审核通过" :value="1" :key="1" />
|
<el-option label="审核通过" :value="1" :key="1" />
|
||||||
<el-option label="提现失败" :value="2" :key="2" />
|
<el-option label="提现失败" :value="2" :key="2" />
|
||||||
<el-option label="审核中" :value="3" :key="3" />
|
<!-- <el-option label="审核中" :value="3" :key="3" /> -->
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="records_table mt15">
|
<div class="records_table mt15">
|
||||||
<el-table :data="records.list" size="large" border height="100%" v-loading="records.loading">
|
<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="id" label="机构id"></el-table-column>
|
||||||
<el-table-column prop="cashAmt" label="提现金额">
|
<el-table-column prop="amount" label="提现金额">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-text type="primary">{{ scope.row.cashamt }}元</el-text>
|
<el-text type="primary">{{ scope.row.amount }}元</el-text>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createDt" label="提现时间" width="250">
|
<el-table-column prop="create_time" label="提现时间" width="250">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-text>{{ dayjs(scope.row.createdt).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
|
<el-text>{{ scope.row.create_time }}</el-text>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态">
|
<el-table-column label="状态">
|
||||||
@@ -132,15 +160,15 @@
|
|||||||
<el-tag type="info" disable-transitions v-if="scope.row.status == 0">待审核</el-tag>
|
<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="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="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="info" disable-transitions v-if="scope.row.status == 3">审核中</el-tag> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="cashStatus" label="上级审核信息">
|
<!-- <el-table-column prop="cashStatus" label="上级审核信息">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link type="primary" icon="Search"
|
<el-link type="primary" icon="Search"
|
||||||
@click="showCheckModle(scope.$index, scope.row.cashstatus)">查看进度</el-link>
|
@click="showCheckModle(scope.$index, scope.row.cashstatus)">查看进度</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt15">
|
<div class="mt15">
|
||||||
@@ -163,10 +191,15 @@
|
|||||||
import hooks from '@/hooks'
|
import hooks from '@/hooks'
|
||||||
import { dayjs } from 'element-plus';
|
import { dayjs } from 'element-plus';
|
||||||
import { typeNames, clearNoNum } from '@/utils/index.js'
|
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 { onMounted, reactive, ref } from 'vue';
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
import _hook from "@/hooks/index.js";
|
||||||
|
|
||||||
|
// 本地数据
|
||||||
|
const userInfo = reactive(
|
||||||
|
_hook.useLocalStorage.get("userInfo").is_admin
|
||||||
|
)
|
||||||
// 表格参数
|
// 表格参数
|
||||||
const tableOptions = reactive({
|
const tableOptions = reactive({
|
||||||
loading: true,
|
loading: true,
|
||||||
@@ -183,18 +216,24 @@ const tableOptions = reactive({
|
|||||||
const earnings = reactive({
|
const earnings = reactive({
|
||||||
sumProfit: 0,
|
sumProfit: 0,
|
||||||
availableBalance: 0,
|
availableBalance: 0,
|
||||||
fronZenAmt: 0
|
fronZenAmt: 0,
|
||||||
|
is_alipay: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
// 显示提现弹窗
|
// 显示提现弹窗
|
||||||
|
const formRefzfb = ref()
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const showWithdraw = ref(false)
|
const showWithdraw = ref(false)
|
||||||
|
const showWithdzfb = ref(false)
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
num: '',
|
num: '',
|
||||||
loading: false
|
loading: false
|
||||||
})
|
})
|
||||||
|
const formzfb = reactive({
|
||||||
|
alipay_username: '',
|
||||||
|
alipay_fullname: '',
|
||||||
|
loading: false
|
||||||
|
})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
num: [
|
num: [
|
||||||
{
|
{
|
||||||
@@ -214,7 +253,25 @@ function numInput(e) {
|
|||||||
form.num = ((earnings.availableBalance / 100) * 100).toFixed(2)
|
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,
|
||||||
|
})
|
||||||
|
formzfb.loading = false
|
||||||
|
showWithdzfb.value = false
|
||||||
|
getTableDate()
|
||||||
|
} catch (error) {
|
||||||
|
formzfb.loading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 提交提现申请
|
// 提交提现申请
|
||||||
async function submitHandle() {
|
async function submitHandle() {
|
||||||
await formRef.value.validate(async (valid) => {
|
await formRef.value.validate(async (valid) => {
|
||||||
@@ -293,14 +350,14 @@ function getUserOutFlowHandleResize() {
|
|||||||
// 获取提现流水
|
// 获取提现流水
|
||||||
async function getUserOutFlowHandle() {
|
async function getUserOutFlowHandle() {
|
||||||
try {
|
try {
|
||||||
const { total, list } = await getUserOutFlow({
|
const res = await getUserOutFlow({
|
||||||
status: records.status,
|
status: records.status,
|
||||||
pageNum: records.pageNum,
|
page: records.pageNum,
|
||||||
pageSize: records.pageSize
|
pageSize: records.pageSize
|
||||||
})
|
})
|
||||||
records.loading = false
|
records.loading = false
|
||||||
records.list = list
|
records.list = res.data
|
||||||
records.total = total
|
records.total = res.count
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
records.loading = false
|
records.loading = false
|
||||||
}
|
}
|
||||||
@@ -322,15 +379,18 @@ function paginationChange() {
|
|||||||
async function getTableDate() {
|
async function getTableDate() {
|
||||||
try {
|
try {
|
||||||
const res = await queryProfit({
|
const res = await queryProfit({
|
||||||
reqUserId: hooks.useLocalStorage.get('userInfo').userId,
|
|
||||||
orderNumber: tableOptions.orderNumber,
|
orderNumber: tableOptions.orderNumber,
|
||||||
merchantCode: tableOptions.merchantCode,
|
merchantCode: tableOptions.merchantCode,
|
||||||
pageNum: tableOptions.pageNum,
|
page: tableOptions.pageNum,
|
||||||
pageSize: tableOptions.pageSize
|
pageSize: tableOptions.pageSize
|
||||||
})
|
})
|
||||||
tableOptions.loading = false
|
tableOptions.loading = false
|
||||||
tableOptions.list = res.list
|
tableOptions.list = res.data
|
||||||
tableOptions.total = res.total
|
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) { }
|
} catch (error) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,7 +406,7 @@ async function getUserBalanceHandle() {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getTableDate()
|
getTableDate()
|
||||||
getUserBalanceHandle()
|
// getUserBalanceHandle()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<el-space>
|
<!-- <el-space>
|
||||||
<el-input placeholder="用户名称" v-model="tableOptions.userName" style="width: 200px;" />
|
<el-input placeholder="用户名称" v-model="tableOptions.userName" style="width: 200px;" />
|
||||||
<el-input placeholder="商户号" v-model="tableOptions.merchantCode" style="width: 200px;" />
|
<el-input placeholder="商户号" v-model="tableOptions.merchantCode" style="width: 200px;" />
|
||||||
<el-select v-model="tableOptions.status">
|
<el-select v-model="tableOptions.status">
|
||||||
@@ -11,46 +11,48 @@
|
|||||||
<el-option :key="3" :value="3" label="审核中"></el-option>
|
<el-option :key="3" :value="3" label="审核中"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="searchHandle">搜索</el-button>
|
||||||
</el-space>
|
</el-space> -->
|
||||||
<div class="table mt15">
|
<div class="table mt15">
|
||||||
<el-table :data="tableOptions.list" size="large" stripe border height="100%" v-loading="tableOptions.loading">
|
<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="user_id" label="机构id"></el-table-column>
|
||||||
<el-table-column prop="merchantCode" 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="userName" label="商户名称"></el-table-column>
|
||||||
<el-table-column prop="accountNo" label="账户号"></el-table-column>
|
<el-table-column prop="accountNo" label="账户号"></el-table-column> -->
|
||||||
<el-table-column prop="cashAmt" label="提现金额">
|
<el-table-column prop="amount" label="提现金额">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-text type="primary">{{ scope.row.cashAmt }}元</el-text>
|
<el-text type="primary">{{ scope.row.amount }}元</el-text>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="userId" label="用户id"></el-table-column>
|
<!-- <el-table-column prop="userId" label="用户id"></el-table-column> -->
|
||||||
<el-table-column prop="createDt" label="提现时间">
|
<!-- <el-table-column prop="notes" label="提现时间">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-text>{{ dayjs(scope.row.createDt).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
|
<el-text>{{ dayjs(scope.row.notes).format('YYYY-MM-DD HH:mm:ss') }}</el-text>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column prop="typeCode" label="提现人身份">
|
<el-table-column prop="create_time" label="提现时间"></el-table-column>
|
||||||
|
<!-- <el-table-column prop="user" label="提现人身份" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag disable-transitions>{{ typeNames[scope.row.typeCode] }}</el-tag>
|
<el-tag disable-transitions>{{ scope.row.user.nick_name }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="状态">
|
<el-table-column label="状态" v-if="userInfo == 1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="info" v-if="scope.row.status == 0">待审核</el-tag>
|
<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="success" v-if="scope.row.status == 1">通过</el-tag>
|
||||||
<el-tag type="warning" v-if="scope.row.status == 2">提现失败</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-tag type="info" v-if="scope.row.status == 3">审核中</el-tag> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="cashStatus" label="上级审核信息">
|
<!-- <el-table-column prop="cashStatus" label="上级审核信息">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link type="primary" icon="Search"
|
<el-link type="primary" icon="Search"
|
||||||
@click="showCheckModle(scope.$index, scope.row.cashStatus)">查看进度</el-link>
|
@click="showCheckModle(scope.$index, scope.row.cashStatus)">查看进度</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template #default="scope">
|
<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="驳回"
|
<el-popconfirm title="是否审核通过?" width="200" confirm-button-text="通过" cancel-button-text="驳回"
|
||||||
@cancel="checkHandle(scope.row, 2)" @confirm="checkHandle(scope.row, 1)">
|
@cancel="checkHandle(scope.row, 2)" @confirm="checkHandle(scope.row, 1)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
@@ -90,7 +92,7 @@ import { typeNames } from '@/utils/index.js'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { dayjs } from 'element-plus'
|
import { dayjs } from 'element-plus'
|
||||||
import hooks from '@/hooks'
|
import hooks from '@/hooks'
|
||||||
|
import _hook from "@/hooks/index.js";
|
||||||
// 显示进度dialog
|
// 显示进度dialog
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
// 当前表格索引
|
// 当前表格索引
|
||||||
@@ -106,7 +108,6 @@ const statusEmun = ref({
|
|||||||
"2": '提现失败',
|
"2": '提现失败',
|
||||||
"3": '审核中'
|
"3": '审核中'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 查看当前进度
|
// 查看当前进度
|
||||||
function showCheckModle(row, cashStatus) {
|
function showCheckModle(row, cashStatus) {
|
||||||
show.value = true
|
show.value = true
|
||||||
@@ -120,13 +121,18 @@ function showCheckModle(row, cashStatus) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 本地数据
|
||||||
|
const userInfo = reactive(
|
||||||
|
_hook.useLocalStorage.get("userInfo").is_admin
|
||||||
|
)
|
||||||
|
|
||||||
// 审核操作
|
// 审核操作
|
||||||
async function checkHandle(row, status) {
|
async function checkHandle(row, status) {
|
||||||
|
console.log(row, status)
|
||||||
try {
|
try {
|
||||||
await modifyOutFlow({
|
await modifyOutFlow({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
status: status
|
type: status
|
||||||
})
|
})
|
||||||
ElMessage.success('提交成功')
|
ElMessage.success('提交成功')
|
||||||
paginationChange()
|
paginationChange()
|
||||||
@@ -161,36 +167,33 @@ function paginationChange() {
|
|||||||
async function getOutFlowHandle() {
|
async function getOutFlowHandle() {
|
||||||
try {
|
try {
|
||||||
const res = await getOutFlow({
|
const res = await getOutFlow({
|
||||||
userName: tableOptions.userName,
|
page: tableOptions.pageNum
|
||||||
merchantCode: tableOptions.merchantCode,
|
|
||||||
status: tableOptions.status,
|
|
||||||
pageNum: tableOptions.pageNum,
|
|
||||||
pageSize: tableOptions.pageSize
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const userInfo = hooks.useLocalStorage.get('userInfo')
|
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) {
|
// for (let item of data) {
|
||||||
item.show = false;
|
// item.show = false;
|
||||||
const arr = JSON.parse(item.cashStatus);
|
// const arr = JSON.parse(item.cashStatus);
|
||||||
// console.log(arr);
|
// // console.log(arr);
|
||||||
for (let child of arr) {
|
// for (let child of arr) {
|
||||||
if (child.userType == userInfo.userType && child.status == 0) {
|
// if (child.userType == userInfo.userType && child.status == 0) {
|
||||||
item.show = true;
|
// item.show = true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
tableOptions.loading = false
|
tableOptions.loading = false
|
||||||
tableOptions.list = data
|
tableOptions.list = data
|
||||||
tableOptions.total = res.total
|
tableOptions.total = res.count
|
||||||
} catch (error) { }
|
} catch (error) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
getOutFlowHandle()
|
getOutFlowHandle()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user