Browse Source

金豆审核scope.row

zhangrenyuan/feature-20251104133449-现金管理二期
lihuilin 3 weeks ago
parent
commit
92a4852f4b
  1. 20
      .env.development
  2. 52
      src/components/MoneyManage/CurrencySelect.vue
  3. 33
      src/router/index.js
  4. 2
      src/utils/menuTreePermission.js
  5. 7
      src/utils/menuUtils.js
  6. 11
      src/views/audit/bean/beanAudit.vue
  7. 4
      src/views/audit/gold/rechargeAudit.vue
  8. 4
      src/views/audit/gold/refundAudit.vue
  9. 676
      src/views/channelManage/cart/cart.vue
  10. 657
      src/views/channelManage/fans/fans.vue
  11. 700
      src/views/channelManage/reward/reward.vue
  12. 6
      src/views/consume/bean/articleVideo.vue
  13. 4
      src/views/consume/bean/dieHardFan.vue
  14. 4
      src/views/consume/bean/liveStream.vue
  15. 4
      src/views/consume/gold/coinConsumeDetail.vue
  16. 6
      src/views/history/newHistory.vue
  17. 6
      src/views/history/oldHistory.vue
  18. 1219
      src/views/moneyManage/executor/executor.vue
  19. 4
      src/views/moneyManage/receiveDetail/receiveDetail1.vue
  20. 781
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  21. 3
      src/views/moneyManage/receiveDetail/receiveHead.vue
  22. 1163
      src/views/moneyManage/receiveDetail/receiveManage.vue
  23. 46
      src/views/moneyManage/receiveDetail/receiveService.vue
  24. 11
      src/views/moneyManage/receiveDetail/utils/recriveFormRules.js
  25. 2
      src/views/moneyManage/receiveDetail/utils/staticData.js
  26. 13
      src/views/moneyManage/receiveDetail/utils/util.js
  27. 4
      src/views/moneyManage/refundDetail/refundCharge.vue
  28. 2
      src/views/moneyManage/refundDetail/refundFinance.vue
  29. 3
      src/views/moneyManage/refundDetail/refundHeader.vue
  30. 2
      src/views/moneyManage/refundDetail/refundService.vue
  31. 63
      src/views/permissions/rolePermission.vue
  32. 5
      src/views/permissions/userPermission.vue
  33. 4
      src/views/recharge/bean/beanOnlineRecharge.vue
  34. 4
      src/views/recharge/bean/beanSystemRecharge.vue
  35. 4
      src/views/recharge/gold/coinRechargeDetail.vue
  36. 4
      src/views/refund/gold/coinRefundDetail.vue
  37. 2
      src/views/usergold/bean/userbean.vue
  38. 6
      src/views/usergold/gold/clientCountBalance.vue
  39. 4
      src/views/usergold/gold/clientCountDetail.vue

20
.env.development

@ -0,0 +1,20 @@
VITE_API_BASE='https://hwjb.homilychart.com/dev/admin'
# 测试环境
# VITE_API_BASE='http://54.255.212.181:10704/'
# 正式环境
# VITE_API_BASE='http://54.255.212.181:10705/'
VITE_UPLOAD_URL=http://39.101.133.168:8828/hljw/api/aws/upload
# VITE_API_BASE='http://192.168.9.28:8081/'
# sunjiabei
# VITE_API_BASE='http://192.168.9.28:8081/'
# VITE_API_BASE='http://192.168.5.92:8081/'
# 张勇
# VITE_API_BASE='http://192.168.3.83:8081/'
# 本地
# VITE_API_BASE='http://localhost:8081/'
# 孙加倍
# VITE_API_BASE='http://192.168.40.12:8081'
# Lijianlin
# VITE_API_BASE='http://192.168.9.41:8081/'
# VITE_API_BASE='http://localhost:8081/'

52
src/components/MoneyManage/CurrencySelect.vue

@ -124,7 +124,7 @@ watch(() => props.modelValue, (newVal) => {
//
.dropdown {
position: relative;
width: 268px;
width: 100%;
font-family: 'Arial', sans-serif;
}
@ -154,30 +154,32 @@ watch(() => props.modelValue, (newVal) => {
width: 100%;
height: 100%;
position: sticky;
}
//
.search-input {
width: 100%;
height: 90%;
/* 左侧留出图标空间 */
box-sizing: border-box;
border: none;
border-radius: 6px;
padding-left: 11px;
outline: none;
font-size: 14px;
transition: border-color 0.3s ease;
&::placeholder {
color: #999999;
opacity: 1;
font-style: normal;
font-weight: 350;
line-height: 22px;
//
.search-input {
width: 100%;
height: 90%;
/* 左侧留出图标空间 */
box-sizing: border-box;
border: none;
border-radius: 6px;
padding-left: 11px;
outline: none;
font-size: 14px;
transition: border-color 0.3s ease;
&::placeholder {
color: #999999;
opacity: 1;
font-style: normal;
font-weight: 350;
line-height: 22px;
}
}
}
.arrow {
color: #9ca3af;
}
.clear-icon {
position: absolute;
@ -211,9 +213,6 @@ watch(() => props.modelValue, (newVal) => {
display: none;
}
.arrow {
color: #9ca3af;
}
&:hover {
border-color: #d1d5db;
@ -250,7 +249,7 @@ watch(() => props.modelValue, (newVal) => {
position: absolute;
top: 100%; //
left: 0;
width: 100%;
width: 120%;
border: 1px solid #678BFF;
min-height: 50px;
max-height: 300px;
@ -313,6 +312,7 @@ watch(() => props.modelValue, (newVal) => {
border: none;
border-radius: 10px;
background-color: #fff;
box-shadow: 0 0 0 1px rgba(200, 200, 200, 0.3);
font-size: 12px;
font-style: normal;
font-weight: 700;

33
src/router/index.js

@ -296,6 +296,7 @@ const routes = [
}
]
},
// 现金管理
{
path: '/moneyManage',
name: 'moneyManage',
@ -318,7 +319,7 @@ const routes = [
{
path: 'receiveManager',
name: "receiveManager",
component: () => import("../views/moneyManage/receiveDetail/receiveManage.vue"),
component: () => import("../views/moneyManage/receiveDetail/receiveFinance.vue"),
meta: { permissionId: [67, 79] }
},
{//地区财务
@ -382,6 +383,36 @@ const routes = [
},
]
},
// 频道管理
{
path: 'channelManage',
name: 'channelManage',
meta: { permissionId: 124 },
children: [
// 打赏
{
path: 'reward',
name: "reward",
component: () => import("../views/channelManage/reward/reward.vue"),
meta: { permissionId: 125 }
},
// 铁粉
{
path: 'fans',
name: "fans",
component: () => import("../views/channelManage/fans/fans.vue"),
meta: { permissionId: 126 }
},
// 购物车
{
path: 'cart',
name: "cart",
component: () => import("../views/channelManage/cart/cart.vue"),
meta: { permissionId: 127 }
}
]
},
// 活动管理
{
path: 'activityManage',
name: "activityManage",

2
src/utils/menuTreePermission.js

@ -187,7 +187,7 @@ export const findMenuById = (menuList, targetId) => {
// 递归判断某个 menuId 是否存在
export const hasMenuPermission = (tree, targetId) => {
for (const node of tree) {
console.log(node.id)
// console.log(node.id)
if (node.id === targetId) return true;
if (node.children && hasMenuPermission(node.children, targetId)) return true;
}

7
src/utils/menuUtils.js

@ -91,8 +91,13 @@ export const getRoutePath = (menu) => {
'退款-总部财务':'/moneyManage/refundDetail/refundHeader',
'执行明细': '/moneyManage/executor',
};
'频道管理': '/channelManage',
'打赏管理': '/channelManage/reward',
'铁粉管理': '/channelManage/fans',
'小黄车管理': '/channelManage/cart',
};
// console.log('1111',menu.menuName)
// 未匹配的菜单默认使用id作为路由(可根据实际需求调整)
return routeMap[menu.menuName] || '/noPermission'

11
src/views/audit/bean/beanAudit.vue

@ -102,7 +102,7 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
<el-pagination background :current-page="pagination.pageNum" :page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="stats.num" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>
@ -173,6 +173,9 @@ const reason = ref('')
const rejectRow = ref({
id: null
})//
const passRow = ref({
id: null
})//
const popconfirmRef = ref(null)
//
@ -337,6 +340,7 @@ const showApproveDialog = (row) => {
ElMessage.error('暂无权限')
return
}
passRow.value.id = row.id
approveDialogVisible.value = true
}
@ -351,7 +355,7 @@ const handleApproveConfirm = async (row) => {
clicked.value = true
try {
const params = {
id: row.id,
id: passRow.value.id,
auditName: adminData.value.adminName
}
await API({ url: '/beanAudit/status1', data: params })
@ -472,9 +476,12 @@ const resetSearch = async function () {
auditStartTime: '',
auditEndTime: ''
}
//
pagination.value.pageNum = 1
selectedMarkets.value = []
dateRange.value = []
activeTimeRange.value = ''
await get()
await getStats()
}

4
src/views/audit/gold/rechargeAudit.vue

@ -160,7 +160,7 @@
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePagination('size', $event)"
@current-change="handlePagination('page', $event)"></el-pagination>
</div>
@ -447,6 +447,8 @@ const resetSearch = function () {
market: "",
auditStatus: rechargeAudit.value.auditStatus
}
//
getObj.value.pageNum = 1
selectedMarketPath.value = []
getTime.value = []
activeTimeRange.value = '' //

4
src/views/audit/gold/refundAudit.vue

@ -148,7 +148,7 @@
</template>
</el-table-column>
</el-table>
<el-pagination class="pagination" background v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
<el-pagination class="pagination" background :current-page="pagination.pageNum" :page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</el-card>
@ -520,6 +520,8 @@ const resetSearch = function () {
sortOrder: '',
auditStatus: auditStatus
}
//
pagination.value.pageNum = 1
dateRange.value = []
activeTimeRange.value = '' //
selectedMarketPath.value = []

676
src/views/channelManage/cart/cart.vue

@ -0,0 +1,676 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
import request from '@/util/http.js'
import API from '@/util/http.js'
import moment from 'moment'
import { ar } from 'element-plus/es/locales.mjs'
//
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
]
/*
====================工具方法==============================
*/
//
const formatTime = (val) => val ? dayjs(val).format('YYYY-MM-DD HH:mm:ss') : ''
/*
====================数据=================================
*/
//
const adminData = ref({})
//
const tableData = ref([])
// articleVideo
const beanConsumeArticle = ref({
jwcode: null,
dept: "",
type: "",
payMode: "",
articleId: "",
articleName: "",
author: "",
startTime: '',
endTime: '',
})
//
const channels = ref([])
//
const consumeTypes = ref([
{ label: '打赏', value: 9 },
{ label: '打赏', value: 10 },
{ label: '付费购买', value: 11 },
])
// payMode
const handlePayModeChange = (value) => {
beanConsumeArticle.value.payMode = value;
//
ConsumeSelectBy();
}
//------------------------
//
const activeTimeRange = ref('')
//
const handleDatePickerChange = () => {
activeTimeRange.value = ''
}
//
const getObj = ref({
pageNum: 1,
pageSize: 50
})
//
const total = ref(100)
//
const getTime = ref({
startTime: '',
endTime: ''
})
//
const dept = ref([])
//
const getDept = async function () {
try {
//
const result = await request({
// url: '/general/dept',
url: '/beanConsume/getDept', // todo
data: { account: adminData.value.account }
})
console.log('请求地区列表成功', result)
//
dept.value = result.data
console.log('地区数据', dept.value)
} catch (error) {
console.log('请求地区列表失败', error)
ElMessage({
type: 'error',
message: '获取地区列表失败,请稍后重试'
})
}
}
// //
// const filterChannel = (query) => {
// if (query) {
// return channels.value.filter(item => item.toLowerCase().includes(query.toLowerCase()));
// }
// return channels.value;
// };
//
const sortField = ref('')
const sortOrder = ref('')
//
const permanentBean = ref(0)
const freeBean = ref(0)
const totalNum = ref(0)
/*
====================方法=================================
*/
//
const getAdminData = async function () {
try {
const result = await request({
url: '/admin/userinfo',
data: {}
})
adminData.value = result
console.log('请求成功', result)
console.log('用户信息', adminData.value)
} catch (error) {
console.log('请求失败', error)
}
}
const ConsumeSelectBy = async function (val) {
try {
//
if (typeof val === 'number') {
getObj.value.pageNum = val
}
//
if (getTime.value != null) {
if (getTime.value.startTime != '' && getTime.value.endTime != '') {
beanConsumeArticle.value.startTime = formatTime(getTime.value[0])
beanConsumeArticle.value.endTime = formatTime(getTime.value[1])
}
} else {
beanConsumeArticle.value.startTime = ''
beanConsumeArticle.value.endTime = ''
}
beanConsumeArticle.value.sortField = sortField.value
beanConsumeArticle.value.sortOrder = sortOrder.value
console.log('搜索参数_时间', beanConsumeArticle.value.startTime)
console.log('搜索参数1', getObj.value)
console.log('搜索参数2', beanConsumeArticle.value)
// POST
const result = await request({
url: '/beanConsume/selectArticleBy',
data: {
pageNum: getObj.value.pageNum,
pageSize: getObj.value.pageSize,
beanConsumeArticle: {
...beanConsumeArticle.value,
jwcode: beanConsumeArticle.value.jwcode,
dept: beanConsumeArticle.value.dept,
payMode: beanConsumeArticle.value.payMode,
articleId: beanConsumeArticle.value.articleId,
articleName: beanConsumeArticle.value.articleName,
author: beanConsumeArticle.value.author,
startTime: beanConsumeArticle.value.startTime,
endTime: beanConsumeArticle.value.endTime,
sortField: beanConsumeArticle.value.sortField,
sortOrder: beanConsumeArticle.value.sortOrder,
}
}
})
console.log('请求成功4', sortField)
console.log('接口响应结果', result); //
if (result.code === 200 && result.data && result.data.list) {
// type payMode
const filteredList = result.data.list.filter(item => {
if (beanConsumeArticle.value.payMode === '0') {
return [9, 10].includes(Number(item.type));
} else if (beanConsumeArticle.value.payMode === '1') {
return Number(item.type) === 11;
}
return true;
});
tableData.value = filteredList;
}
//
// beanConsumeArticle.value payType 8
const sumConsumeParams = {
payType: 8, // payType 8
beanConsumeArticle: {
...beanConsumeArticle.value,
}
};
// POST
const resultTotalGold = await request({
url: '/beanConsume/sumConsumeGold',
data: sumConsumeParams
});
console.log("总计", resultTotalGold);
const data = resultTotalGold.data || resultTotalGold;
console.log('请求成功3', resultTotalGold.data)
console.log('permanentBean3', data.permanentBean)
// permanentBeanfreeBeantotalNum
permanentBean.value = Number(data.permanentBean) || 0;
freeBean.value = Number(data.freeBean) || 0;
totalNum.value = Number(data.totalNum) || 0;
//
total.value = result.data.total
console.log('total', total.value)
} catch (error) {
console.log('请求失败', error)
}
}
//
const search = function () {
getObj.value.pageNum = 1
if (beanConsumeArticle.value.jwcode) {
const numRef = /^\d{1,9}$/;
if (!numRef.test(beanConsumeArticle.value.jwcode)) {
ElMessage.error('请检查精网号格式')
return
}
}
if (beanConsumeArticle.value.articleId) {
const numRef = /^\d{1,9}$/;
if (!numRef.test(beanConsumeArticle.value.articleId)) {
ElMessage.error('请检查文章ID格式')
return
}
}
ConsumeSelectBy()
}
//
const reset = function () {
console.log('文章/视频的重置')
beanConsumeArticle.value.jwcode = null
beanConsumeArticle.value.dept = ''
beanConsumeArticle.value.type = ''
beanConsumeArticle.value.payMode = ''
beanConsumeArticle.value.articleId = ''
beanConsumeArticle.value.articleName = ''
beanConsumeArticle.value.author = ''
beanConsumeArticle.value.startTime = ''
beanConsumeArticle.value.endTime = ''
sortField.value = ''
sortOrder.value = ''
getTime.value = {}
activeTimeRange.value = '' //
//
ConsumeSelectBy()
console.log(' beanConsumeArticle', beanConsumeArticle.value)
}
//
const getToday = function () {
const today = dayjs()
const startTime = today.startOf('day').format('YYYY-MM-DD HH:mm:ss')
const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
getTime.value = [startTime, endTime]
console.log('getTime', getTime.value)
activeTimeRange.value = 'today' //
ConsumeSelectBy()
}
//
const getYesterday = function () {
const today = dayjs()
const startTime = today.subtract(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
const endTime = today.subtract(1, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss')
getTime.value = [startTime, endTime]
console.log('getTime', getTime.value)
activeTimeRange.value = 'yesterday' //
ConsumeSelectBy()
}
// 7
const get7Days = function () {
const today = dayjs()
const startTime = today.subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
getTime.value = [startTime, endTime]
console.log('getTime', getTime.value)
activeTimeRange.value = '7days' //
ConsumeSelectBy()
}
//
const handleSortChange = (column) => {
console.log('排序字段:', column.prop)
console.log('排序方式:', column.order)
if (column.prop === 'beanNum') {
sortField.value = 'beanNum'
} else if (column.prop === 'consumeTime') {
sortField.value = 'consumeTime'
} else if (column.prop === 'buyBean') {
sortField.value = 'buyBean'
} else if (column.prop === 'freeBean') {
sortField.value = 'freeBean'
}
sortOrder.value = column.order === 'ascending' ? 'DESC' : 'ASC'
ConsumeSelectBy()
}
const handlePageSizeChange = function (val) {
getObj.value.pageSize = val
ConsumeSelectBy()
}
const handleCurrentChange = function (val) {
getObj.value.pageNum = val
ConsumeSelectBy()
}
/*
====================计算属性=================================
*/
//
// const totalBean = computed(() => permanentBean.value + freeBean.value)
/*
====================监听=================================
*/
/*
====================挂载=================================
*/
const format3 = (num) => {
//
return num.toLocaleString('en-US')
}
onMounted(async function () {
await getAdminData()
await ConsumeSelectBy()
await getDept()
})
const exportExcel = async function () {
const params = { //
...getObj.value,
"beanConsumeArticle": {
...beanConsumeArticle.value,
sortField: sortField.value,
sortOrder: sortOrder.value,
},
}
const res = await API({ url: '/export/exportArticle', data: params })
if (res.code === 200) {
ElMessage.success('导出成功')
}
}
const exportListVisible = ref(false)
//
const openExportList = () => {
getExportList()
exportListVisible.value = true
}
//
const exportList = ref([])
//
const exportListLoading = ref(false)
//
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
if (result.code === 200) {
const filteredData = result.data.filter(item => {
return item.type === 8; //4 // todo type 8/
});
exportList.value = filteredData
} else {
ElMessage.error(result.msg || '获取导出列表失败')
}
} catch (error) {
console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
} finally {
exportListLoading.value = false
}
}
//
const downloadExportFile = (item) => {
if (item.state === 2) {
const link = document.createElement('a')
link.href = item.url
link.download = item.fileName
link.click()
} else {
ElMessage.warning('文件还在导出中,请稍后再试')
}
}
//
const getTagType = (state) => {
switch (state) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
case 3:
return 'danger';
default:
return 'info';
}
}
//
const getTagText = (state) => {
switch (state) {
case 0:
return '待执行';
case 1:
return '执行中';
case 2:
return '执行完成';
case 3:
return '执行出错';
default:
return '未知状态';
}
}
</script>
<template>
<el-card class="card1" style="margin-bottom: 0.5vh">
<el-col style="margin-bottom: 1vh; ">
<div class="select">
<div class="selectRow">
<el-text class="text" size="large">精网号</el-text>
<el-input class="selectContent" v-model="beanConsumeArticle.jwcode" placeholder="请输入精网号" clearable />
</div>
<div class="selectRow">
<el-text class="text" size="large">所属地区</el-text>
<el-select class="selectContent" v-model="beanConsumeArticle.dept" placeholder="请选择地区" clearable>
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item" />
</el-select>
</div>
<div class="selectRow">
<el-text class="text" size="large">商品名称</el-text>
<el-select class="selectContent" style="width: 20px" v-model="beanConsumeArticle.payMode" placeholder="请选择类型"
clearable @change="handlePayModeChange">
<el-option label="打赏" value="0" />
<el-option label="付费购买" value="1" />
<el-option label="其他" value="2" />
</el-select>
</div>
<div class="selectRow">
<el-text class="text">频道名称</el-text>
<el-select class="selectContent" placeholder="请选择频道" clearable filterable>
<el-option v-for="(item, index) in channels" :key="index" :label="item" :value="item" />
</el-select>
</div>
</div>
</el-col>
<el-col>
<div class="select">
<div class="selectRow" style="width: 33vw;">
<el-text class="text" size="large">下单时间</el-text>
<el-date-picker class="selectContent" v-model="getTime" type="datetimerange" range-separator=""
start-placeholder="起始时间" end-placeholder="结束时间" style="width:25vw" @change="handleDatePickerChange"
value-format="YYYY-MM-DD HH:mm:ss" :default-time="defaultTime" />
<div v-if="false">
<el-button @click="getToday()" :type="activeTimeRange === 'today' ? 'primary' : ''"></el-button>
<el-button @click="getYesterday()" :type="activeTimeRange === 'yesterday' ? 'primary' : ''"></el-button>
<el-button @click="get7Days()" :type="activeTimeRange === '7days' ? 'primary' : ''">近7天</el-button>
</div>
</div>
<div class="selectRow">
<el-text class="text" size="large">直播间名称</el-text>
<el-input class="selectContent" placeholder="请输入直播间" clearable />
</div>
</div>
</el-col>
<el-col>
<div class="selectButton">
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" @click="exportExcel()">导出Excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</el-col>
</el-card>
<el-card class="card2">
<div class="goldStatistics">
金豆总数{{ format3(Math.abs(permanentBean + freeBean)) }}&nbsp;&nbsp;&nbsp;&nbsp;
付费金豆数{{ format3(Math.abs(permanentBean)) }}&nbsp;&nbsp;&nbsp;&nbsp;
免费金豆数{{ format3(Math.abs(freeBean)) }}
</div>
<div style="overflow-y: auto">
<el-table :data="tableData" style="width: 82vw" height="65vh" @sort-change="handleSortChange"
:row-style="{ height: '50px' }">
<el-table-column type="index" label="序号" width="110px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
</template>
</el-table-column>
<!-- 固定姓名列 -->
<el-table-column prop="name" label="姓名" width="140px" fixed="left" show-overflow-tooltip />
<!-- 固定精网号列 -->
<el-table-column prop="jwcode" label="精网号" width="140px" fixed="left" />
<el-table-column prop="dept" label="地区" width="140px" />
<el-table-column prop="type" label="商品名称" width="160px"/>
<el-table-column prop="beanNum" label="金币数量" sortable="custom" width="140px" />
<el-table-column prop="buyBean" label="频道名称" width="160px" show-overflow-tooltip />
<el-table-column prop="freeBean" label="直播间名称" width="160px" show-overflow-tooltip />
<el-table-column prop="consumeTime" label="下单时间" sortable="custom" width="180px">
<template #default="scope">
{{ formatTime(scope.row.consumeTime) }}
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="pagination">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>
</el-card>
<!-- 导出弹窗 -->
<el-dialog v-model="exportListVisible" title="导出列表" width="80%">
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" label="文件名" />
<el-table-column prop="state" label="状态">
<template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
<template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
下载
</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button text @click="exportListVisible = false">关闭</el-button>
</div>
</template>
</el-dialog>
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
}
//
.card2 {
background: #E7F4FD;
height: 78vh;
}
//
.goldStatistics {
margin-left: 1vw;
margin-bottom: 1vh;
color: #000000;
font-family: "PingFang SC";
font-size: 16px;
font-style: normal;
font-weight: 700;
line-height: 20px;
}
//
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
/* 表头 */
:deep(.el-table__header th) {
background-color: #F3FAFE !important;
}
/* 鼠标悬停 */
:deep(.el-table__row:hover > .el-table__cell) {
background-color: #E5EBFE !important;
}
.pagination {
display: flex;
margin-top: 20px;
}
/** 搜索的样式 */
.selectButton {
margin-left: 1vw;
margin-top: 1vh;
}
.select {
display: flex;
.selectRow {
width: 16vw;
display: flex;
align-items: center;
justify-content: center;
padding: 0 0.5vw;
.text {
width: 5vw;
font-size: 15px;
}
.textB {
width: 7vw;
font-size: 15px;
}
.selectContent {
flex: 1;
}
}
}
</style>

657
src/views/channelManage/fans/fans.vue

@ -0,0 +1,657 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
import request from '@/util/http.js'
import API from '@/util/http.js'
import moment from 'moment'
//
/*
====================工具方法==============================
*/
const format3 = (num) => {
//
return num.toLocaleString('en-US')
}
//
const formatTime = (val) => val ? dayjs(val).format('YYYY-MM-DD HH:mm:ss') : ''
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
]
/*
====================数据=================================
*/
//
const adminData = ref({})
//
const tableData = ref([])
// beanConsumeFan
const beanConsumeFan = ref({
jwcode: null,
dept: "",
type: "",
gift: "",
channel: "",
liveRoom: "",
startTime: '',
endTime: '',
})
//
const channels = ref([])
//
const getChannel = async function () {
try {
const result = await request({
url: '/beanConsume/getLiveChannel', // todo
data: { account: adminData.value.account }
})
console.log('请求频道列表成功', result)
//
channels.value = result.data
console.log('频道数据', channels.value)
} catch (error) {
console.log('请求频道列表失败', error)
ElMessage({
type: 'error',
message: '获取频道列表失败,请稍后重试'
})
}
}
// //
// const filterChannel = (query) => {
// if (query) {
// return channels.value.filter(item => item.toLowerCase().includes(query.toLowerCase()));
// }
// return channels.value;
// };
//
const consumeTypes = ref([
{ label: '发礼物', value: 1 },
{ label: '发红包', value: 2 },
{ label: '发福袋', value: 3 },
{ label: '付费直播', value: 4 },
{ label: '加入粉丝团', value: 5 },
{ label: '发弹幕', value: 6 },
{ label: '单次付费', value: 7 },
{ label: '连续包月', value: 8 }
])
// //
// const handleTypeChange = (value) => {
// if (value !== 1) {
// beanConsumeFan.value.gift = ''
// }
// }
//------------------------
//
const activeTimeRange = ref('')
//
const handleDatePickerChange = () => {
activeTimeRange.value = ''
}
//
const getObj = ref({
pageNum: 1,
pageSize: 50
})
//
const total = ref(100)
//
const getTime = ref({
startTime: '',
endTime: ''
})
//
// const activity = ref([])
//
const dept = ref([])
//
const sortField = ref('')
const sortOrder = ref('')
//
const permanentBean = ref(0)
const freeBean = ref(0)
const totalNum = ref(0)
/*
====================方法=================================
*/
//
const getAdminData = async function () {
try {
const result = await request({
url: '/admin/userinfo',
data: {}
})
adminData.value = result
console.log('请求成功', result)
console.log('用户信息', adminData.value)
} catch (error) {
console.log('请求失败', error)
}
}
const ConsumeSelectBy = async function (val) {
try {
//
if (typeof val === 'number') {
getObj.value.pageNum = val
}
//
if (getTime.value != null) {
if (getTime.value.startTime != '' && getTime.value.endTime != '') {
beanConsumeFan.value.startTime = formatTime(getTime.value[0])
beanConsumeFan.value.endTime = formatTime(getTime.value[1])
}
} else {
beanConsumeFan.value.startTime = ''
beanConsumeFan.value.endTime = ''
}
beanConsumeFan.value.sortField = sortField.value
beanConsumeFan.value.sortOrder = sortOrder.value
console.log('搜索参数_时间', beanConsumeFan.value.startTime)
console.log('搜索参数1', getObj.value)
console.log('搜索参数2', beanConsumeFan.value)
// POST
const result = await request({
url: '/beanConsume/selectFanBy',
data: {
pageNum: getObj.value.pageNum,
pageSize: getObj.value.pageSize,
beanConsumeFan: {
...beanConsumeFan.value,
jwcode: beanConsumeFan.value.jwcode ? String(beanConsumeFan.value.jwcode) : '',
dept: beanConsumeFan.value.dept || '',
channel: beanConsumeFan.value.channel || '',
startTime: beanConsumeFan.value.startTime || '',
endTime: beanConsumeFan.value.endTime || '',
sortField: beanConsumeFan.value.sortField || 'consumeTime',
sortOrder: beanConsumeFan.value.sortOrder || 'desc'
}
}
})
console.log('请求成功3', sortField)
console.log('接口响应结果', result);
if (result.code === 200 && result.data && result.data.list) {
tableData.value = result.data.list;
total.value = result.data.total;
}
//
// beanConsumeFan.value payType 1 7
const sumConsumeParams = {
payType: 7, // payType 7
beanConsumeFan: {
...beanConsumeFan.value,
}
};
// POST
const resultTotalGold = await request({
url: '/beanConsume/sumConsumeGold',
data: sumConsumeParams
});
console.log("总计2", resultTotalGold);
const data = resultTotalGold.data || resultTotalGold;
console.log('请求成功2', resultTotalGold.data)
console.log('permanentBean2', data.permanentBean)
// permanentBeanfreeBeantotalNum
permanentBean.value = Number(data.permanentBean) || 0;
freeBean.value = Number(data.freeBean) || 0;
totalNum.value = Number(data.totalNum) || 0;
//
total.value = result.data.total
console.log('total', total.value)
} catch (error) {
console.log('请求失败', error)
}
}
//
const search = function () {
getObj.value.pageNum = 1
if (beanConsumeFan.value.jwcode) {
const numRef = /^\d{1,9}$/;
if (!numRef.test(beanConsumeFan.value.jwcode)) {
ElMessage.error('请检查精网号格式')
return
}
}
ConsumeSelectBy()
}
//
const reset = function () {
console.log('兄弟,你点了重置')
beanConsumeFan.value.jwcode = null
beanConsumeFan.value.type = ''
beanConsumeFan.value.gift = ''
beanConsumeFan.value.channel = ''
beanConsumeFan.value.liveRoom = ''
beanConsumeFan.value.dept = ''
beanConsumeFan.value.startTime = ''
beanConsumeFan.value.endTime = ''
sortField.value = ''
sortOrder.value = ''
getTime.value = {}
activeTimeRange.value = '' //
//
ConsumeSelectBy()
console.log(' beanConsumeFan', beanConsumeFan.value)
}
//
const getToday = function () {
const today = dayjs()
const startTime = today.startOf('day').format('YYYY-MM-DD HH:mm:ss')
const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
getTime.value = [startTime, endTime]
console.log('getTime', getTime.value)
activeTimeRange.value = 'today' //
ConsumeSelectBy()
}
//
const getYesterday = function () {
const today = dayjs()
const startTime = today.subtract(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
const endTime = today.subtract(1, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss')
getTime.value = [startTime, endTime]
console.log('getTime', getTime.value)
activeTimeRange.value = 'yesterday' //
console.log('昨', getTime.value)
ConsumeSelectBy()
}
// 7
const get7Days = function () {
const today = dayjs()
const startTime = today.subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
getTime.value = [startTime, endTime]
console.log('getTime', getTime.value)
activeTimeRange.value = '7days' //
ConsumeSelectBy()
}
//
const getDept = async function () {
try {
//
const result = await request({
// url: '/general/dept',
url: '/beanConsume/getDept', // todo
data: { account: adminData.value.account }
})
console.log('请求地区列表成功', result)
//
dept.value = result.data
console.log('地区数据', dept.value)
} catch (error) {
console.log('请求地区列表失败', error)
ElMessage({
type: 'error',
message: '获取地区列表失败,请稍后重试'
})
}
}
//
const handleSortChange = (column) => {
console.log('排序字段:', column.prop)
console.log('排序方式:', column.order)
if (column.prop === 'beanNum') {
sortField.value = 'beanNum'
} else if (column.prop === 'consumeTime') {
sortField.value = 'consumeTime'
} else if (column.prop === 'buyBean') {
sortField.value = 'buyBean'
} else if (column.prop === 'freeBean') {
sortField.value = 'freeBean'
}
sortOrder.value = column.order === 'ascending' ? 'DESC' : 'ASC'
ConsumeSelectBy()
}
const handlePageSizeChange = function (val) {
getObj.value.pageSize = val
ConsumeSelectBy()
}
const handleCurrentChange = function (val) {
getObj.value.pageNum = val
ConsumeSelectBy()
}
/*
====================计算属性=================================
*/
//
// const totalBean = computed(() => permanentBean.value + freeBean.value)
/*
====================监听=================================
*/
/*
====================挂载=================================
*/
onMounted(async function () {
await getAdminData()
await ConsumeSelectBy()
await getChannel()
await getDept()
})
const exportExcel = async function () {
const params = { //
...getObj.value,
"beanConsumeFan": {
...beanConsumeFan.value,
sortField: sortField.value,
sortOrder: sortOrder.value,
},
}
const res = await API({ url: '/export/exportFan', data: params })
if (res.code === 200) {
ElMessage.success('导出成功')
}
}
const exportListVisible = ref(false)
//
const openExportList = () => {
getExportList()
exportListVisible.value = true
}
//
const exportList = ref([])
//
const exportListLoading = ref(false)
//
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
if (result.code === 200) {
const filteredData = result.data.filter(item => {
return item.type === 7; //4 // todo type 7
});
exportList.value = filteredData
} else {
ElMessage.error(result.msg || '获取导出列表失败')
}
} catch (error) {
console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
} finally {
exportListLoading.value = false
}
}
//
const downloadExportFile = (item) => {
if (item.state === 2) {
const link = document.createElement('a')
link.href = item.url
link.download = item.fileName
link.click()
} else {
ElMessage.warning('文件还在导出中,请稍后再试')
}
}
//
const getTagType = (state) => {
switch (state) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
case 3:
return 'danger';
default:
return 'info';
}
}
//
const getTagText = (state) => {
switch (state) {
case 0:
return '待执行';
case 1:
return '执行中';
case 2:
return '执行完成';
case 3:
return '执行出错';
default:
return '未知状态';
}
}
</script>
<template>
<el-card class="card1" style="margin-bottom: 0.5vh;">
<el-col style="margin-bottom: 1vh">
<div class="select">
<div class="selectRow">
<el-text class="text">精网号</el-text>
<el-input class="selectContent" v-model="beanConsumeFan.jwcode" placeholder="请输入精网号" clearable />
</div>
<div class="selectRow">
<el-text class="text">地区</el-text>
<el-select class="selectContent" v-model="beanConsumeFan.dept" placeholder="请选择地区" clearable>
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item" />
</el-select>
</div>
<div class="selectRow">
<el-text class="text">频道</el-text>
<el-select class="selectContent" v-model="beanConsumeFan.channel" placeholder="请选择频道" clearable filterable>
<el-option v-for="(item, index) in channels" :key="index" :label="item" :value="item" />
</el-select>
</div>
</div>
</el-col>
<el-col>
<div class="select">
<div class="selectRow" style="width: 36vw;">
<el-text class="text" size="large">消费时间</el-text>
<el-date-picker class="selectContent" v-model="getTime" type="datetimerange" range-separator=""
start-placeholder="起始时间" end-placeholder="结束时间" style="margin-right:1vw;width:25vw"
@change="handleDatePickerChange" value-format="YYYY-MM-DD HH:mm:ss" :default-time="defaultTime" />
<div v-if="false">
<el-button @click="getToday()" :type="activeTimeRange === 'today' ? 'primary' : ''"></el-button>
<el-button @click="getYesterday()" :type="activeTimeRange === 'yesterday' ? 'primary' : ''"></el-button>
<el-button @click="get7Days()" :type="activeTimeRange === '7days' ? 'primary' : ''">近7天</el-button>
</div>
</div>
<div class="selectRow" style="justify-content: flex-start;">
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" @click="exportExcel()">导出Excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
</el-col>
</el-card>
<el-card class="card2">
<div class="goldStatistics">
金豆总数{{ format3(Math.abs(permanentBean + freeBean)) }}&nbsp;&nbsp;&nbsp;&nbsp;
付费金豆数{{ format3(Math.abs(permanentBean)) }}&nbsp;&nbsp;&nbsp;&nbsp;
免费金豆数{{ format3(Math.abs(freeBean)) }}
</div>
<div style="overflow-y: auto">
<el-table :data="tableData" style="width: 82vw" height="68vh" @sort-change="handleSortChange"
:row-style="{ height: '50px' }">
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
</template>
</el-table-column>
<!-- 固定姓名列 -->
<el-table-column prop="name" label="姓名" width="150px" fixed="left" show-overflow-tooltip />
<!-- 固定精网号列 -->
<el-table-column prop="jwcode" label="精网号" width="110px" fixed="left" />
<el-table-column prop="dept" label="地区" width="110px" />
<el-table-column prop="beanNum" label="金豆数量" sortable="custom" width="120px" />
<el-table-column prop="buyBean" label="付费金豆数" sortable="custom" width="120px" />
<el-table-column prop="freeBean" label="免费金豆数" sortable="custom" width="120px" />
<el-table-column prop="channel" label="频道" width="190px" show-overflow-tooltip />
<el-table-column prop="type" label="会员类型" width="120px">
<template #default="scope">
{{consumeTypes.find(item => item.value === Number(scope.row.type))?.label || '未知类型'}}
</template>
</el-table-column>
<el-table-column prop="consumeTime" label="加入时间" sortable="custom" width="180px" />
</el-table>
</div>
<!-- 分页 -->
<div class="pagination">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>
</el-card>
<!-- 导出弹窗 -->
<el-dialog v-model="exportListVisible" title="导出列表" width="80%">
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" label="文件名" />
<el-table-column prop="state" label="状态">
<template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
<template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
下载
</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button text @click="exportListVisible = false">关闭</el-button>
</div>
</template>
</el-dialog>
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
}
//
.card2 {
background: #E7F4FD;
height: 81vh;
}
//
.goldStatistics {
margin-left: 1vw;
margin-bottom: 1vh;
color: #000000;
font-family: "PingFang SC";
font-size: 16px;
font-style: normal;
font-weight: 700;
line-height: 20px;
}
//
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
/* 表头 */
:deep(.el-table__header th) {
background-color: #F3FAFE !important;
}
/* 鼠标悬停 */
:deep(.el-table__row:hover > .el-table__cell) {
background-color: #E5EBFE !important;
}
.pagination {
display: flex;
margin-top: 20px;
}
/** 搜索的样式 */
.select {
display: flex;
.selectRow {
width: 17vw;
display: flex;
align-items: center;
justify-content: center;
padding: 0 0.5vw;
.text {
width: 5vw;
font-size: 15px;
}
.selectContent {
flex: 1;
}
}
}
</style>

700
src/views/channelManage/reward/reward.vue

@ -0,0 +1,700 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
import request from '@/util/http.js'
import API from '@/util/http.js'
import moment from 'moment'
//
/*
====================工具方法==============================
*/
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
]
const format3 = (num) => {
//
return num.toLocaleString('en-US')
}
//
const formatTime = (val) => val ? dayjs(val).format('YYYY-MM-DD HH:mm:ss') : ''
/*
====================数据=================================
*/
//
const adminData = ref({})
//
const tableData = ref([])
// beanConsumeLive
const beanConsumeLive = ref({
jwcode: null,
dept: "",
type: "",
gift: "",
liveChannel: "",
liveName: "",
startTime: '',
endTime: '',
sortField: '',
sortOrder: ''
})
//
const gifts = ref([])
//
const getGift = async function () {
try {
const result = await request({
url: '/beanConsume/getLiveGift', // todo
data: { account: adminData.value.account }
})
console.log('请求礼物列表成功', result)
//
gifts.value = result.data
console.log('礼物数据', gifts.value)
} catch (error) {
console.log('请求礼物列表失败', error)
ElMessage({
type: 'error',
message: '获取礼物列表失败,请稍后重试'
})
}
}
//
const channels = ref([])
//
const getChannel = async function () {
try {
const result = await request({
url: '/beanConsume/getLiveChannel', // todo
data: { account: adminData.value.account }
})
console.log('请求频道列表成功', result)
//
channels.value = result.data
console.log('频道数据', channels.value)
} catch (error) {
console.log('请求频道列表失败', error)
ElMessage({
type: 'error',
message: '获取频道列表失败,请稍后重试'
})
}
}
//
const consumeTypes = ref([
{ label: '发礼物', value: 1 },
{ label: '发红包', value: 2 },
{ label: '发福袋', value: 3 },
{ label: '付费直播', value: 4 },
{ label: '加入粉丝团', value: 5 },
{ label: '发弹幕', value: 6 }
])
//
const handleTypeChange = (value) => {
if (value !== 1) {
beanConsumeLive.value.gift = ''
}
}
//------------------------
//
const activeTimeRange = ref('')
//
const handleDatePickerChange = () => {
activeTimeRange.value = ''
}
//
const getObj = ref({
pageNum: 1,
pageSize: 50
})
//
const total = ref(100)
//
const getTime = ref({
startTime: '',
endTime: ''
})
//
const dept = ref([])
//
const getDept = async function () {
try {
//
const result = await request({
// url: '/general/dept',
url: '/beanConsume/getDept', // todo
data: { account: adminData.value.account }
})
console.log('请求地区列表成功', result)
//
dept.value = result.data
console.log('地区数据', dept.value)
} catch (error) {
console.log('请求地区列表失败', error)
ElMessage({
type: 'error',
message: '获取地区列表失败,请稍后重试'
})
}
}
//
const sortField = ref('')
const sortOrder = ref('')
//
const permanentBean = ref(0)
const freeBean = ref(0)
const totalNum = ref(0)
/*
====================方法=================================
*/
//
const getAdminData = async function () {
try {
const result = await request({
url: '/admin/userinfo',
data: {}
})
adminData.value = result
console.log('请求成功', result)
console.log('用户信息', adminData.value)
} catch (error) {
console.log('请求失败', error)
}
}
const selectLiveBy = async function (val) {
try {
//
if (typeof val === 'number') {
getObj.value.pageNum = val
}
//
//
if (Array.isArray(getTime.value) && getTime.value.length === 2) {
beanConsumeLive.value.startTime = formatTime(getTime.value[0])
beanConsumeLive.value.endTime = formatTime(getTime.value[1])
} else {
beanConsumeLive.value.startTime = ''
beanConsumeLive.value.endTime = ''
}
//
beanConsumeLive.value.sortField = sortField.value
beanConsumeLive.value.sortOrder = sortOrder.value
console.log('搜索参数_时间', beanConsumeLive.value.startTime)
console.log('搜索参数1', getObj.value)
console.log('搜索参数2', beanConsumeLive.value)
// POST
const result = await request({
url: '/beanConsume/selectLiveBy',
data: {
pageNum: getObj.value.pageNum,
pageSize: getObj.value.pageSize,
beanConsumeLive: {
...beanConsumeLive.value,
jwcode: beanConsumeLive.value.jwcode ? String(beanConsumeLive.value.jwcode) : '',
dept: beanConsumeLive.value.dept || '',
type: beanConsumeLive.value.type || '',
gift: beanConsumeLive.value.gift || '',
beanNum: beanConsumeLive.value.beanNum || '',
isBackpack: beanConsumeLive.value.isBackpack || '',
liveChannel: beanConsumeLive.value.liveChannel || '',
liveName: beanConsumeLive.value.liveName || '',
startTime: beanConsumeLive.value.startTime || '',
endTime: beanConsumeLive.value.endTime || '',
sortField: beanConsumeLive.value.sortField || 'consumeTime',
sortOrder: beanConsumeLive.value.sortOrder || 'desc'
}
}
})
console.log('请求成功2', sortField)
console.log('接口响应结果', result); //
if (result.code === 200 && result.data && result.data.list) {
tableData.value = result.data.list;
total.value = result.data.total;
}
// beanConsumeLive.value payType 1
const sumConsumeParams = {
payType: 1, // payType 1
beanConsumeLive: {
...beanConsumeLive.value,
}
};
// POST
const resultTotalGold = await request({
url: '/beanConsume/sumConsumeGold',
data: sumConsumeParams
});
console.log("总计", resultTotalGold);
const data = resultTotalGold.data || resultTotalGold;
console.log('请求成功1', resultTotalGold.data) //undifined
console.log('permanentBean1', data.permanentBean)
// permanentBeanfreeBeantotalNum
permanentBean.value = Number(data.permanentBean) || 0;
freeBean.value = Number(data.freeBean) || 0;
totalNum.value = Number(data.totalNum) || 0;
//
total.value = result.data.total
console.log('total', total.value)
} catch (error) {
console.log('请求失败', error)
}
}
//
const search = function () {
getObj.value.pageNum = 1
if (beanConsumeLive.value.jwcode) {
const numRef = /^\d{1,9}$/;
if (!numRef.test(beanConsumeLive.value.jwcode)) {
ElMessage.error('请检查精网号格式')
return
}
}
selectLiveBy()
}
//
const reset = function () {
console.log('直播的重置')
beanConsumeLive.value.jwcode = null
beanConsumeLive.value.type = ''
beanConsumeLive.value.gift = ''
beanConsumeLive.value.liveChannel = ''
beanConsumeLive.value.liveName = ''
beanConsumeLive.value.dept = ''
beanConsumeLive.value.startTime = ''
beanConsumeLive.value.endTime = ''
sortField.value = ''
sortOrder.value = ''
getTime.value = {}
activeTimeRange.value = '' //
//
selectLiveBy()
console.log(' beanConsumeLive', beanConsumeLive.value)
}
//
const getToday = function () {
const today = dayjs()
const startTime = today.startOf('day').format('YYYY-MM-DD HH:mm:ss')
const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
getTime.value = [startTime, endTime]
console.log('getTime', getTime.value)
activeTimeRange.value = 'today' //
selectLiveBy()
}
//
const getYesterday = function () {
const today = dayjs()
const startTime = today.subtract(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
const endTime = today.subtract(1, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss')
getTime.value = [startTime, endTime]
console.log('getTime', getTime.value)
activeTimeRange.value = 'yesterday' //
selectLiveBy()
}
// 7
const get7Days = function () {
const today = dayjs()
const startTime = today.subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss')
getTime.value = [startTime, endTime]
console.log('getTime', getTime.value)
activeTimeRange.value = '7days' //
selectLiveBy()
}
//
const handleSortChange = (column) => {
console.log('排序字段:', column.prop)
console.log('排序方式:', column.order)
if (column.prop === 'beanNum') {
sortField.value = 'beanNum'
} else if (column.prop === 'consumeTime') {
sortField.value = 'consumeTime'
} else if (column.prop === 'buyBean') {
sortField.value = 'buyBean'
} else if (column.prop === 'freeBean') {
sortField.value = 'freeBean'
}
sortOrder.value = column.order === 'ascending' ? 'DESC' : 'ASC'
selectLiveBy()
}
const handlePageSizeChange = function (val) {
getObj.value.pageSize = val
selectLiveBy()
}
const handleCurrentChange = function (val) {
getObj.value.pageNum = val
selectLiveBy()
}
/*
====================计算属性=================================
*/
//
// const totalBean = computed(() => permanentBean.value + freeBean.value)
/*
====================监听=================================
*/
/*
====================挂载=================================
*/
onMounted(async function () {
await getAdminData()
await selectLiveBy()
await getDept()
await getGift()
await getChannel()
})
const exportExcel = async function () {
console.log('1')
const params = {
...getObj.value,
"beanConsumeLive": {
...beanConsumeLive.value,
jwcode: beanConsumeLive.value.jwcode ? String(beanConsumeLive.value.jwcode) : '',
dept: beanConsumeLive.value.dept || '',
type: beanConsumeLive.value.type || '',
gift: beanConsumeLive.value.gift || '',
liveChannel: beanConsumeLive.value.liveChannel || '',
liveName: beanConsumeLive.value.liveName || '',
startTime: beanConsumeLive.value.startTime || '',
endTime: beanConsumeLive.value.endTime || '',
sortField: sortField.value || 'consumeTime',
sortOrder: sortOrder.value || 'desc'
}
}
// 便
console.log('导出请求参数:', params);
try {
console.log('2')
const res = await API({ url: '/export/exportLive', data: params });
console.log('导出请求响应:', res);
if (res.code === 200) {
ElMessage.success('导出成功');
} else {
ElMessage.error(res.message || '导出失败,请稍后重试');
}
} catch (error) {
console.error('导出请求出错:', error);
ElMessage.error('导出失败,请稍后重试');
}
}
const exportListVisible = ref(false)
//
const openExportList = () => {
getExportList()
exportListVisible.value = true
}
//
const exportList = ref([])
//
const exportListLoading = ref(false)
//
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
if (result.code === 200) {
const filteredData = result.data.filter(item => {
return item.type === 6; //4 // todo type 6
});
exportList.value = filteredData
} else {
ElMessage.error(result.msg || '获取导出列表失败')
}
} catch (error) {
console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
} finally {
exportListLoading.value = false
}
}
//
const downloadExportFile = (item) => {
if (item.state === 2) {
const link = document.createElement('a')
link.href = item.url
link.download = item.fileName
link.click()
} else {
ElMessage.warning('文件还在导出中,请稍后再试')
}
}
//
const getTagType = (state) => {
switch (state) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
case 3:
return 'danger';
default:
return 'info';
}
}
//
const getTagText = (state) => {
switch (state) {
case 0:
return '待执行';
case 1:
return '执行中';
case 2:
return '执行完成';
case 3:
return '执行出错';
default:
return '未知状态';
}
}
</script>
<template>
<el-card class="card1" style="margin-bottom: 0.5vh;">
<el-col style="margin-bottom: 1vh">
<div class="select">
<div class="selectRow">
<el-text class="text">精网号</el-text>
<el-input class="selectContent" v-model="beanConsumeLive.jwcode" placeholder="请输入精网号" clearable />
</div>
<div class="selectRow">
<el-text class="text">地区</el-text>
<el-select class="selectContent" v-model="beanConsumeLive.dept" placeholder="请选择地区" clearable>
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item" />
</el-select>
</div>
<div class="selectRow" style="width: 14vw;">
<el-text class="text">礼物名称</el-text>
<el-select class="selectContent" v-model="beanConsumeLive.gift" placeholder="请选择礼物名称" clearable filterable
allow-create default-first-option>
<el-option v-for="(item, index) in gifts" :key="index" :label="item" :value="item" />
</el-select>
</div>
<div class="selectRow" style="width: 12vw;">
<el-text class="textB" size="large">频道</el-text>
<el-select class="selectContent" v-model="beanConsumeLive.liveChannel" placeholder="请选择频道" clearable
filterable allow-create default-first-option>
<el-option v-for="(item, index) in channels" :key="index" :label="item" :value="item" />
</el-select>
</div>
<div class="selectRow" style="width: 12vw;">
<el-text class="textB" size="large">直播间</el-text>
<el-input class="selectContent" v-model="beanConsumeLive.liveName" placeholder="请输入直播间" clearable />
</div>
</div>
</el-col>
<el-col>
<div class="select">
<div class="selectRow" style="width: 31.4vw;">
<el-text class="text">消费时间</el-text>
<el-date-picker class="selectContent" v-model="getTime" type="datetimerange" range-separator=""
start-placeholder="起始时间" end-placeholder="结束时间" style="margin-right:1vw;width:480px"
@change="handleDatePickerChange" :default-time="defaultTime" />
<div v-if="false">
<el-button @click="getToday()" :type="activeTimeRange === 'today' ? 'primary' : ''"> </el-button>
<el-button @click="getYesterday()" :type="activeTimeRange === 'yesterday' ? 'primary' : ''"> </el-button>
<el-button @click="get7Days()" :type="activeTimeRange === '7days' ? 'primary' : ''"> 近7天</el-button>
</div>
</div>
<div class="selectRow" style="justify-content: flex-start;">
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" @click="exportExcel()">导出excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
</el-col>
</el-card>
<el-card class="card2">
<div class="goldStatistics">
金豆总数{{ format3(Math.abs(permanentBean + freeBean)) }}&nbsp;&nbsp;&nbsp;&nbsp;
付费金豆数{{ format3(Math.abs(permanentBean)) }}&nbsp;&nbsp;&nbsp;&nbsp;
免费金豆数{{ format3(Math.abs(freeBean)) }}
</div>
<div style="overflow-y: auto">
<el-table :data="tableData" style="width: 82vw" height="68vh" @sort-change="handleSortChange"
:row-style="{ height: '50px' }">
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
</template>
</el-table-column>
<!-- 固定姓名列 -->
<el-table-column prop="name" label="姓名" width="150px" fixed="left" show-overflow-tooltip />
<!-- 固定精网号列 -->
<el-table-column prop="jwcode" label="精网号" width="110px" fixed="left" />
<el-table-column prop="dept" label="地区" width="110px" />
<el-table-column prop="gift" label="礼物" width="140px">
</el-table-column>
<el-table-column prop="beanNum" label="金豆数量" sortable="custom" width="120px" />
<el-table-column prop="isBackpack" label="背包礼物" width="120px">
<template #default="scope">
{{ scope.row.isBackpack == 1 ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column prop="buyBean" label="付费金豆数" sortable="custom" width="120px" />
<el-table-column prop="freeBean" label="免费金豆数" sortable="custom" width="120px" />
<el-table-column prop="liveChannel" label="频道" width="120px" show-overflow-tooltip />
<el-table-column prop="liveName" label="直播间名称" width="160px" show-overflow-tooltip />
<el-table-column prop="consumeTime" label="消费时间" sortable="custom" width="180px" />
</el-table>
</div>
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]" style="margin-top: 20px;"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</el-card>
<!-- 导出弹窗 -->
<el-dialog v-model="exportListVisible" title="导出列表" width="80%">
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" label="文件名" />
<el-table-column prop="state" label="状态">
<template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间">
<template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
下载
</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button text @click="exportListVisible = false">关闭</el-button>
</div>
</template>
</el-dialog>
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
}
//
.card2 {
background: #E7F4FD;
height: 81vh;
}
//
.goldStatistics {
margin-left: 1vw;
margin-bottom: 1vh;
color: #000000;
font-family: "PingFang SC";
font-size: 16px;
font-style: normal;
font-weight: 700;
line-height: 20px;
}
//
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
/* 表头 */
:deep(.el-table__header th) {
background-color: #F3FAFE !important;
}
/* 鼠标悬停 */
:deep(.el-table__row:hover > .el-table__cell) {
background-color: #E5EBFE !important;
}
.pagination {
display: flex;
margin-top: 20px;
}
/** 搜索的样式 */
.select {
display: flex;
.selectRow {
width: 14.7vw;
display: flex;
align-items: center;
justify-content: center;
padding: 0 0.5vw;
.text {
width: 5vw;
font-size: 15px;
}
.selectContent {
flex: 1;
}
}
}
</style>

6
src/views/consume/bean/articleVideo.vue

@ -276,6 +276,10 @@ const reset = function () {
getTime.value = {}
activeTimeRange.value = '' //
//
getObj.value.pageNum = 1
console.log('重置页码=======', getObj.value.pageNum)
//
ConsumeSelectBy()
@ -569,7 +573,7 @@ const getTagText = (state) => {
<!-- 分页 -->
<div class="pagination">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>

4
src/views/consume/bean/dieHardFan.vue

@ -262,6 +262,8 @@ const reset = function () {
getTime.value = {}
activeTimeRange.value = '' //
//
getObj.value.pageNum = 1
//
ConsumeSelectBy()
@ -545,7 +547,7 @@ const getTagText = (state) => {
<!-- 分页 -->
<div class="pagination">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>

4
src/views/consume/bean/liveStream.vue

@ -296,6 +296,8 @@ const reset = function () {
getTime.value = {}
activeTimeRange.value = '' //
//
getObj.value.pageNum = 1
//
selectLiveBy()
@ -590,7 +592,7 @@ const getTagText = (state) => {
<el-table-column prop="consumeTime" label="消费时间" sortable="custom" width="180px" />
</el-table>
</div>
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]" style="margin-top: 20px;"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]" style="margin-top: 20px;"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</el-card>

4
src/views/consume/gold/coinConsumeDetail.vue

@ -334,6 +334,8 @@ const reset = function () {
activeTimeRange.value = '' //
selectedMarketPath.value = []
//
getObj.value.pageNum = 1
//
ConsumeSelectBy()
@ -708,7 +710,7 @@ const getMarket = async function () {
<!-- 分页 -->
<div class="pagination">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>

6
src/views/history/newHistory.vue

@ -34,8 +34,8 @@
<el-table-column prop="createTime" label="更新时间" width="200" header-align="center" align="center" />
<el-table-column prop="remark" label="备注" show-overflow-tooltip width="200" align="center" />
</el-table>
<el-pagination background style="margin-top:20px" v-model:current-page="pagination.pageNum"
v-model:page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper"
<el-pagination background style="margin-top:20px" :current-page="pagination.pageNum"
:page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</el-card>
@ -108,6 +108,8 @@ const resetSearch = function () {
name: '',
jwcode: ''
}
//
pagination.value.pageNum = 1
dateRange.value = []
}
const handlePageSizeChange = function (val) {

6
src/views/history/oldHistory.vue

@ -31,8 +31,8 @@
<el-table-column prop="createTime" label="更新时间" width="200" header-align="center" align="center" />
<el-table-column prop="remark" label="备注" show-overflow-tooltip width="200" align="center" />
</el-table>
<el-pagination background style="margin-top:20px" v-model:current-page="pagination.pageNum"
v-model:page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper"
<el-pagination background style="margin-top:20px" :current-page="pagination.pageNum"
:page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</el-card>
@ -106,6 +106,8 @@ const resetSearch = function () {
name: '',
jwcode: ''
}
//
pagination.value.pageNum = 1
dateRange.value = []
}
const handlePageSizeChange = function (val) {

1219
src/views/moneyManage/executor/executor.vue
File diff suppressed because it is too large
View File

4
src/views/moneyManage/receiveDetail/receiveDetail1.vue

@ -251,7 +251,7 @@
</el-table>
</div>
<div class="pagination">
<el-pagination background :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total"
@size-change="handlePagination('size', $event)"
@current-change="handlePagination('page', $event)"></el-pagination>
@ -719,6 +719,8 @@ const search = () => {
const reset = () => {
searchData.value = {}
getTime.value = []
//
pageInfo.value.pageNum = 1
getlist()
}
//

781
src/views/moneyManage/receiveDetail/receiveFinance.vue

@ -190,8 +190,7 @@
</template>
</el-table-column>
<!-- 地区财务表格操作待审核审核已通过编辑 -->
<el-table-column fixed="right" label="操作" width="120px"
v-if="activeTab != 'reject' && activeTab != 'done'">
<el-table-column fixed="right" label="操作" width="120px" v-if="activeTab != 'reject'">
<template #default=scope>
<el-link v-if="activeTab == 'wait'" style="color: #2741DE;"
@click="openAuditForm(scope.row)">审核
@ -200,18 +199,37 @@
v-else-if="activeTab == 'pass' && !(scope.row.status == 6 || scope.row.status == 4)"
style="color: #2741DE;" @click="openEditForm(scope.row)">编辑
</el-link>
<el-link
v-else-if="activeTab == 'done' && scope.row.status == 4 && startsWith(scope.row.orderCode, 'GOLDCOIN')"
style="color: #2741DE;" @click="openRefundConfirm(scope.row)">退款
</el-link>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination">
<el-pagination background :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total"
@size-change="handlePagination('size', $event)"
<el-pagination background :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize"
:page-sizes="[5, 10, 20, 50, 100]" layout="total, sizes, prev, pager, next, jumper"
:total="total" @size-change="handlePagination('size', $event)"
@current-change="handlePagination('page', $event)"></el-pagination>
</div>
</el-card>
</div>
<!-- 退款确认弹窗 -->
<div class="recallDialog" v-show="refundConfirmDialog">
<div class="close">
<button @click="closeConfirmRefund" class="Btn">关闭</button>
</div>
<div class="text">
<text class="txt">{{ textContent }}</text>
</div>
<div class="cancle">
<button @click="closeConfirmRefund" class="Btn">取消</button>
</div>
<div class="confirm">
<button @click="openRefundDialog" class="Btn">确定</button>
</div>
</div>
<!-- 仅保留地区财务相关弹窗审核弹窗编辑手续费弹窗 -->
<!-- 审核弹窗 -->
@ -406,6 +424,108 @@
</div>
</div>
</el-dialog>
<!-- 新增退款 -->
<el-dialog v-model="refundDialog" title="退款" class="refundDialog" overflow draggable style="width: 40vw;"
:before-close="closeRefundForm">
<div style="display: flex;">
<div class="left">
<div class="add-item">
<el-text style="width:4vw;">精网号</el-text>
<el-input v-model="refundFormData.jwcode" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">客户姓名</el-text>
<el-input v-model="refundFormData.name" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">所属地区</el-text>
<el-input v-model="refundFormData.marketName" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">活动名称</el-text>
<el-input v-model="refundFormData.activity" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">产品名称</el-text>
<el-input v-model="refundFormData.goodsName" style="width:10vw;" disabled />
</div>
<div v-show="!isRefundGold" class="add-item">
<el-text style="width:4vw;">产品数量</el-text>
<el-input style="padding-right: 10px; width:10.5vw;" v-model="refundFormData.goodNum"
placeholder="请输入产品数量" disabled />
</div>
<div v-show="isRefundGold" style="display: flex; margin-bottom: 10px;">
<div style=" display: flex; align-items: center;justify-content: center; ">
<span style="color: #999999; white-space: nowrap;">永久金币</span>
<el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundFormData.permanentGold" disabled />
</div>
<div style=" display: flex; align-items: center;justify-content: center; ">
<span
style="color: #999999; white-space: nowrap;">免费金币</span>
<el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundFormData.freeGold" disabled />
</div>
</div>
<div class="add-item">
<el-text style="width:4vw;">付款币种</el-text>
<el-input v-model="refundFormData.paymentCurrency" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">付款金额</el-text>
<el-input v-model="refundFormData.paymentAmount" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">支付方式</el-text>
<el-input v-model="refundFormData.payType" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;">付款时间</el-text>
<el-date-picker v-model="refundFormData.payTime" type="datetime" style="width:10vw;" disabled />
</div>
<div class="add-item">
<el-text style="width:4vw;" size="small">转账凭证</el-text>
<el-form-item :rules="{ required: true, message: '请上传图片', trigger: 'change' }">
<el-upload ref="uploadRef" :auto-upload="false" list-type="picture-card"
:show-file-list="false">
<template #default>
<img v-if="refundFormData.voucher" :src="refundFormData.voucher"
style="width: 100%; height: 100%; object-fit: cover;">
<el-icon v-else>
<Plus />
</el-icon>
</template>
</el-upload>
</el-form-item>
</div>
<div class="add-item">
<el-text style="width:4vw;">备注</el-text>
<el-input v-model="refundFormData.remark" style="width:10vw;" :rows="2" type="textarea"
maxLength="100" disabled show-word-limit />
</div>
</div>
<div class="right">
<div class="add-item">
<el-text style="width:4vw;">退款模式</el-text>
<el-radio-group v-model="refundFormData.refundModel">
<el-radio value="0">全部退款</el-radio>
<el-radio value="1">部分退款</el-radio>
</el-radio-group>
</div>
<div class="add-item">
<el-text style="width:4vw;">退款理由</el-text>
<el-input v-model="refundFormData.refundReason" style="width:10vw;" :rows="5" maxlength="150"
show-word-limit type="textarea" />
</div>
<div>ps:请在退款理由表明用户的退款需求</div>
<div style="display:flex;justify-content: center;margin-top: 5vh;">
<el-button type="default" @click="">重置</el-button>
<el-button type="primary" @click="throttledsubmitRefund">提交</el-button>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
@ -419,6 +539,7 @@ import request from '@/util/http.js';
import moment from 'moment';
import _ from 'lodash';
import { Plus } from '@element-plus/icons-vue';
import { startsWith } from './utils/util.js'
//
import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue';
@ -474,7 +595,38 @@ const tooltipContent = ref('');
const tooltipLeft = ref(0);
const tooltipTop = ref(0);
//
// 退
const refundConfirmDialog = ref(false)
const textContent = ref('')
//退
const refundDialog = ref(false)
const refundFormData = ref({})
const openRefundDialog = () => {
refundDialog.value = true
closeConfirmRefund()
}
const closeRefundForm = () => {
refundDialog.value = false
refundFormData.value = {}
}
const isRefundGold = ref(false)
const ifRefundGold = () => {
if (refundFormData.value.goodsName === '金币充值') {
isRefundGold.value = true
refundFormData.value.goodNum = 0
} else {
isRefundGold.value = false
}
}
//
const adminData = ref({});
const activityList = ref([]);
const customOptions = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']);
@ -482,6 +634,23 @@ const paytypeList = ["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-
const paytypeOptions = ref([...paytypeList]);
// ===================== 2. =====================
//退
const openRefundConfirm = (row) => {
textContent.value = '将要对该订单退款!'
refundConfirmDialog.value = true
refundFormData.value = { ...row }
ifRefundGold()
console.log(row);
}
const closeConfirmRefund = () => {
refundConfirmDialog.value = false
textContent.value = ''
}
// 2.1
const getlist = async () => {
try {
@ -544,6 +713,54 @@ const getlist = async () => {
}
};
//退
const submitRefund = async () => {
try {
const result = await request({
url: '/Money/add',
data: {
jwcode: refundFormData.value.jwcode, //
name: refundFormData.value.name, //
market: refundFormData.value.marketName, //
activity: refundFormData.value.activity, //
bankCode: refundFormData.value.bankCode, //
goodsName: refundFormData.value.goodsName, //
goodNum: refundFormData.value.goodNum, // 0
paymentCurrency: refundFormData.value.paymentCurrency, //
paymentAmount: (refundFormData.value.paymentAmount) * 100, //
receivedCurrency: refundFormData.value.receivedCurrency, //
receivedAmount: (refundFormData.value.receivedAmount) * 100, //
handlingCharge: (refundFormData.value.handlingCharge) * 100, //
receivedMarket: refundFormData.value.receivedMarket, //
payType: refundFormData.value.payType, //
payTime: refundFormData.value.payTime, // yyyy-MM-dd HH:mm:ss
receivedTime: refundFormData.value.receivedTime, // yyyy-MM-dd HH:mm:ss
areaServise: adminData.value.adminName, //
submitterId: adminData.value.id,
voucher: refundFormData.value.voucher, // URL
remark: refundFormData.value.remark, //
refundReason: refundFormData.value.refundReason, // 退-
refundModel: refundFormData.value.refundModel, // 退0-1-
id: refundFormData.value.id, //id
orderCode: refundFormData.value.orderCode,
permanentGold: (refundFormData.value.permanentGold) * 100 || 0,
freeGold: (refundFormData.value.freeGold) * 100 || 0
}
})
if (result.code == 200) {
ElMessage.success('新增退款成功')
getlist()
closeRefundForm()
} else {
ElMessage.error(result.msg)
getlist()
}
console.log('返回参数:', result);
} catch (error) {
console.log(error);
}
}
// 2.2
const search = () => {
getlist();
@ -552,6 +769,8 @@ const search = () => {
const reset = () => {
searchData.value = {};
//
pageInfo.value.pageNum = 1;
getlist();
};
@ -821,6 +1040,9 @@ onMounted(async () => {
window.history.back();
});
}
//
const bgImg = new Image();
bgImg.src = '/src/assets/收款明细撤回背景.png';
});
// 2.10 使
@ -840,328 +1062,399 @@ const handlePagination = (type, val) => {
</script>
<style scoped lang="scss">
// /
.content {
height: 100%;
width: 80vw;
margin: 0 auto;
padding: 1vh 0;
//
.div-card1 {
.card1 {
background: #F3FAFE;
border: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
.row {
height: auto;
width: 100%;
display: flex;
align-items: center;
margin-bottom: 1vh;
min-height: 40px;
.rowItem {
display: flex;
align-items: center;
margin-right: 1.5vw;
width: auto;
el-text {
min-width: 60px;
margin-right: 0.5vw;
color: #333;
font-weight: 500;
}
.card1 {
width: 100%;
background: #F3FAFE;
el-input,
el-select,
el-cascader {
min-width: 160px;
}
}
.row {
height: 4vh;
width: 80vw;
display: flex;
min-height: 40px;
.buttons {
display: flex;
justify-content: center;
align-items: center;
margin-left: 10px;
}
.rowItem {
display: flex;
width: 15vw;
align-items: center;
justify-content: center;
margin-right: 0.5vw;
}
.buttons {
display: flex;
justify-content: center;
align-items: center;
margin-left: 10px;
}
}
}
//
.div-card2 {
margin-top: 1.5vh;
width: 100%;
margin-top: 2vh;
.card2 {
background: #F3FAFE;
border: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
//
.btns {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1vh 1vw;
border-bottom: 1px solid #E5EBFE;
background: #E7F4FD;
}
.tabs {
.btnItem {
margin-right: 0.5vw;
border-radius: 4px;
padding: 0.3vh 1vw;
font-size: 0.9vw;
.btns {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 10px;
&:hover {
opacity: 0.9;
}
}
}
.tabs {
min-width: 300px;
.btnAdd {
display: none; //
.btnItem {
margin-left: 10px;
border-radius: 5px;
}
}
}
//
.table {
margin: 1vh 1vw;
overflow: hidden;
.el-table {
border: none;
.el-table__header th {
background: #E5EBFE;
color: #2741DE;
font-weight: 500;
}
.el-table__body tr {
background: #F3FAFE;
&:hover>td {
background: #EEF3FF !important;
}
}
.table {
margin: 10px;
border-radius: 20px;
.el-table-column {
&[label="序号"],
&[label="Homily ID"],
&[label="姓名"] {
background: #F3FAFE;
z-index: 1;
}
&[label="操作"] {
el-link {
color: #2741DE;
cursor: pointer;
&:hover {
color: #1A30B9;
text-decoration: underline;
}
}
}
}
.ellipsis-container {
position: relative;
width: 100%;
//
.ellipsis-container {
.ellipsis-text {
color: #333;
cursor: pointer;
&:hover {
color: #2741DE;
}
}
.custom-tooltip {
position: fixed;
z-index: 9999;
padding: 8px 12px;
width: 200px;
background-color: #fff;
color: #333;
border: 1px solid #E5EBFE;
border-radius: 4px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
max-height: 300px;
overflow-y: auto;
font-size: 14px;
line-height: 1.5;
}
}
.ellipsis-text {
display: inline-block;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
}
}
//
.pagination {
padding: 1vh 1vw;
text-align: right;
.el-pagination {
.el-pager li {
&.active {
background: #2741DE;
color: #fff;
}
}
.custom-tooltip {
position: fixed;
z-index: 9999;
padding: 8px 12px;
width: 200px;
background-color: #E4F0FC;
color: #333333;
border: 1px solid #e5e7eb;
border-radius: 4px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
min-height: 30px;
max-height: 300px;
overflow-y: auto;
font-size: 14px;
line-height: 1.5;
}
}
}
.pagination {
margin-top: 10px;
padding: 10px 10px;
}
}
//
:deep(.adddialog) {
min-width: 500px;
background-color: #F3FAFE !important;
margin-top: 8vh;
border-radius: 8px;
.addForm {
padding: 1.5vh 2vw;
padding: 0 60px 1vh 60px;
.el-form-item {
margin-bottom: 1.5vh;
.el-date-editor {
display: flex;
flex: 1;
&:last-of-type {
margin-bottom: 0;
}
}
.el-form-item__label {
color: #333;
font-weight: 500;
min-width: 80px;
}
.pic {
display: flex;
align-items: center;
.pic {
display: flex;
align-items: center;
.uploader {
height: 80px;
width: 80px;
.uploader {
height: 80px;
width: 80px;
border: 1px dashed #DCDFE6;
.el-upload {
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.el-upload {
height: 100%;
width: 100%;
}
}
.picText {
margin-left: 1vw;
color: #999;
font-size: 12px;
}
.picText {
color: #999999;
font-family: "PingFang SC";
font-size: 10px;
font-style: normal;
font-weight: 400;
line-height: 20px;
margin-left: 10px;
}
}
}
.dialog-footer {
.dialog-footer {
display: flex;
justify-content: center;
padding-bottom: 1.5vh;
}
}
:deep(.editdialog) {
min-width: 990px;
background-color: #F3FAFE !important;
margin-top: 8vh;
border-radius: 8px;
.editForm {
padding: 0 60px 1vh 60px;
.el-date-editor {
display: flex;
justify-content: center;
gap: 1vw;
padding-top: 1.5vh;
flex: 1;
}
button {
padding: 0.5vh 1.5vw;
border-radius: 4px;
.pic {
display: flex;
align-items: center;
&:first-of-type {
background: #7E91FF;
border: none;
color: #fff;
}
.uploader {
height: 80px;
width: 80px;
&:last-of-type {
background: #2741DE;
border: none;
color: #fff;
.el-upload {
height: 100%;
width: 100%;
}
}
.picText {
color: #999999;
font-family: "PingFang SC";
font-size: 10px;
font-style: normal;
font-weight: 400;
line-height: 20px;
margin-left: 10px;
}
}
}
}
//
:deep(.editdialog) {
background-color: #F3FAFE !important;
border-radius: 8px;
width: 60vw !important;
.content {
display: flex;
gap: 2vw;
padding: 1.5vh 2vw;
height: 100%;
width: 100%;
.left {
min-width: 500px;
}
.left,
.right {
flex: 1;
}
.editForm,
.editFormRighrt {
.el-form-item {
margin-bottom: 1.5vh;
.editFormRighrt {
padding: 0 60px 0 40px;
.el-form-item__label {
color: #333;
font-weight: 500;
min-width: 80px;
.el-date-editor {
display: flex;
flex: 1;
}
}
}
.right {
.editBtns {
display: flex;
justify-content: center;
gap: 1vw;
margin-top: 2vh;
.editBtn1,
.editBtn2 {
padding: 0.5vh 1.5vw;
border-radius: 4px;
border: none;
color: #fff;
.txt {
font-size: 14px;
}
margin-top: 60px;
.txt {
color: #f3fafe;
text-align: center;
font-family: "PingFang SC";
font-size: 14px;
font-style: normal;
font-weight: 700;
line-height: 22px;
}
.editBtn1 {
min-width: 80px;
padding: 5px 12px;
justify-content: center;
align-items: center;
gap: 4px;
border-radius: 4px;
background: #7E91FF;
border: none;
box-shadow: 0 0 4px 0 #00000040;
}
.editBtn2 {
display: flex;
width: 80px;
min-width: 80px;
padding: 5px 12px;
justify-content: center;
align-items: center;
gap: 4px;
border-radius: 4px;
background: #2741DE;
border: none;
box-shadow: 0 0 4px 0 #00000040;
margin-left: 60px;
}
}
}
}
}
:deep(.adddialog .el-form-item__label) {
min-width: 80px;
width: auto;
font-weight: 800;
padding-bottom: 15px;
}
.refundDialog {
.left {
width: 50%;
height: 70vh;
min-height: 700px;
padding: 0 2vw;
.add-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.image {
width: 4vw !important;
height: 4vw !important;
}
}
.right {
width: 50%;
height: 50vh;
.add-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
}
}
//
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
//
:deep(.el-date-editor) {
width: 100%;
:deep(.el-table__header th) {
background-color: #F3FAFE !important;
}
:deep(.el-select-dropdown) {
max-height: 200px;
:deep(.el-table__row:hover > .el-table__cell) {
background-color: #E5EBFE !important;
}
:deep(.el-cascader-panel) {
max-height: 200px;
//
.reject-reason-box {
--el-message-box-height: 500px;
}
.reject-reason-box .el-message-box__content {
max-height: 350px;
overflow-y: auto;
white-space: pre-wrap;
}
.recallDialog {
//
height: 392px;
width: 700px;
background-image: url('/src/assets/收款明细撤回背景.png');
position: fixed; //
top: 50%; // 50%
left: 50%; // 50%
transform: translate(-50%, -50%); // 50%
z-index: 1000; //
.close {
position: absolute;
left: 625px;
top: 20px;
height: 38px;
width: 38px;
opacity: 0;
.Btn {
height: 100%;
width: 100%;
border-radius: 10px;
}
}
.text {
position: absolute;
left: 185px;
top: 190px;
height: 67px;
width: 500px;
.txt {
height: 100%;
width: 100%;
color: #001a42;
font-family: "PingFang SC";
font-size: 48px;
font-style: normal;
font-weight: 900;
line-height: normal;
}
}
.cancle {
position: absolute;
left: 185px;
top: 304px;
height: 55px;
width: 150px;
opacity: 0;
.Btn {
height: 100%;
width: 100%;
border-radius: 20px;
}
}
.confirm {
position: absolute;
left: 375px;
top: 304px;
height: 55px;
width: 150px;
opacity: 0;
.Btn {
height: 100%;
width: 100%;
border-radius: 20px;
}
}
}
</style>

3
src/views/moneyManage/receiveDetail/receiveHead.vue

@ -168,7 +168,7 @@
</div>
<!-- 分页组件 -->
<div class="pagination">
<el-pagination background :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total"
@size-change="handlePagination('size', $event)"
@current-change="handlePagination('page', $event)"></el-pagination>
@ -354,6 +354,7 @@ const search = () => {
const reset = () => {
searchData.value = {}
getTime.value = []
pageInfo.value.pageNum = 1
getlist()
}
const getlist = async () => {

1163
src/views/moneyManage/receiveDetail/receiveManage.vue
File diff suppressed because it is too large
View File

46
src/views/moneyManage/receiveDetail/receiveService.vue

@ -20,7 +20,6 @@
<el-option v-for="item in marketList" :key="item" :label="item" :value="item" />
</el-select>
</div>
<!-- 仅保留客服专属的订单状态筛选 -->
<div class="rowItem">
<el-text style="width: 4vw;">订单状态</el-text>
<el-select v-model="searchData.status" placeholder="请选择订单状态" style="width: 10vw;" clearable>
@ -55,7 +54,6 @@
@change="handleDatePickerChange" :default-time="defaultTime"
:disabled-date="disabledDate" />
</div>
<!-- 仅保留客服的查询重置按钮删除超级管理员相关按钮 -->
<div class="buttons">
<el-button type="primary" @click="search">查询</el-button>
<el-button type="success" @click="reset">重置</el-button>
@ -124,7 +122,6 @@
<span v-else></span>
</template>
</el-table-column>
<!-- 仅保留客服专属操作删除财务审核编辑手续费操作 -->
<el-table-column fixed="right" label="操作" width="120px">
<template #default=scope>
<el-link v-if="scope.row.status == 4" style="color: #FA5A1E;"
@ -141,9 +138,8 @@
</el-table>
</div>
<!-- 分页组件保留公共逻辑 -->
<div class="pagination">
<el-pagination background :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total"
@size-change="handlePagination('size', $event)"
@current-change="handlePagination('page', $event)"></el-pagination>
@ -151,7 +147,6 @@
</el-card>
</div>
<!-- 仅保留客服专属弹窗撤回确认退款确认新增/编辑收款退款弹窗 -->
<!-- 撤回确认弹窗 -->
<div class="recallDialog" v-show="recallDialog">
<div class="close">
@ -194,19 +189,24 @@
<el-form-item label="客户姓名" required prop="name">
<el-input disabled v-model="addFormData.name" placeholder="请输入客户姓名" />
</el-form-item>
<el-form-item label="所属地区" required prop="market">
<el-form-item label="所属地区" prop="market">
<el-input disabled v-model="addFormData.marketName" placeholder="请输入所属地区" />
</el-form-item>
<el-form-item label="活动名称" required prop="activity">
<el-input v-model="addFormData.activity" placeholder="请输入活动名称" />
<el-select v-model="addFormData.activity" placeholder="请选择活动方式" clearable>
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName"
:value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="产品名称" required @change="ifGold" prop="goodsName">
<ProductSelect ref="productSelectRef" v-model="addFormData.goodsName"></ProductSelect>
</el-form-item>
<el-form-item v-show="!isGold" label="产品数量" required prop="goodNum">
<div style="padding-right: 50px; display: flex;">
<el-input style="padding-right: 10px;" v-model="addFormData.goodNum" placeholder="请输入产品数量" />
<span style="color: #999999;">{{ productUnit }}</span>
<div style="display: flex;">
<el-input style="padding-right: 30px; flex: 3;" v-model="addFormData.goodNum"
placeholder="请输入产品数量" />
<CurrencySelect v-model="addFormData.numUnit" :items="numUnitList" style="flex: 1.5;"
placeholder="单位" @change="handleCurrencyChange" />
</div>
</el-form-item>
<div v-show="isGold" style="margin-bottom: 15px; display: flex;">
@ -235,7 +235,7 @@
@change="ifGroup">
</CurrencySelect>
</el-form-item>
<el-form-item label="到账地区" required prop="receivedMarket">
<el-form-item label="到账地区" prop="receivedMarket">
<CurrencySelect v-model="addFormData.receivedMarket" :items="MoneyAddressOptions"
:disabled="isGroup" placeholder="请选择到账地区">
</CurrencySelect>
@ -244,7 +244,7 @@
<el-date-picker type="datetime" placement="right" v-model="addFormData.payTime"
placeholder="请选择付款时间" />
</el-form-item>
<el-form-item label="转账凭证" required prop="voucher">
<el-form-item label="转账凭证" prop="voucher">
<div class="pic">
<el-upload ref="uploadRef" class="uploader" :show-file-list="false" list-type="picture-card"
:auto-upload="false" :before-upload="beforeUpload" :on-error="handelImgErr"
@ -257,7 +257,7 @@
</el-upload>
</div>
</el-form-item>
<el-form-item label="备注" required prop="remark">
<el-form-item label="备注" prop="remark">
<el-input v-model="addFormData.remark" type="textarea" :rows="4" placeholder="请输入备注" maxlength="100"
show-word-limit />
</el-form-item>
@ -402,7 +402,7 @@ import { hasMenuPermission } from '@/utils/menuTreePermission.js'
import _ from 'lodash'
//
import { addFormRule } from './utils/recriveFormRules.js'
import { productList, MarketNameForId, CurrencyForId, marketList, statusList } from './utils/staticData.js'
import { productList, MarketNameForId, CurrencyForId, marketList, statusList, numUnitList } from './utils/staticData.js'
// ===================== =====================
const adminStore = useAdminStore();
@ -433,6 +433,8 @@ const search = () => {
const reset = () => {
searchData.value = {}
getTime.value = []
//
pageInfo.value.pageNum = 1
getlist()
}
@ -514,7 +516,6 @@ const addFormData = ref({ name: '', market: '', permanentGold: 0, freeGold: 0, g
const addFormRef = ref(null) //
const addOrEdit = ref(0) // 1=2=
const isGold = ref(false) //
const productUnit = ref('个') //
const productSelectRef = ref(null) //
const uploadRef = ref(null) //
@ -525,9 +526,14 @@ const ifGold = () => {
addFormData.value.goodNum = 0
} else {
isGold.value = false
//
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", "静态信息费", "博股会员"]
productUnit.value = selectItems.includes(addFormData.value.goodsName) ? '年' : '个'
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", 'HC信息费']
if (selectItems.includes(addFormData.value.goodsName)) {
addFormData.value.numUnit = ''
} else if (addFormData.value.goodsName == '静态信息费') {
addFormData.value.numUnit = '年'
}else{
addFormData.value.numUnit = '个'
}
}
}
@ -750,8 +756,6 @@ const ifRefundGold = () => {
refundFormData.value.goodNum = 0
} else {
isRefundGold.value = false
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", "静态信息费", "博股会员"]
productUnit.value = selectItems.includes(refundFormData.value.goodsName) ? '年' : '个'
}
}

11
src/views/moneyManage/receiveDetail/utils/recriveFormRules.js

@ -9,13 +9,12 @@ export const addFormRule = {
{ required: true, message: '请输入客户姓名', trigger: 'blur' }
],
// 所属地区:必填
marketName: [
market: [
{ required: true, message: '请选择所属地区', trigger: 'blur' }
],
// 活动名称:必填 + 长度小于30
activity: [
{ required: true, message: '请输入活动名称', trigger: 'blur' },
{ max: 30, message: '活动名称长度不能超过30个字符', trigger: 'blur' }
],
// 产品名称:必填
goodsName: [
@ -81,14 +80,6 @@ export const addFormRule = {
// 付款时间:必填
payTime: [
{ required: true, message: '请选择付款时间', trigger: 'change' }
],
// 转账凭证:必填
voucher: [
{ required: true, message: '请上传转账凭证', trigger: 'change' }
],
// 备注:必填
remark: [
{ required: true, message: '请输入备注', trigger: 'blur' }
]
};

2
src/views/moneyManage/receiveDetail/utils/staticData.js

@ -257,3 +257,5 @@ export const statusList = [
value: 2
},
]
export const numUnitList = ['个', '年', '月']

13
src/views/moneyManage/receiveDetail/utils/util.js

@ -0,0 +1,13 @@
//判断是否为线上订单
export const startsWith = (mainStr, prefix) => {
// 处理前缀为空字符串的情况(空字符串是所有字符串的前缀)
if (prefix === '') {
return true;
}
// 处理主字符串长度小于前缀长度的情况
if (mainStr.length < prefix.length) {
return false;
}
// 比较主字符串开头与前缀相同长度的部分
return mainStr.substring(0, prefix.length) === prefix;
}

4
src/views/moneyManage/refundDetail/refundCharge.vue

@ -95,7 +95,7 @@
</template>
</el-table-column>
</el-table>
<el-pagination v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
<el-pagination :current-page="pagination.pageNum" :page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
@size-change="handlePageSizeChange" @current-change="handleCurrentChange"
style="margin-top: 1vh;"></el-pagination>
@ -714,6 +714,8 @@ const reset = function () {
markets: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
}

2
src/views/moneyManage/refundDetail/refundFinance.vue

@ -777,6 +777,8 @@ const reset = function () {
markets: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
}

3
src/views/moneyManage/refundDetail/refundHeader.vue

@ -610,6 +610,9 @@ const reset = function () {
markets: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
}

2
src/views/moneyManage/refundDetail/refundService.vue

@ -627,6 +627,8 @@ const reset = function () {
market: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
}

63
src/views/permissions/rolePermission.vue

@ -9,6 +9,7 @@ import { storeToRefs } from "pinia"
const adminStore = useAdminStore();
const { adminData, menuTree } = storeToRefs(adminStore);
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js"
import { tr } from 'element-plus/es/locales.mjs'
// ref
const Ref = ref(null)
@ -35,7 +36,7 @@ const addRole = ref({
market: ''
})
const addRoleMarket = ref([])
const channelList = ref(['美股', '港股', 'hc第一频道'])
const getRoleList = async function (val) {
if (!findMenuById(menuTree.value, permissionMapping.view_role_information)) {
ElMessage.error('无此权限')
@ -96,6 +97,8 @@ const searchRole = function () {
const reset = function () {
admin.value = {}
role.value.name = ''
//
getRoleObj.value.pageNum = 1
getRoleList()
}
const RoleArea = ref([])
@ -194,7 +197,8 @@ const handleAddRole = async function () {
"roleName": addRole.value.roleName,
"menuIds": finalCheckedKeys,
"fatherId": addRole.value.parentId,
"market": addRole.value.market
"market": addRole.value.market,
channel: addRole.value.channel
}
})
if (res.code === 200) {
@ -315,6 +319,7 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => {
//
if (allCheckedNodes.length === 0) {
permissionEditRoleObj.value.checkedKeys = []
ifHasChannel.value = false
return
}
@ -324,13 +329,22 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => {
console.log('编辑角色选中的权限ID:', checkedKeys)
console.log('选中的节点数量:', allCheckedNodes.length)
if (checkedKeys.includes(124) || checkedKeys.includes(125) || checkedKeys.includes(126) || checkedKeys.includes(127)) {
ifHasChannel.value = true
} else {
ifHasChannel.value = false
}
};
//
const ifHasChannel = ref(false)
const handleCheckChange = async (checkedNodes, checkedInfo) => {
const { checkedKeys, checkedNodes: allCheckedNodes } = checkedInfo
//
if (allCheckedNodes.length === 0) {
addRole.value.checkedKeys = []
ifHasChannel.value = false
return
}
@ -346,6 +360,12 @@ const handleCheckChange = async (checkedNodes, checkedInfo) => {
// Set
addRole.value.checkedKeys = Array.from(allKeys)
console.log('新增角色包含所有父级的选中项:', addRole.value.checkedKeys)
if (addRole.value.checkedKeys.includes(124)) {
ifHasChannel.value = true
console.log('勾选了频道');
} else {
ifHasChannel.value = false
}
}
const selectParentNodes = (treeData, nodeId, checkedKeys) => {
if (!Array.isArray(treeData)) return false
@ -411,18 +431,38 @@ const collectIds2 = (tree) => {
return ids
}
const collectIdsAll = (tree) => {
let ids = []
tree.forEach((node) => {
ids.push(node.id)
// children children
if (node.children || node.children.length === 0) {
ids = ids.concat(collectIdsAll(node.children))
}
})
return ids
}
//
const permissionEditRoleInit = async function (row) {
console.log('row', row)
console.log('row.tree', row.tree)
let EditIds = collectIdsAll(row.tree)
console.log(EditIds);
permissionEditRoleObj.value = {}
permissionEditRoleObj.value.id = row.id
permissionEditRoleObj.value.roleName = row.roleName
permissionEditRoleObj.value.market = row.market
permissionEditRoleObj.value.parentId = row.fatherId
permissionEditRoleObj.value.parentName = row.fatherName
permissionEditRoleObj.value.channel = row.channel
if (EditIds.includes(124)) {
ifHasChannel.value = true
} else {
ifHasChannel.value = false
}
try {
let roleId = permissionEditRoleObj.value.parentId;
// id
@ -634,9 +674,9 @@ onMounted(async function () {
</div>
<div style="margin-top: 20px;display: flex;">
<el-pagination background :page-size="getRoleObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="roleTotal" @size-change="handleRolePageSizeChange"
@current-change="handleRoleCurrentChange"></el-pagination>
<el-pagination background :current-page="getRoleObj.pageNum" :page-size="getRoleObj.pageSize"
:page-sizes="[5, 10, 20, 50, 100]" layout="total, sizes, prev, pager, next, jumper" :total="roleTotal"
@size-change="handleRolePageSizeChange" @current-change="handleRoleCurrentChange"></el-pagination>
</div>
</el-card>
</div>
@ -684,6 +724,11 @@ onMounted(async function () {
<span style="color: #999;">暂无数据</span>
</div>
</el-form-item>
<el-form-item v-show="ifHasChannel" prop="channel" label="频道名称:" required>
<el-select v-model="addRole.channel" placeholder="请选择频道" style="width: 220px" clearable>
<el-option v-for="item in channelList" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-form>
<div>
@ -727,6 +772,12 @@ onMounted(async function () {
<span style="color: #999;">暂无数据</span>
</div>
</el-form-item>
<el-form-item v-show="ifHasChannel" prop="channel" label="频道名称:" required>
<el-select v-model="permissionEditRoleObj.channel" placeholder="请选择频道" style="width: 220px" clearable>
<el-option v-for="item in channelList" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-form>
<div>

5
src/views/permissions/userPermission.vue

@ -185,7 +185,8 @@ const search = function () {
//
const reset = function () {
admin.value = {}
//
getObj.value.pageNum = 1
getPermission()
}
const RoleArea = ref([])
@ -1003,7 +1004,7 @@ onMounted(async function () {
</el-table-column>
</el-table>
<div class="pagination" style="margin-top: 1vh;">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>

4
src/views/recharge/bean/beanOnlineRecharge.vue

@ -141,6 +141,8 @@ const reset = () => {
startTime: '',
endTime: '',
}
//
getObj.value.pageNum = 1
getTime.value = []
activeTimeRange.value = ''
search()
@ -441,7 +443,7 @@ onMounted(async function () {
<!-- 分页 -->
<div class="pagination" style="margin-top: 20px">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>

4
src/views/recharge/bean/beanSystemRecharge.vue

@ -139,6 +139,8 @@ const reset = () => {
startTime: '',
endTime: '',
}
//
getObj.value.pageNum = 1
getTime.value = []
activeTimeRange.value = ''
search()
@ -410,7 +412,7 @@ onMounted(async function () {
<!-- 分页 -->
<div class="pagination" style="margin-top: 1vw">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>

4
src/views/recharge/gold/coinRechargeDetail.vue

@ -413,6 +413,8 @@ const reset = function () {
delete sortOrder.value
getTime.value = {}
activeTimeRange.value = '' //
//
getObj.value.pageNum = 1
get()
}
@ -700,7 +702,7 @@ const getTagText = (state) => {
<!-- 分页 -->
<div style="margin-top: 1vh">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>

4
src/views/refund/gold/coinRefundDetail.vue

@ -231,6 +231,8 @@ const reset = function () {
getTime.value = {}
activeTimeRange.value = '' //
selectedMarketPath.value = []
//
getObj.value.pageNum = 1
getSelectBy()
}
//
@ -614,7 +616,7 @@ const getMarket = async function () {
<!-- 分页 -->
<div class="pagination" style="margin-top: 20px;display: flex;">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange" @jump="checkPageNumber"></el-pagination>
</div>

2
src/views/usergold/bean/userbean.vue

@ -169,6 +169,8 @@ const trim = () => {
const reset = function () {
searchObj.value.jwcode = ''
searchObj.value.dept = ''
//
pagination.value.pageNum = 1
search()
}
const handlePageSizeChange = function (val) {

6
src/views/usergold/gold/clientCountBalance.vue

@ -203,8 +203,10 @@ const reset = function () {
}
sortField.value = ''
sortOrder.value = ''
get()
selectedMarketPath.value = []
//
getObj.value.pageNum = 1
get()
}
const cellClick = function (row, column) {
console.log('cellClick', column.label)
@ -513,7 +515,7 @@ const format3 = (num) => {
</div>
<!-- 分页 -->
<div class="pagination" style="margin-top: 20px">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>

4
src/views/usergold/gold/clientCountDetail.vue

@ -233,6 +233,8 @@ const reset = function () {
getTime.value = []
activeTimeRange.value = '' //
//
getObj.value.pageNum = 1
search()
}
@ -599,7 +601,7 @@ const format3 = (num) => {
<!-- 此处分页 -->
<div class="pagination" >
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
<el-pagination background :current-page="getObj.pageNum" :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>

Loading…
Cancel
Save