Browse Source

style: 对齐

zhangyong/milestone-20250913-现金管理
lihui 2 months ago
parent
commit
cd72d65056
  1. 4
      .env.development
  2. 79
      src/views/audit/bean/beanAudit.vue
  3. 167
      src/views/consume/bean/articleVideo.vue
  4. 208
      src/views/consume/bean/dieHardFan.vue
  5. 184
      src/views/consume/bean/liveStream.vue
  6. 184
      src/views/consume/gold/coinConsumeDetail.vue
  7. 197
      src/views/recharge/bean/beanOnlineRecharge.vue
  8. 667
      src/views/recharge/bean/beanSystemRecharge.vue
  9. 184
      src/views/recharge/gold/coinRechargeDetail.vue

4
.env.development

@ -1,4 +1,4 @@
VITE_API_BASE='https://hwjb.homilychart.com/dev/admin'
VITE_API_BASE='https://hwjb.homilychart.com/dev/admin'
# 测试环境
# VITE_API_BASE='http://54.255.212.181:10704/'
# 正式环境
@ -13,4 +13,4 @@ VITE_UPLOAD_URL=http://39.101.133.168:8828/hljw/api/aws/upload
# 本地
#VITE_API_BASE='http://localhost:8081/'
# sunjiabei
# VITE_API_BASE='http://192.168.1.70:8081/'
#VITE_API_BASE='http://192.168.1.50:8081/'

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

@ -4,26 +4,28 @@
<div class="select">
<div class="selectRow">
<el-text class="text" size="large">精网号</el-text>
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" style="width: 12vw;margin-right:1vw" clearable />
<el-input class="selectContent" v-model="searchForm.jwcode" placeholder="请输入精网号"
style="width: 12vw;margin-right:1vw" clearable/>
</div>
<div class="selectRow">
<el-text class="text" size="large">所属地区</el-text>
<el-cascader v-model="selectedMarkets" :options="marketOptions" placeholder="请选择所属地区" clearable
style="width: 12vw" @change="handleMarketChange" />
style="width: 12vw" @change="handleMarketChange"/>
</div>
</div>
</el-col>
<el-col>
<div class="select">
<div class="selectRow" style="width: 36vw;">
<el-text class="text" size="large" v-show="checkTab === 'pending'">提交时间</el-text>
<el-text class="text" size="large" v-show="checkTab === 'pending'">提交时间</el-text>
<el-text class="text" size="large" v-show="checkTab === 'reject' || checkTab === 'pass'">审核时间</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="" start-placeholder="开始时间"
end-placeholder="结束时间" style="width: 25vw;margin-right:1vw" @change="handleDatePickerChange"
:default-time="defaultTime" />
<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>
end-placeholder="结束时间" class="selectContent" style="width: 25vw;margin-right:1vw"
@change="handleDatePickerChange"
:default-time="defaultTime"/>
<!-- <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 class="selectRow" style="justify-content: flex-start;">
<el-button type="success" @click="resetSearch">重置</el-button>
@ -53,15 +55,15 @@
{{ scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize }}
</template>
</el-table-column>
<el-table-column prop="name" label="姓名" width="120" show-overflow-tooltip />
<el-table-column prop="jwcode" label="精网号" width="120" />
<el-table-column prop="market" label="所属地区" width="120" />
<el-table-column prop="permanentBean" label="付费金豆" width="120" sortable="custom" />
<el-table-column prop="freeBean" label="免费金豆" width="120" sortable="custom" />
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="submitName" label="提交人" width="120" />
<el-table-column v-if="checkTab === 'reject'" prop="reason" label="驳回理由" width="120" show-overflow-tooltip />
<el-table-column v-if="checkTab !== 'pending'" prop="auditName" label="审核人" width="120" />
<el-table-column prop="name" label="姓名" width="120" show-overflow-tooltip/>
<el-table-column prop="jwcode" label="精网号" width="120"/>
<el-table-column prop="market" label="所属地区" width="120"/>
<el-table-column prop="permanentBean" label="付费金豆" width="120" sortable="custom"/>
<el-table-column prop="freeBean" label="免费金豆" width="120" sortable="custom"/>
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip/>
<el-table-column prop="submitName" label="提交人" width="120"/>
<el-table-column v-if="checkTab === 'reject'" prop="reason" label="驳回理由" width="120" show-overflow-tooltip/>
<el-table-column v-if="checkTab !== 'pending'" prop="auditName" label="审核人" width="120"/>
<el-table-column prop="createTime" label="提交时间" width="180" sortable="custom">
<template #default="{ row }">
{{ moment(row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
@ -73,12 +75,13 @@
</template>
</el-table-column>
<el-table-column v-if="checkTab === 'pending' && (hasbeanWaitThough || hasbeanWaitReject)" fixed="right"
prop="operation" label="操作" width="400px">
prop="operation" label="操作" width="400px">
<template #default="scope">
<div class="operation">
<el-popconfirm title="确定要通过此条记录吗?" @confirm="handleApprove(scope.row)">
<template #reference>
<el-link :underline="false" class="pass-btn" v-if="hasbeanWaitThough" :disabled="clicked || cancelClicked" type="primary">
<el-link :underline="false" class="pass-btn" v-if="hasbeanWaitThough"
:disabled="clicked || cancelClicked" type="primary">
通过
</el-link>
</template>
@ -89,8 +92,9 @@
</el-button>
</template>
</el-popconfirm>
<el-link :underline="false" class="reject-btn" v-if="hasbeanWaitReject" :disabled="clicked || cancelClicked" type="primary"
@click="showRejectDialog(scope.row)">
<el-link :underline="false" class="reject-btn" v-if="hasbeanWaitReject" :disabled="clicked || cancelClicked"
type="primary"
@click="showRejectDialog(scope.row)">
驳回
</el-link>
</div>
@ -98,14 +102,16 @@
</el-table-column>
</el-table>
<el-pagination style="margin-top:20px" v-model:current-page="pagination.pageNum"
v-model:page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="stats.num"
@size-change="handlePageSizeChange" @current-change="handleCurrentChange"></el-pagination>
v-model:page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="stats.num"
@size-change="handlePageSizeChange" @current-change="handleCurrentChange"></el-pagination>
</el-card>
<el-dialog v-model="rejectVisible" title="驳回理由" width="500px">
<el-form>
<el-form-item label="驳回理由" required>
<el-input v-model="reason" type="textarea" :rows="4" placeholder="请输入驳回理由" maxlength="200" show-word-limit />
<el-input v-model="reason" type="textarea" :rows="4" placeholder="请输入驳回理由" maxlength="200"
show-word-limit/>
</el-form-item>
</el-form>
<template #footer>
@ -117,20 +123,21 @@
</el-dialog>
</template>
<script setup>
import { onMounted, ref } from 'vue'
import { ElMessage } from 'element-plus'
import {onMounted, ref} from 'vue'
import {ElMessage} from 'element-plus'
import API from '@/util/http.js'
import moment from 'moment'
import { useAdminStore } from "@/store/index.js";
import { storeToRefs } from "pinia";
import {useAdminStore} from "@/store/index.js";
import {storeToRefs} from "pinia";
import _ from 'lodash'
import { permissionMapping, hasMenuPermission } from "@/utils/menuTreePermission.js"
import {permissionMapping, hasMenuPermission} from "@/utils/menuTreePermission.js"
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
]
const adminStore = useAdminStore();
const { adminData, menuTree } = storeToRefs(adminStore);
const {adminData, menuTree} = storeToRefs(adminStore);
import dayjs from "dayjs";
const tableData = ref([])
@ -264,7 +271,7 @@ const get = async function () {
}
}
console.log('看看传给后端的参数:', params)
const res = await API({ url: '/beanAudit/selectBy', data: params })
const res = await API({url: '/beanAudit/selectBy', data: params})
tableData.value = res.data.list || []
} catch (error) {
console.error('获取数据失败', error)
@ -311,7 +318,7 @@ const handleApprove = async (row) => {
id: row.id,
auditName: adminData.value.adminName
}
await API({ url: '/beanAudit/status1', data: params })
await API({url: '/beanAudit/status1', data: params})
ElMessage.success('审核通过成功')
await get()
clicked.value = false
@ -338,7 +345,7 @@ const handleReject = async () => {
auditName: adminData.value.adminName,
reason: reason.value
}
await API({ url: '/beanAudit/status2', data: params })
await API({url: '/beanAudit/status2', data: params})
ElMessage.success('驳回成功')
rejectVisible.value = false
await get()
@ -492,8 +499,8 @@ const getmarkets = async function () {
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child]) //
: null;
? transformTree([child]) //
: null;
return {
value: child.name,
label: child.name,
@ -556,7 +563,7 @@ onMounted(async () => {
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}

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

@ -1,10 +1,10 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
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'
import {ar} from 'element-plus/es/locales.mjs'
//
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
@ -43,9 +43,9 @@ const channels = ref([])
//
const consumeTypes = ref([
{ label: '打赏', value: 9 },
{ label: '打赏', value: 10 },
{ label: '付费购买', value: 11 },
{label: '打赏', value: 9},
{label: '打赏', value: 10},
{label: '付费购买', value: 11},
])
// payMode
@ -88,7 +88,7 @@ const getDept = async function () {
// url: '/general/dept',
url: '/beanConsume/getDept', // todo
data: { account: adminData.value.account }
data: {account: adminData.value.account}
})
console.log('请求地区列表成功', result)
//
@ -271,7 +271,6 @@ const reset = function () {
beanConsumeArticle.value.endTime = ''
sortField.value = ''
sortOrder.value = ''
getTime.value = {}
@ -317,8 +316,6 @@ const get7Days = function () {
}
//
const handleSortChange = (column) => {
console.log('排序字段:', column.prop)
@ -382,7 +379,7 @@ const exportExcel = async function () {
sortOrder: sortOrder.value,
},
}
const res = await API({ url: '/export/exportArticle', data: params })
const res = await API({url: '/export/exportArticle', data: params})
if (res.code === 200) {
ElMessage.success('导出成功')
}
@ -403,7 +400,7 @@ const exportListLoading = ref(false)
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
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/
@ -463,52 +460,70 @@ const getTagText = (state) => {
</script>
<template>
<el-card class="card1" style="margin-bottom: 1vh">
<el-card class="card1" style="margin-bottom: 0.5vh">
<el-col style="margin-bottom: 1vh; ">
<div style="display:flex">
<div style="width: 13vw; display:flex; align-items:center; justify-content: center;">
<el-text>精网号</el-text>
<el-input v-model="beanConsumeArticle.jwcode" style="width:8vw;margin-left: 0.5vw;" placeholder="请输入精网号" clearable />
<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 style="width: 13vw; display:flex; align-items:center; justify-content: center;">
<el-text>地区</el-text>
<el-select v-model="beanConsumeArticle.dept" style="width:8vw; margin-left: 0.5vw;" placeholder="请选择地区" clearable>
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item" />
<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 style="width: 13vw; display:flex;align-items:center; justify-content: center;">
<el-text>类型</el-text>
<el-select v-model="beanConsumeArticle.payMode" style="width:8vw; margin-left: 0.5vw;" placeholder="请选择类型" clearable @change="handlePayModeChange">
<el-option label="打赏" value="0" />
<el-option label="付费购买" value="1" />
<el-option label="其他" value="2" />
<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 style="width: 15vw; display:flex; align-items:center; justify-content: center;">
<el-text>文章/视频ID:</el-text>
<el-input v-model="beanConsumeArticle.articleId" style="width:8vw; margin-left: 0.5vw;" placeholder="请输入文章/视频ID" clearable />
<div class="selectRow">
<el-text class="text" size="large">文章/视频ID:</el-text>
<el-input class="selectContent" v-model="beanConsumeArticle.articleId"
placeholder="请输入文章/视频ID" clearable/>
</div>
<div style="width: 16vw; display:flex; align-items:center; justify-content: center;">
<el-text>文章/视频标题</el-text>
<el-input v-model="beanConsumeArticle.articleName" style="width:9vw; margin-left: 0.5vw;" placeholder="请输入文章/视频标题" clearable />
</div>
<div style="width: 12vw; display:flex; align-items:center; justify-content: center;">
<el-text>作者</el-text>
<el-input v-model="beanConsumeArticle.author" style="width:8vw; margin-left: 0.5vw;" placeholder="请输入作者" clearable />
<div class="selectRow">
<el-text class="text" size="large">文章/视频标题</el-text>
<el-input class="selectContent" v-model="beanConsumeArticle.articleName"
placeholder="请输入文章/视频标题" clearable/>
</div>
</div>
</el-col>
<el-col>
<div>
<el-text>付费时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width: 20vw;margin-right: 10px" @change="handleDatePickerChange"
value-format="YYYY-MM-DD HH:mm:ss" :default-time="defaultTime" />
<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 class="select">
<div class="selectRow" style="width: 30.5vw;">
<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" v-model="beanConsumeArticle.author" placeholder="请输入作者"
clearable/>
</div>
<el-button type="success" @click="reset()">重置</el-button>
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" @click="exportExcel()">导出Excel</el-button>
@ -527,30 +542,30 @@ const getTagText = (state) => {
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</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="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="jwcode" label="精网号" width="110px" fixed="left"/>
<el-table-column prop="dept" label="地区" width="110px"/>
<el-table-column prop="type" label="类型" width="120px">
<template #default="scope">
{{
Array.isArray(consumeTypes)
? consumeTypes.find(item => item.value === Number(scope.row.type))?.label || '未知类型'
: '未知类型'
? consumeTypes.find(item => item.value === Number(scope.row.type))?.label || '未知类型'
: '未知类型'
}}
</template>
</el-table-column>
<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="articleId" label="文章/视频ID" width="150px" />
<el-table-column prop="articleName" label="文章/视频标题" width="150px" show-overflow-tooltip />
<el-table-column prop="author" label="作者" width="120px" show-overflow-tooltip />
<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="articleId" label="文章/视频ID" width="150px"/>
<el-table-column prop="articleName" label="文章/视频标题" width="150px" show-overflow-tooltip/>
<el-table-column prop="author" label="作者" width="120px" show-overflow-tooltip/>
<el-table-column prop="consumeTime" label="付费时间" sortable="custom" width="180px">
<template #default="scope">
{{ formatTime(scope.row.consumeTime) }}
@ -562,15 +577,15 @@ const getTagText = (state) => {
<!-- 分页 -->
<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>
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="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'">
@ -586,7 +601,7 @@ const getTagText = (state) => {
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
:disabled="scope.row.state !== 2">
下载
</el-button>
</template>
@ -629,7 +644,7 @@ const getTagText = (state) => {
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
@ -648,4 +663,26 @@ const getTagText = (state) => {
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>

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

@ -1,6 +1,6 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
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'
@ -46,7 +46,7 @@ const getChannel = async function () {
try {
const result = await request({
url: '/beanConsume/getLiveChannel', // todo
data: { account: adminData.value.account }
data: {account: adminData.value.account}
})
console.log('请求频道列表成功', result)
//
@ -70,14 +70,14 @@ const getChannel = async function () {
//
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 }
{label: '发礼物', value: 1},
{label: '发红包', value: 2},
{label: '发福袋', value: 3},
{label: '付费直播', value: 4},
{label: '加入粉丝团', value: 5},
{label: '发弹幕', value: 6},
{label: '单次付费', value: 7},
{label: '连续包月', value: 8}
])
// //
@ -116,7 +116,6 @@ const getTime = ref({
const dept = ref([])
//
const sortField = ref('')
const sortOrder = ref('')
@ -258,7 +257,6 @@ const reset = function () {
beanConsumeFan.value.endTime = ''
sortField.value = ''
sortOrder.value = ''
getTime.value = {}
@ -312,7 +310,7 @@ const getDept = async function () {
// url: '/general/dept',
url: '/beanConsume/getDept', // todo
data: { account: adminData.value.account }
data: {account: adminData.value.account}
})
console.log('请求地区列表成功', result)
//
@ -387,7 +385,7 @@ const exportExcel = async function () {
sortOrder: sortOrder.value,
},
}
const res = await API({ url: '/export/exportFan', data: params })
const res = await API({url: '/export/exportFan', data: params})
if (res.code === 200) {
ElMessage.success('导出成功')
}
@ -408,7 +406,7 @@ const exportListLoading = ref(false)
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
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
@ -468,82 +466,99 @@ const getTagText = (state) => {
</script>
<template>
<el-card class="card1" style="margin-bottom: 1vh;">
<el-col style="margin-bottom: 10px">
<el-text>精网号</el-text>
<el-input v-model="beanConsumeFan.jwcode" placeholder="请输入精网号" style="width: 200px;margin-right: 20px"
clearable />
<el-text>地区</el-text>
<el-select v-model="beanConsumeFan.dept" placeholder="请选择地区" style="width: 200px;margin-right: 20px" clearable>
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item" />
</el-select>
<el-text>频道</el-text>
<el-select v-model="beanConsumeFan.channel" placeholder="请选择频道" style="width: 200px" clearable filterable >
<el-option v-for="(item, index) in channels" :key="index" :label="item" :value="item" />
</el-select>
<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>
<el-text>消费时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width: 400px;margin-right:20px" @change="handleDatePickerChange"
value-format="YYYY-MM-DD HH:mm:ss" :default-time="defaultTime" />
<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>
<el-button type="success" @click="reset()">重置</el-button>
<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>
<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="success" @click="reset()">重置</el-button>
<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>
</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="57vh" @sort-change="handleSortChange">
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<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="57vh" @sort-change="handleSortChange">
<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>
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="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'">
@ -559,7 +574,7 @@ const getTagText = (state) => {
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
:disabled="scope.row.state !== 2">
下载
</el-button>
</template>
@ -602,7 +617,7 @@ const getTagText = (state) => {
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
@ -621,4 +636,27 @@ const getTagText = (state) => {
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>

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

@ -1,6 +1,6 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
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'
@ -49,7 +49,7 @@ const getGift = async function () {
try {
const result = await request({
url: '/beanConsume/getLiveGift', // todo
data: { account: adminData.value.account }
data: {account: adminData.value.account}
})
console.log('请求礼物列表成功', result)
//
@ -71,7 +71,7 @@ const getChannel = async function () {
try {
const result = await request({
url: '/beanConsume/getLiveChannel', // todo
data: { account: adminData.value.account }
data: {account: adminData.value.account}
})
console.log('请求频道列表成功', result)
//
@ -88,12 +88,12 @@ const getChannel = async function () {
//
const consumeTypes = ref([
{ label: '发礼物', value: 1 },
{ label: '发红包', value: 2 },
{ label: '发福袋', value: 3 },
{ label: '付费直播', value: 4 },
{ label: '加入粉丝团', value: 5 },
{ label: '发弹幕', value: 6 }
{label: '发礼物', value: 1},
{label: '发红包', value: 2},
{label: '发福袋', value: 3},
{label: '付费直播', value: 4},
{label: '加入粉丝团', value: 5},
{label: '发弹幕', value: 6}
])
//
const handleTypeChange = (value) => {
@ -136,7 +136,7 @@ const getDept = async function () {
// url: '/general/dept',
url: '/beanConsume/getDept', // todo
data: { account: adminData.value.account }
data: {account: adminData.value.account}
})
console.log('请求地区列表成功', result)
//
@ -260,7 +260,6 @@ const selectLiveBy = async function (val) {
totalNum.value = Number(data.totalNum) || 0;
//
total.value = result.data.total
console.log('total', total.value)
@ -337,8 +336,6 @@ const get7Days = function () {
}
//
const handleSortChange = (column) => {
console.log('排序字段:', column.prop)
@ -413,7 +410,7 @@ const exportExcel = async function () {
try {
console.log('2')
const res = await API({ url: '/export/exportLive', data: params });
const res = await API({url: '/export/exportLive', data: params});
console.log('导出请求响应:', res);
if (res.code === 200) {
ElMessage.success('导出成功');
@ -442,7 +439,7 @@ const exportListLoading = ref(false)
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
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
@ -502,53 +499,64 @@ const getTagText = (state) => {
</script>
<template>
<el-card class="card1" style="margin-bottom: 1vh;">
<div style="margin-bottom: 1vh;display: flex;">
<div style="width: 18vw;margin-right: 1vw;display: flex;align-items: center;">
<el-text>精网号</el-text>
<el-input v-model="beanConsumeLive.jwcode" style="width:10vw;" placeholder="请输入精网号" clearable />
</div>
<div style="margin-bottom: 1vh;width:18vw;display: flex;align-items: center;">
<el-text>地区</el-text>
<el-select v-model="beanConsumeLive.dept" placeholder="请选择地区" style="width:10vw" clearable>
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item" />
</el-select>
</div>
<div style="margin-bottom: 1vh;width:18vw;display: flex;align-items: center;">
<el-text>礼物名称</el-text>
<el-select v-model="beanConsumeLive.gift" placeholder="请选择礼物名称" style="width:10vw"
clearable filterable allow-create default-first-option>
<el-option v-for="(item, index) in gifts" :key="index" :label="item" :value="item" />
</el-select>
<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">
<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">
<el-text class="text">频道</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">
<el-text class="text">直播间</el-text>
<el-input class="selectContent" v-model="beanConsumeLive.liveName" placeholder="请输入直播间"
clearable/>
</div>
</div>
<div style="margin-bottom: 1vh;width:18vw;display: flex;align-items: center;">
<el-text>频道</el-text>
<el-select v-model="beanConsumeLive.liveChannel" placeholder="请选择频道" style="width:10vw"
clearable filterable allow-create default-first-option>
<el-option v-for="(item, index) in channels" :key="index" :label="item" :value="item" />
</el-select>
</el-col>
<el-col>
<div class="select">
<div class="selectRow" style="width: 31.5vw;">
<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="success" @click="reset()">重置</el-button>
<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>
</div>
</div>
<div style="margin-bottom: 1vh;width:18vw;display: flex;align-items: center;">
<el-text>直播间</el-text>
<el-input v-model="beanConsumeLive.liveName" placeholder="请输入直播间" style="width:10vw"
clearable />
</div>
</div>
<div>
<el-text>消费时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width: 20vw;margin-right: 1vw;" @change="handleDatePickerChange"
:default-time="defaultTime" />
<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>
<el-button type="success" @click="reset()">重置</el-button>
<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>
</div>
</el-col>
</el-card>
<el-card class="card2">
<div class="goldStatistics">
@ -561,39 +569,39 @@ const getTagText = (state) => {
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</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="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="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="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-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>
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="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'">
@ -609,7 +617,7 @@ const getTagText = (state) => {
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
:disabled="scope.row.state !== 2">
下载
</el-button>
</template>
@ -652,7 +660,7 @@ const getTagText = (state) => {
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
@ -671,4 +679,26 @@ const getTagText = (state) => {
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>

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

@ -1,10 +1,10 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
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 { reverseMarketMapping } from "@/utils/marketMap.js";
import {reverseMarketMapping} from "@/utils/marketMap.js";
//
/*
@ -219,7 +219,7 @@ const ConsumeSelectBy = async function (val) {
//
// detail.value
const detailWithoutSort = { ...consumeUser.value, flag: showEmployeeData.value ? 0 : 1 }
const detailWithoutSort = {...consumeUser.value, flag: showEmployeeData.value ? 0 : 1}
delete detailWithoutSort.sortField
delete detailWithoutSort.sortOrder
@ -434,7 +434,7 @@ const exportExcel = async function () {
}
}
const res = await API({ url: '/export/exportConsume', data: params })
const res = await API({url: '/export/exportConsume', data: params})
if (res.code === 200) {
ElMessage.success('导出成功')
}
@ -455,7 +455,7 @@ const exportListLoading = ref(false)
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
const result = await API({url: '/export/export'})
if (result.code === 200) {
const filteredData = result.data.filter(item => {
return item.type === 4; //4
@ -541,8 +541,8 @@ const getMarket = async function () {
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child]) //
: null;
? transformTree([child]) //
: null;
return {
value: child.name,
@ -563,47 +563,77 @@ const getMarket = async function () {
<template>
<el-card class="card1" style="margin-bottom: 0.5vh;">
<div style="width:82vw;margin-bottom: 1vh;">
<el-text>精网号</el-text>
<el-input v-model="consumeUser.jwcode" placeholder="请输入精网号" style="width: 10vw;margin-right: 1vw;" clearable />
<el-text size="large">商品名称</el-text>
<el-select v-model="consumeUser.goodsName" placeholder="请选择商品名称" style="width: 10vw;margin-right: 1vw;" clearable
filterable>
<el-option v-for="(item, index) in goods" :key="index" :label="item.label" :value="item" />
</el-select>
<el-text size="large">所属地区</el-text>
<el-cascader v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区" clearable
style="width: 10vw;margin-right: 1vw;" @change="handleMarketChange" />
<el-text size="large">消耗平台</el-text>
<el-select v-model="consumeUser.payPlatform" placeholder="请选择消耗平台" style="width: 10vw;margin-right: 1vw;"
clearable>
<el-option v-for="item in consumePlatform" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox>
</div>
<div>
<el-text size="large">消耗时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width: 20vw" @change="handleDatePickerChange" :default-time="defaultTime"
:disabled-date="disabledDate" />
<el-button @click="getToday()" style="margin-left: 1vw" :type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 1vw"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 1vw" :type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
</el-button>
<el-button type="success" @click="reset()">重置</el-button>
<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>
</div>
<el-col style="margin-bottom: 1vh">
<div class="select">
<div class="selectRow">
<el-text class="text">精网号</el-text>
<el-input class="selectContent" v-model="consumeUser.jwcode" placeholder="请输入精网号"
clearable/>
</div>
<div class="selectRow">
<el-text class="text" size="large">商品名称</el-text>
<el-select class="selectContent" v-model="consumeUser.goodsName" placeholder="请选择商品名称"
clearable
filterable>
<el-option v-for="(item, index) in goods" :key="index" :label="item.label" :value="item"/>
</el-select>
</div>
<div class="selectRow">
<el-text class="text" size="large">所属地区</el-text>
<el-cascader class="selectContent" v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区"
clearable
@change="handleMarketChange"/>
</div>
<div class="selectRow">
<el-text size="large">消耗平台</el-text>
<el-select class="selectContent" v-model="consumeUser.payPlatform" placeholder="请选择消耗平台"
clearable>
<el-option v-for="item in consumePlatform" :key="item.id" :label="item.label" :value="item.value"/>
</el-select>
</div>
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox>
</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"
:default-time="defaultTime"
:disabled-date="disabledDate"/>
<div v-if="false">
<el-button @click="getToday()" style="margin-left: 1vw"
:type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 1vw"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 1vw"
:type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
</el-button>
</div>
</div>
<div class="selectRow" style="justify-content: flex-start;">
<el-button type="success" @click="reset()">重置</el-button>
<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>
</div>
</div>
</el-col>
</el-card>
<el-card class="card2">
<div class="goldStatistics">
@ -618,16 +648,16 @@ const getMarket = async function () {
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</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="market" label="所属地区" width="110px" />
<el-table-column prop="orderCode" label="订单号" width="260px" show-overflow-tooltip />
<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="market" label="所属地区" width="110px"/>
<el-table-column prop="orderCode" label="订单号" width="260px" show-overflow-tooltip/>
<el-table-column prop="goodsName" label="商品名称" width="160px" show-overflow-tooltip />
<el-table-column prop="goodsName" label="商品名称" width="160px" show-overflow-tooltip/>
<el-table-column prop="payPlatform" label="消耗平台" width="120px">
<template #default="scope">
{{ scope.row.payPlatform }}
@ -637,8 +667,8 @@ const getMarket = async function () {
<template #default="scope">
{{
(scope.row.taskGold +
scope.row.freeGold +
scope.row.permanentGold)
scope.row.freeGold +
scope.row.permanentGold)
}}
</template>
</el-table-column>
@ -659,7 +689,7 @@ const getMarket = async function () {
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip/>
<el-table-column prop="isRefund" label="订单状态" width="200px" show-overflow-tooltip>
<template #default="scope">
<span v-if="scope.row.isRefund == 0">正常</span>
@ -667,23 +697,23 @@ const getMarket = async function () {
<span v-else>未知状态</span>
</template>
</el-table-column>
<el-table-column prop="adminName" label="提交人" width="110px" />
<el-table-column prop="createTime" label="消耗时间" sortable="custom" width="180px" />
<el-table-column prop="adminName" label="提交人" width="110px"/>
<el-table-column prop="createTime" 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>
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="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'">
@ -699,7 +729,7 @@ const getMarket = async function () {
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
:disabled="scope.row.state !== 2">
下载
</el-button>
</template>
@ -736,7 +766,6 @@ const getMarket = async function () {
}
//
.card1 {
background: #F3FAFE;
@ -763,7 +792,7 @@ const getMarket = async function () {
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
@ -778,4 +807,25 @@ const getMarket = async function () {
background-color: #E5EBFE !important;
}
/** 搜索的样式 */
.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>

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

@ -1,8 +1,8 @@
<script setup>
import { ref, onMounted, reactive, computed } from 'vue'
import {ref, onMounted, reactive, computed} from 'vue'
import ElementPlus from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import { AiFillRead } from 'vue-icons-plus/ai'
import {ElMessage, ElMessageBox} from 'element-plus'
import {AiFillRead} from 'vue-icons-plus/ai'
import axios from 'axios'
import moment from 'moment'
import API from '@/util/http.js'
@ -33,13 +33,13 @@ const getTotalBeans = async () => {
}
})
if (result.code == 200) {
if(result.data){
if (result.data) {
permanentBeans.value = result.data.permanentBean
num.value = result.data.num
money.value = result.data.money
}else{
permanentBeans.value = 0
} else {
permanentBeans.value = 0
num.value = 0
money.value = 0
}
@ -80,15 +80,15 @@ const getArea = async () => {
const getToday = () => {
const today = new Date()
const startTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
today.getFullYear(),
today.getMonth(),
today.getDate(),
)
const endTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
23, 59, 59
today.getFullYear(),
today.getMonth(),
today.getDate(),
23, 59, 59
)
getTime.value = [startTime, endTime]
activeTimeRange.value = 'today'
@ -99,15 +99,15 @@ const getYesterday = () => {
const yesterday = new Date()
yesterday.setDate(yesterday.getDate() - 1)
const startTime = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate()
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate()
)
const endTime = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate(),
23, 59, 59
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate(),
23, 59, 59
)
getTime.value = [startTime, endTime]
activeTimeRange.value = 'yesterday'
@ -118,15 +118,15 @@ const getYesterday = () => {
const get7Days = function () {
const today = new Date()
const startTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() - 6
today.getFullYear(),
today.getMonth(),
today.getDate() - 6
)
const endTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
23, 59, 59
today.getFullYear(),
today.getMonth(),
today.getDate(),
23, 59, 59
)
getTime.value = [startTime, endTime]
activeTimeRange.value = '7days'
@ -254,7 +254,7 @@ const exportExcel = async () => {
},
}
try {
const res = await API({ url: '/export/exportol', data: params })
const res = await API({url: '/export/exportol', data: params})
if (res.code === 200) {
ElMessage.success('导出成功')
} else {
@ -281,7 +281,7 @@ const exportListLoading = ref(false)
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
const result = await API({url: '/export/export'})
if (result.code === 200) {
const filteredData = result.data.filter(item => {
return item.type === 10;
@ -350,40 +350,64 @@ onMounted(async function () {
</script>
<template>
<el-card class="card1" style="margin-bottom: 0.5vh;">
<div>
<el-text size="large">精网号</el-text>
<el-input v-model="selectData.jwcode" placeholder="请输入精网号" style="width: 10vw;margin-right: 1vw;" clearable />
<el-text size="large">所属地区</el-text>
<el-select v-model="selectData.market" placeholder="请选择所属地区" clearable style="width: 10vw;margin-right: 1vw;">
<el-option v-for="item in market" :key="item" :label="item" :value="item" />
</el-select>
<el-text size="large">订单号</el-text>
<el-input v-model="selectData.orderNo" placeholder="请输入订单号" style="width: 10vw;margin-right: 1vw;" clearable />
<el-text size="large">充值平台</el-text>
<el-select v-model="selectData.platform" placeholder="请选择充值平台" clearable style="width: 10vw;margin-right: 1vw;">
<el-option v-for="item in platform" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div style="margin-top: 0.5vh;">
<el-text size="large">充值时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width: 20vw" @change="handleDatePickerChange" :default-time="defaultTime" />
<el-button @click="getToday()" style="margin-left: 10px" :type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 10px"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 10px" :type="activeTimeRange === '7days' ? 'primary' : ''"> 近7天
</el-button>
<el-button type="success" @click="reset()">重置</el-button>
<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>
</div>
<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="selectData.jwcode" placeholder="请输入精网号"
clearable/>
</div>
<div class="selectRow">
<el-text class="text" size="large">所属地区</el-text>
<el-select class="selectContent" v-model="selectData.market" placeholder="请选择所属地区" clearable
>
<el-option v-for="item in market" :key="item" :label="item" :value="item"/>
</el-select>
</div>
<div class="selectRow">
<el-text class="text" size="large">订单号</el-text>
<el-input class="selectContent" v-model="selectData.orderNo" placeholder="请输入订单"
clearable/>
</div>
<div class="selectRow">
<el-text class="text" size="large">充值平台</el-text>
<el-select class="selectContent" v-model="selectData.platform" placeholder="请选择充值平台" clearable
>
<el-option v-for="item in platform" :key="item.value" :label="item.label" :value="item.value"/>
</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"
:default-time="defaultTime"/>
<div v-if="false">
<el-button @click="getToday()" style="margin-left: 10px"
:type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 10px"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 10px"
:type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
</el-button>
</div>
</div>
<div class="selectRow" style="justify-content: flex-start;">
<el-button type="success" @click="reset()">重置</el-button>
<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>
</div>
</div>
</el-col>
</el-card>
<el-card class="card2">
<div class="goldStatistics">
@ -395,16 +419,16 @@ onMounted(async function () {
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
</template>
</el-table-column>
<el-table-column fixed="left" prop="name" label="姓名" min-width="120" show-overflow-tooltip />
<el-table-column fixed="left" prop="jwcode" label="精网号" min-width="110px" />
<el-table-column prop="market" label="所属地区" min-width="100px" />
<el-table-column prop="orderNo" header-align="center" align="center" label="订单号" min-width="210px" />
<el-table-column prop="num" label="数量" sortable="custom" min-width="110px" />
<el-table-column prop="money" label="金额" sortable="custom" min-width="150px" />
<el-table-column fixed="left" prop="name" label="姓名" min-width="120" show-overflow-tooltip/>
<el-table-column fixed="left" prop="jwcode" label="精网号" min-width="110px"/>
<el-table-column prop="market" label="所属地区" min-width="100px"/>
<el-table-column prop="orderNo" header-align="center" align="center" label="订单号" min-width="210px"/>
<el-table-column prop="num" label="数量" sortable="custom" min-width="110px"/>
<el-table-column prop="money" label="金额" sortable="custom" min-width="150px"/>
<el-table-column prop="platform" label="充值平台" min-width="150px" show-overflow-tooltip>
<template #default=scope>
<span v-if="scope.row.platform == 1">PC</span>
@ -423,14 +447,14 @@ onMounted(async function () {
<!-- 分页 -->
<div class="pagination" style="margin-top: 20px">
<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>
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="80vw" class="custom-height-dialog">
<el-table :data="exportList" style="width:80vw;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" label="文件名" />
<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'">
@ -446,7 +470,7 @@ onMounted(async function () {
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
:disabled="scope.row.state !== 2">
下载
</el-button>
</template>
@ -488,7 +512,7 @@ onMounted(async function () {
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
@ -503,4 +527,25 @@ onMounted(async function () {
background-color: #E5EBFE !important;
}
/** 搜索的样式 */
.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>

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

@ -1,24 +1,25 @@
<script setup>
import { ref, onMounted, reactive, computed } from 'vue'
import {ref, onMounted, reactive, computed} from 'vue'
import ElementPlus from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import { AiFillRead } from 'vue-icons-plus/ai'
import {ElMessage, ElMessageBox} from 'element-plus'
import {AiFillRead} from 'vue-icons-plus/ai'
import axios from 'axios'
import moment from 'moment'
import API from '@/util/http.js'
const selectData = ref({
jwcode: '',
market: '',
startTime: '',
endTime: '',
jwcode: '',
market: '',
startTime: '',
endTime: '',
})
const permanentBeans = ref(0)
const freeBean = ref(0)
const beanNum = ref(0)
const money = ref(0)
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
]
//
const formatTime = (val) => val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : ''
@ -29,234 +30,234 @@ const getTime = ref([])
//
const activeTimeRange = ref('')
const handleDatePickerChange = () => {
activeTimeRange.value = ''
activeTimeRange.value = ''
}
//
const getTotalBeans = async () => {
try {
const result = await API({
url: '/beanRecharge/statsSystemBean',
data: {
...selectData.value,
}
})
if (result.code == 200) {
if (result.data) {
permanentBeans.value = result.data.permanentBean
freeBean.value = result.data.freeBean
beanNum.value = result.data.beanNum
money.value = result.data.money
}else{
permanentBeans.value = 0
freeBean.value = 0
beanNum.value = 0
money.value = 0
}
try {
const result = await API({
url: '/beanRecharge/statsSystemBean',
data: {
...selectData.value,
}
})
if (result.code == 200) {
if (result.data) {
permanentBeans.value = result.data.permanentBean
freeBean.value = result.data.freeBean
beanNum.value = result.data.beanNum
money.value = result.data.money
} else {
permanentBeans.value = 0
freeBean.value = 0
beanNum.value = 0
money.value = 0
}
console.log('金豆总数获取成功');
}
console.log('获取金豆总数失败:', result.msg);
} catch (error) {
console.log('获取金豆总数出错');
console.log('金豆总数获取成功');
}
console.log('获取金豆总数失败:', result.msg);
} catch (error) {
console.log('获取金豆总数出错');
}
}
//
const getArea = async () => {
const result = await API({
url: '/beanRecharge/systemMarket',
data: {}
})
if (result.code == 200) {
market.value = result.data
console.log('系统充值地区获取成功', market.value)
} else {
ElMessage.error('系统充值地区获取失败')
}
const result = await API({
url: '/beanRecharge/systemMarket',
data: {}
})
if (result.code == 200) {
market.value = result.data
console.log('系统充值地区获取成功', market.value)
} else {
ElMessage.error('系统充值地区获取失败')
}
}
//
const getToday = () => {
const today = new Date()
const startTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
)
const endTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
23, 59, 59
)
getTime.value = [startTime, endTime]
activeTimeRange.value = 'today'
search()
const today = new Date()
const startTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
)
const endTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
23, 59, 59
)
getTime.value = [startTime, endTime]
activeTimeRange.value = 'today'
search()
}
const getYesterday = () => {
const yesterday = new Date()
yesterday.setDate(yesterday.getDate() - 1)
const startTime = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate()
)
const endTime = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate(),
23, 59, 59
)
getTime.value = [startTime, endTime]
activeTimeRange.value = 'yesterday'
search()
const yesterday = new Date()
yesterday.setDate(yesterday.getDate() - 1)
const startTime = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate()
)
const endTime = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate(),
23, 59, 59
)
getTime.value = [startTime, endTime]
activeTimeRange.value = 'yesterday'
search()
}
const get7Days = function () {
const today = new Date()
const startTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() - 6
)
const endTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
23, 59, 59
)
getTime.value = [startTime, endTime]
activeTimeRange.value = '7days'
search()
const today = new Date()
const startTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() - 6
)
const endTime = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate(),
23, 59, 59
)
getTime.value = [startTime, endTime]
activeTimeRange.value = '7days'
search()
}
const reset = () => {
selectData.value = {
jwcode: '',
market: '',
startTime: '',
endTime: '',
}
getTime.value = []
activeTimeRange.value = ''
search()
selectData.value = {
jwcode: '',
market: '',
startTime: '',
endTime: '',
}
getTime.value = []
activeTimeRange.value = ''
search()
}
//
const search = () => {
//
getObj.value.pageNum = 1
if (selectData.value.jwcode) {
const numRef = /^\d{1,9}$/;
if (!numRef.test(selectData.value.jwcode)) {
ElMessage.error('请检查精网号格式')
return
}
//
getObj.value.pageNum = 1
if (selectData.value.jwcode) {
const numRef = /^\d{1,9}$/;
if (!numRef.test(selectData.value.jwcode)) {
ElMessage.error('请检查精网号格式')
return
}
get()
getTotalBeans()
}
get()
getTotalBeans()
}
//
const get = async () => {
try {
if (getTime.value != null) {
selectData.value.startTime = formatTime(getTime.value[0])
selectData.value.endTime = formatTime(getTime.value[1])
} else {
selectData.value.startTime = ''
selectData.value.endTime = ''
}
const data = {
...getObj.value,
"beanSystemRechargeInfo": {
...selectData.value,
sortField: sortField.value,
sortOrder: sortOrder.value,
},
}
console.log('请求参数:', data);
const result = await API({
url: '/beanRecharge/selectBySystem',
data: data
})
if (result.code == 200) {
tableData.value = result.data.list
total.value = result.data.total
} else {
ElMessage.error(result.message)
}
} catch (error) {
console.log('搜索失败', error);
try {
if (getTime.value != null) {
selectData.value.startTime = formatTime(getTime.value[0])
selectData.value.endTime = formatTime(getTime.value[1])
} else {
selectData.value.startTime = ''
selectData.value.endTime = ''
}
const data = {
...getObj.value,
"beanSystemRechargeInfo": {
...selectData.value,
sortField: sortField.value,
sortOrder: sortOrder.value,
},
}
console.log('请求参数:', data);
const result = await API({
url: '/beanRecharge/selectBySystem',
data: data
})
if (result.code == 200) {
tableData.value = result.data.list
total.value = result.data.total
} else {
ElMessage.error(result.message)
}
} catch (error) {
console.log('搜索失败', error);
}
}
//
//
const sortField = ref('')
const sortOrder = ref('')
const handleSortChange = (column) => {
console.log('排序字段:', column.prop)
console.log('排序方式:', column.order)
console.log('排序字段:', column.prop)
console.log('排序方式:', column.order)
// 使
const allowedFields = ['money', 'freeBean', 'rechargeTime', 'createTime', 'permanentBean'];
if (allowedFields.includes(column.prop)) {
sortField.value = column.prop;
}
// 使
const allowedFields = ['money', 'freeBean', 'rechargeTime', 'createTime', 'permanentBean'];
if (allowedFields.includes(column.prop)) {
sortField.value = column.prop;
}
sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC';
sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC';
console.log('传递给后端的排序字段:', sortField.value)
console.log('传递给后端的排序方式:', sortOrder.value)
console.log('传递给后端的排序字段:', sortField.value)
console.log('传递给后端的排序方式:', sortOrder.value)
get();
get();
}
//===================================================
//
const total = ref(0)
const getObj = ref({
pageNum: 1,
pageSize: 50
pageNum: 1,
pageSize: 50
})
const handlePageSizeChange = (value) => {
getObj.value.pageSize = value
get()
getObj.value.pageSize = value
get()
}
const handleCurrentChange = (value) => {
getObj.value.pageNum = value
get()
getObj.value.pageNum = value
get()
}
//=================================================
const exportExcel = async () => {
const params = {
...getObj.value,
"beanSystemRechargeInfo": {
...selectData.value,
sortField: sortField.value,
sortOrder: sortOrder.value,
},
}
try {
const res = await API({ url: '/export/exportBean', data: params })
console.log('系统充值导出的参数为:', params);
const params = {
...getObj.value,
"beanSystemRechargeInfo": {
...selectData.value,
sortField: sortField.value,
sortOrder: sortOrder.value,
},
}
try {
const res = await API({url: '/export/exportBean', data: params})
console.log('系统充值导出的参数为:', params);
if (res.code === 200) {
ElMessage.success('导出成功')
} else {
ElMessage.error(res.message || '导出失败,请稍后重试')
}
} catch (error) {
console.log('请求失败', error)
ElMessage.error('导出失败,请稍后重试')
if (res.code === 200) {
ElMessage.success('导出成功')
} else {
ElMessage.error(res.message || '导出失败,请稍后重试')
}
} catch (error) {
console.log('请求失败', error)
ElMessage.error('导出失败,请稍后重试')
}
}
const exportListVisible = ref(false)
//
const openExportList = () => {
getExportList()
exportListVisible.value = true
getExportList()
exportListVisible.value = true
}
//
@ -265,174 +266,187 @@ 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 === 9;
});
exportList.value = filteredData
} else {
ElMessage.error(result.msg || '获取导出列表失败')
}
} catch (error) {
console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
} finally {
exportListLoading.value = false
exportListLoading.value = true
try {
const result = await API({url: '/export/export'})
if (result.code === 200) {
const filteredData = result.data.filter(item => {
return item.type === 9;
});
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('文件还在导出中,请稍后再试')
}
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';
}
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 '未知状态';
}
switch (state) {
case 0:
return '待执行';
case 1:
return '执行中';
case 2:
return '执行完成';
case 3:
return '执行出错';
default:
return '未知状态';
}
}
const format3 = (num) => {
//
return num.toLocaleString('en-US')
//
return num.toLocaleString('en-US')
}
onMounted(async function () {
await get()
await getArea()
await getTotalBeans()
await get()
await getArea()
await getTotalBeans()
})
</script>
<template>
<el-card class="card1" style="margin-bottom: 0.5vh">
<div>
<el-text size="large">精网号</el-text>
<el-input v-model="selectData.jwcode" placeholder="请输入精网号" style="width: 9vw;margin-right:1vw" clearable />
<el-text size="large">所属地区</el-text>
<el-select v-model="selectData.market" placeholder="请选择所属地区" clearable style="width: 9vw;margin-right:1vw">
<el-option v-for="item in market" :key="item" :label="item" :value="item" />
</el-select>
<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="selectData.jwcode" placeholder="请输入精网号"
clearable/>
</div>
<div class="selectRow">
<el-text class="text" size="large">所属地区</el-text>
<el-select class="selectContent" v-model="selectData.market" placeholder="请选择所属地区" clearable>
<el-option v-for="item in market" :key="item" :label="item" :value="item"/>
</el-select>
</div>
<div style="margin-top: 1vh;">
<el-text size="large">充值时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width: 20vw" @change="handleDatePickerChange"
:default-time="defaultTime" />
</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"
:default-time="defaultTime"/>
<div v-if="false">
<el-button @click="getToday()" style="margin-left: 10px"
:type="activeTimeRange === 'today' ? 'primary' : ''">
:type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 10px"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 10px"
:type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
:type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
</el-button>
<el-button type="success" @click="reset()">重置</el-button>
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" style="width: 80px;" @click="exportExcel()">导出Excel</el-button>
<el-button type="primary" style="width: 95px;" @click="openExportList">查看导出列表</el-button>
</div>
</el-card>
<el-card class="card2">
<div class="goldStatistics">
金豆总数{{ format3(beanNum) }}&nbsp;&nbsp;&nbsp;&nbsp;
付费金豆数{{ format3(permanentBeans) }}&nbsp;&nbsp;&nbsp;&nbsp;
免费金豆数{{ format3(freeBean) }}
</div>
</div>
<div>
<el-table :data="tableData" style="width: 82vw;height:60vh;" @sort-change="handleSortChange">
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<el-button type="success" @click="reset()">重置</el-button>
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" style="width: 80px;" @click="exportExcel()">导出Excel</el-button>
<el-button type="primary" style="width: 95px;" @click="openExportList">查看导出列表</el-button>
</div>
</el-col>
</el-card>
<el-card class="card2">
<div class="goldStatistics">
金豆总数{{ format3(beanNum) }}&nbsp;&nbsp;&nbsp;&nbsp;
付费金豆数{{ format3(permanentBeans) }}&nbsp;&nbsp;&nbsp;&nbsp;
免费金豆数{{ format3(freeBean) }}
</div>
<div>
<el-table :data="tableData" style="width: 82vw;height:60vh;" @sort-change="handleSortChange">
<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 fixed="left" prop="name" label="姓名" min-width="100" show-overflow-tooltip />
<el-table-column fixed="left" prop="jwcode" label="精网号" min-width="110px" />
<el-table-column prop="market" label="所属地区" min-width="100px" />
<el-table-column prop="permanentBean" label="付费金豆" sortable="custom" min-width="110px" />
<el-table-column prop="freeBean" label="免费金豆" sortable="custom" min-width="110px" />
<el-table-column prop="remark" label="备注" min-width="150px" show-overflow-tooltip />
<el-table-column prop="rechargeTime" label="充值时间" min-width="200px">
<template #default="scope">
{{ moment(scope.row.rechargeTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
</el-table>
</div>
}}</span>
</template>
</el-table-column>
<el-table-column fixed="left" prop="name" label="姓名" min-width="100" show-overflow-tooltip/>
<el-table-column fixed="left" prop="jwcode" label="精网号" min-width="110px"/>
<el-table-column prop="market" label="所属地区" min-width="100px"/>
<el-table-column prop="permanentBean" label="付费金豆" sortable="custom" min-width="110px"/>
<el-table-column prop="freeBean" label="免费金豆" sortable="custom" min-width="110px"/>
<el-table-column prop="remark" label="备注" min-width="150px" show-overflow-tooltip/>
<el-table-column prop="rechargeTime" label="充值时间" min-width="200px">
<template #default="scope">
{{ moment(scope.row.rechargeTime).format('YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="pagination" style="margin-top: 1vw">
<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="80vw">
<el-table :data="exportList" style="width: 80vw;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>
<!-- 分页 -->
<div class="pagination" style="margin-top: 1vw">
<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="80vw">
<el-table :data="exportList" style="width: 80vw;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-dialog>
</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">
/* .condition {
@ -470,7 +484,7 @@ onMounted(async function () {
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
@ -485,5 +499,26 @@ onMounted(async function () {
background-color: #E5EBFE !important;
}
/** 搜索的样式 */
.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>

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

@ -1,9 +1,9 @@
<script setup>
import { onMounted, ref } from 'vue'
import { ElMessage } from 'element-plus'
import {onMounted, ref} from 'vue'
import {ElMessage} from 'element-plus'
import moment from 'moment'
import API from '@/util/http.js'
import { reverseMarketMapping } from '@/utils/marketMap.js';
import {reverseMarketMapping} from '@/utils/marketMap.js';
import dayjs from "dayjs";
//
@ -18,7 +18,7 @@ const trimJwCode = () => {
const adminData = ref({})
const getAdminData = async function () {
try {
const result = await API({ url: '/admin/userinfo', data: {} })
const result = await API({url: '/admin/userinfo', data: {}})
adminData.value = result
rechargeUser.value.adminId = adminData.value.id
console.log('请求成功', result)
@ -49,8 +49,6 @@ const rechargeUser = ref({
})
/*//处理地区选择变化
const handleMarketChange = (value) => {
if (Array.isArray(value) && value.length > 0) {
@ -209,7 +207,7 @@ const delObj = ref({})
const getActivity = async function () {
try {
// POST
const result = await API({ url: '/general/activity', data: {} })
const result = await API({url: '/general/activity', data: {}})
//
console.log('请求成功', result)
@ -217,7 +215,7 @@ const getActivity = async function () {
//
if (Array.isArray(result.data)) {
// { value, label }
activity.value = result.data.map(item => ({ value: item, label: item }));
activity.value = result.data.map(item => ({value: item, label: item}));
} else {
console.error('活动数据格式错误', result)
ElMessage.error('活动数据格式错误,请联系管理员')
@ -248,8 +246,8 @@ const getArea = async function () {
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child]) //
: null;
? transformTree([child]) //
: null;
return {
value: child.name,
@ -281,7 +279,7 @@ const getPlatform = async () => {
})
// { value, label }
if (Array.isArray(result.data)) {
platform.value = result.data.map(item => ({ value: item, label: item }));
platform.value = result.data.map(item => ({value: item, label: item}));
} else {
console.error('充值方式格式错误', result)
ElMessage.error('充值方式格式错误,请联系管理员')
@ -336,7 +334,7 @@ const get = async function (val) {
url: '/recharge/selectBy',
data: {
...getObj.value,
rechargeUser: { ...rechargeUser.value, flag: showEmployeeData.value ? 0 : 1 }//flag
rechargeUser: {...rechargeUser.value, flag: showEmployeeData.value ? 0 : 1}//flag
}
})
// rechargeUser.value
@ -496,7 +494,7 @@ const exportExcel = async function () {
size: total.value
}
try {
const res = await API({ url: '/export/exportRecharge', data: params })
const res = await API({url: '/export/exportRecharge', data: params})
if (res.code === 200) {
ElMessage.success('导出成功')
} else {
@ -524,7 +522,7 @@ const exportListLoading = ref(false)
const getExportList = async () => {
exportListLoading.value = true
try {
const result = await API({ url: '/export/export' })
const result = await API({url: '/export/export'})
if (result.code === 200) {
const filteredData = result.data.filter(item => {
return item.type === 2; //2
@ -587,45 +585,68 @@ const getTagText = (state) => {
<template>
<el-card class="card1" style="margin-bottom: 0.5vh">
<div style="margin-bottom: 0.5vh;">
<el-text size="large">精网号</el-text>
<el-input v-model="rechargeUser.jwcode" placeholder="请输入精网号" style="width: 10vw;margin-right: 1vw;" clearable />
<el-text size="large">活动名称</el-text>
<el-select v-model="rechargeUser.activity" placeholder="请选择活动名称" style="width: 10vw;margin-right: 1vw;" clearable>
<el-option v-for="item in activity" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-text size="large">所属地区</el-text>
<el-cascader v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区" clearable style="width: 10vw;margin-right: 1vw;"
@change="handleMarketChange" />
<el-text size="large">充值平台</el-text>
<el-select v-model="rechargeUser.payPlatform" placeholder="请选择充值平台" style="width: 10vw;margin-right: 1vw;" clearable>
<el-option v-for="item in platform" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<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="rechargeUser.jwcode" placeholder="请输入精网号"
clearable/>
</div>
<div class="selectRow">
<el-text class="text" size="large">活动名称</el-text>
<el-select class="selectContent" v-model="rechargeUser.activity" placeholder="请选择活动名称"
clearable>
<el-option v-for="item in activity" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
</div>
<div class="selectRow">
<el-text class="text" size="large">所属地区</el-text>
<el-cascader class="selectContent" v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区"
clearable
@change="handleMarketChange"/>
</div>
<div class="selectRow">
<el-text class="text" size="large">充值平台</el-text>
<el-select class="selectContent" v-model="rechargeUser.payPlatform" placeholder="请选择充值平台" clearable>
<el-option v-for="item in platform" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
</div>
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox>
</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"
:default-time="defaultTime"
:disabled-date="disabledDate"/>
<div v-if="false">
<el-button @click="getToday()" style="margin-left: 1vw"
:type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 1vw"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 1vw"
:type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
</el-button>
</div>
</div>
<div class="selectRow" style="justify-content: flex-start;">
<el-button type="success" @click="reset()">重置</el-button>
<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>
</div>
</div>
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox>
</div>
<div>
<el-text size="large">充值时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width: 20vw" @change="handleDatePickerChange" :default-time="defaultTime"
:disabled-date="disabledDate" />
<el-button @click="getToday()" style="margin-left: 1vw" :type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 1vw"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 1vw" :type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
</el-button>
<el-button type="success" @click="reset()">重置</el-button>
<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>
</div>
</el-col>
</el-card>
<el-card class="card2">
@ -641,21 +662,21 @@ const getTagText = (state) => {
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
</template>
</el-table-column>
<el-table-column fixed="left" prop="name" label="姓名" width="150px" />
<el-table-column fixed="left" prop="jwcode" label="精网号" width="110px" />
<el-table-column prop="market" label="所属地区" width="100px" />
<el-table-column prop="activity" label="活动名称" width="110px" show-overflow-tooltip />
<el-table-column prop="rateName" label="货币名称" width="110px" />
<el-table-column prop="money" sortable="custom" label="充值金额" width="110px" />
<el-table-column prop="permanentGold" label="永久金币" sortable="custom" width="110px" />
<el-table-column prop="freeGold" label="免费金币" sortable="custom" width="110px" />
<el-table-column prop="payPlatform" label="充值平台" width="110px" />
<el-table-column prop="payModel" label="支付方式" width="100px" />
<el-table-column prop="remark" label="备注" width="150px" show-overflow-tooltip />
<el-table-column fixed="left" prop="name" label="姓名" width="150px"/>
<el-table-column fixed="left" prop="jwcode" label="精网号" width="110px"/>
<el-table-column prop="market" label="所属地区" width="100px"/>
<el-table-column prop="activity" label="活动名称" width="110px" show-overflow-tooltip/>
<el-table-column prop="rateName" label="货币名称" width="110px"/>
<el-table-column prop="money" sortable="custom" label="充值金额" width="110px"/>
<el-table-column prop="permanentGold" label="永久金币" sortable="custom" width="110px"/>
<el-table-column prop="freeGold" label="免费金币" sortable="custom" width="110px"/>
<el-table-column prop="payPlatform" label="充值平台" width="110px"/>
<el-table-column prop="payModel" label="支付方式" width="100px"/>
<el-table-column prop="remark" label="备注" width="150px" show-overflow-tooltip/>
<el-table-column prop="isRefund" label="订单状态" width="200px" show-overflow-tooltip>
<template #default="scope">
<span v-if="scope.row.isRefund == 0">正常</span>
@ -663,7 +684,7 @@ const getTagText = (state) => {
<span v-else>未知状态</span>
</template>
</el-table-column>
<el-table-column prop="adminName" label="提交人" width="100px" />
<el-table-column prop="adminName" label="提交人" width="100px"/>
<el-table-column prop="auditTime" sortable label="充值时间" width="200px">
<template #default="scope">
{{ moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss') }}
@ -675,15 +696,15 @@ const getTagText = (state) => {
<!-- 分页 -->
<div style="margin-top: 1vh">
<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>
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="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'">
@ -699,7 +720,7 @@ const getTagText = (state) => {
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2">
:disabled="scope.row.state !== 2">
下载
</el-button>
</template>
@ -740,7 +761,7 @@ const getTagText = (state) => {
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
@ -755,4 +776,25 @@ const getTagText = (state) => {
background-color: #E5EBFE !important;
}
/** 上面搜索的布局 **/
.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>
Loading…
Cancel
Save