Browse Source

Merge branch 'refs/heads/milestone-20250913-现金管理' into lihui/feature-20250915101448-现金管理

zhangyong/milestone-20250913-现金管理
lihui 2 months ago
parent
commit
45a5548888
  1. 100
      src/views/audit/bean/beanAudit.vue
  2. 3
      src/views/audit/gold/rechargeAudit.vue
  3. 131
      src/views/audit/gold/refundAudit.vue
  4. 124
      src/views/consume/bean/articleVideo.vue
  5. 87
      src/views/consume/bean/dieHardFan.vue
  6. 92
      src/views/consume/bean/liveStream.vue
  7. 90
      src/views/consume/gold/coinConsumeDetail.vue
  8. 47
      src/views/history/newHistory.vue
  9. 47
      src/views/history/oldHistory.vue
  10. 1
      src/views/home.vue
  11. 34
      src/views/permissions/rolePermission.vue
  12. 214
      src/views/permissions/userPermission.vue
  13. 110
      src/views/recharge/bean/beanOnlineRecharge.vue
  14. 4
      src/views/recharge/bean/beanRecharge.vue
  15. 99
      src/views/recharge/bean/beanSystemRecharge.vue
  16. 93
      src/views/recharge/gold/coinRechargeDetail.vue
  17. 121
      src/views/refund/gold/coinRefundDetail.vue
  18. 109
      src/views/usergold/bean/userbean.vue
  19. 3
      src/views/usergold/gold/clientCountBalance.vue
  20. 201
      src/views/usergold/gold/clientCountDetail.vue

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

@ -5,12 +5,12 @@
<div class="selectRow">
<el-text class="text" size="large">精网号</el-text>
<el-input class="selectContent" v-model="searchForm.jwcode" placeholder="请输入精网号"
style="width: 12vw;margin-right:1vw" clearable/>
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>
@ -20,16 +20,16 @@
<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="结束时间" 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>-->
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>
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button type="success" @click="resetSearch">重置</el-button>
</div>
</div>
</el-col>
@ -38,28 +38,16 @@
<el-card class="card2">
<!-- 将el-tabs替换为按钮组 -->
<div class="custom-button-group">
<el-button
v-if="hasbeanWait && hasbeanWaitShow"
:type="checkTab === 'pending' ? 'primary' : 'default'"
class="custom-tab-button"
@click="adminWait"
>
<el-button v-if="hasbeanWait && hasbeanWaitShow" :type="checkTab === 'pending' ? 'primary' : 'default'"
class="custom-tab-button" @click="adminWait">
待审核
</el-button>
<el-button
v-if="hasbeanThrough"
:type="checkTab === 'pass' ? 'primary' : 'default'"
class="custom-tab-button"
@click="adminPass"
>
<el-button v-if="hasbeanThrough" :type="checkTab === 'pass' ? 'primary' : 'default'" class="custom-tab-button"
@click="adminPass">
已通过
</el-button>
<el-button
v-if="hasbeanReject"
:type="checkTab === 'reject' ? 'primary' : 'default'"
class="custom-tab-button"
@click="adminReject"
>
<el-button v-if="hasbeanReject" :type="checkTab === 'reject' ? 'primary' : 'default'" class="custom-tab-button"
@click="adminReject">
已驳回
</el-button>
</div>
@ -77,15 +65,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') }}
@ -97,13 +85,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">
:disabled="clicked || cancelClicked" type="primary">
通过
</el-link>
</template>
@ -115,8 +103,7 @@
</template>
</el-popconfirm>
<el-link :underline="false" class="reject-btn" v-if="hasbeanWaitReject" :disabled="clicked || cancelClicked"
type="primary"
@click="showRejectDialog(scope.row)">
type="primary" @click="showRejectDialog(scope.row)">
驳回
</el-link>
</div>
@ -124,16 +111,14 @@
</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>
@ -145,21 +130,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([])
@ -293,7 +278,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)
@ -340,7 +325,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
@ -367,7 +352,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()
@ -521,8 +506,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,
@ -610,7 +595,7 @@ onMounted(async () => {
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
@ -645,5 +630,4 @@ onMounted(async () => {
}
}
}
</style>

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

@ -41,8 +41,9 @@
</div>
</div>
<div class="selectRow" style="justify-content: flex-start;">
<el-button @click="resetSearch" type="success">重置</el-button>
<el-button @click="handleSearch" type="primary">查询</el-button>
<el-button @click="resetSearch" type="success">重置</el-button>
</div>
</div>
</el-col>

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

@ -4,7 +4,7 @@
<div class="select">
<div class="selectRow">
<el-text class="text" size="large">精网号</el-text>
<el-input class="selectContent" v-model="searchForm.jwcode" placeholder="请输入精网号" clearable/>
<el-input class="selectContent" v-model="searchForm.jwcode" placeholder="请输入精网号" clearable />
</div>
<div class="selectRow">
<el-text class="text" size="large">商品名称</el-text>
@ -15,14 +15,14 @@
<div class="selectRow">
<el-text class="text" size="large">退款类型</el-text>
<el-select class="selectContent" v-model="searchForm.refundType" placeholder="请选择退款类型" clearable>
<el-option label="商品退款" value="商品退款"/>
<el-option label="金币退款" value="金币退款"/>
<el-option label="商品退款" value="商品退款" />
<el-option label="金币退款" value="金币退款" />
</el-select>
</div>
<div class="selectRow">
<el-text class="text" size="large">所属地区</el-text>
<el-cascader class="selectContent" style="width: 12vw;" v-model="selectedMarketPath" :options="market"
placeholder="请选择所属地区" clearable @change="handleMarketChange"/>
placeholder="请选择所属地区" clearable @change="handleMarketChange" />
</div>
</div>
</el-col>
@ -33,8 +33,8 @@
{{ activeName === 'wait' ? '提交时间:' : '审核时间:' }}
</el-text>
<el-date-picker class="selectContent" v-model="dateRange" type="datetimerange" range-separator=""
start-placeholder="起始时间" end-placeholder="结束时间" style="margin-right:1vw;width:25vw"
@change="handleDatePickerChange" :default-time="defaultTime" :disabled-date="disabledDate"/>
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()" :type="activeTimeRange === 'today' ? 'primary' : ''"></el-button>
<el-button @click="getYesterday()" :type="activeTimeRange === 'yesterday' ? 'primary' : ''"></el-button>
@ -42,8 +42,8 @@
</div>
</div>
<div class="selectRow" style="justify-content: flex-start;">
<el-button @click="resetSearch" type="success">重置</el-button>
<el-button @click="handleSearch" type="primary">查询</el-button>
<el-button @click="resetSearch" type="success">重置</el-button>
</div>
</div>
</el-col>
@ -51,31 +51,19 @@
<el-card class="card2">
<div class="custom-button-group">
<el-button
v-if="hasrefundWait&&hasrefundWaitShow"
:type="activeName === 'wait' ? 'primary' : 'default'"
@click="handleButtonClick('wait')"
class="custom-tab-button"
>
待审核
</el-button>
<el-button
v-if="hasrefundThrough"
:type="activeName === 'pass' ? 'primary' : 'default'"
@click="handleButtonClick('pass')"
class="custom-tab-button"
>
已通过
</el-button>
<el-button
v-if="hasrefundReject"
:type="activeName === 'reject' ? 'primary' : 'default'"
@click="handleButtonClick('reject')"
class="custom-tab-button"
>
已驳回
</el-button>
</div>
<el-button v-if="hasrefundWait && hasrefundWaitShow" :type="activeName === 'wait' ? 'primary' : 'default'"
@click="handleButtonClick('wait')" class="custom-tab-button">
待审核
</el-button>
<el-button v-if="hasrefundThrough" :type="activeName === 'pass' ? 'primary' : 'default'"
@click="handleButtonClick('pass')" class="custom-tab-button">
已通过
</el-button>
<el-button v-if="hasrefundReject" :type="activeName === 'reject' ? 'primary' : 'default'"
@click="handleButtonClick('reject')" class="custom-tab-button">
已驳回
</el-button>
</div>
<div class="goldStatistics">
退款总金币数{{
@ -87,19 +75,19 @@
</div>
<el-table :data="tableData" style="height:54vh;width:82vw" @sort-change="handleSortChange">
<el-table-column type="index" label="序号" width="60"/>
<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="orderCode" label="订单号" width="260px" show-overflow-tooltip/>
<el-table-column type="index" label="序号" width="60" />
<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="orderCode" label="订单号" width="260px" show-overflow-tooltip />
<el-table-column prop="refundType" label="退款类型" width="120"/>
<el-table-column prop="refundType" label="退款类型" width="120" />
<el-table-column prop="refundModel" label="退款方式" width="120">
<template #default="{ row }">
{{ row.refundModel === 0 ? '全部退款' : '部分退款' }}
</template>
</el-table-column>
<el-table-column prop="goodsName" label="退款商品" width="120" show-overflow-tooltip/>
<el-table-column prop="goodsName" label="退款商品" width="120" show-overflow-tooltip />
<el-table-column prop="sumGold" label="退款金币总数" width="160" sortable="custom">
<template #default="{ row }">
{{ row.sumGold / 100 }}
@ -120,17 +108,17 @@
{{ row.taskGold / 100 }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip/>
<el-table-column prop="adminName" label="提交人" width="120"/>
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip />
<el-table-column prop="adminName" label="提交人" width="120" />
<el-table-column v-if="checkTab === 'reject'" prop="rejectReason" label="驳回理由" width="150"
show-overflow-tooltip/>
<el-table-column v-if="checkTab !== 'pending'" prop="auditName" 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 }">
{{
checkTab === 'pending'
? moment(row.auditTime).format('YYYY-MM-DD HH:mm:ss')
: moment(row.createTime).format('YYYY-MM-DD HH:mm:ss')
? moment(row.auditTime).format('YYYY-MM-DD HH:mm:ss')
: moment(row.createTime).format('YYYY-MM-DD HH:mm:ss')
}}
</template>
@ -140,15 +128,14 @@
{{ row.auditTime ? moment(row.auditTime).format('YYYY-MM-DD HH:mm:ss') : '--' }}
</template>
</el-table-column>
<el-table-column v-if="checkTab === 'pending' && (hasrefundWaitThough || hasrefundWaitReject)&&hasrefundWaitShow"
fixed="right"
prop="operation" label="操作" width="150px">
<el-table-column v-if="checkTab === 'pending' && (hasrefundWaitThough || hasrefundWaitReject) && hasrefundWaitShow"
fixed="right" prop="operation" label="操作" width="150px">
<template #default="scope">
<div class="operation">
<el-popconfirm title="确定要通过此条记录吗?" @confirm="handleApprove(scope.row)">
<template #reference>
<el-link :underline="false" class="pass-btn" v-if="hasrefundWaitThough"
:disabled="clicked || cancelClicked" type="primary">
:disabled="clicked || cancelClicked" type="primary">
通过
</el-link>
</template>
@ -160,8 +147,7 @@
</template>
</el-popconfirm>
<el-link :underline="false" class="reject-btn" v-if="hasrefundWaitReject"
:disabled="clicked || cancelClicked" type="primary"
@click="showRejectDialog(scope.row)">
:disabled="clicked || cancelClicked" type="primary" @click="showRejectDialog(scope.row)">
驳回
</el-link>
</div>
@ -169,16 +155,15 @@
</el-table-column>
</el-table>
<el-pagination class="pagination" v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
@size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</el-card>
<el-dialog v-model="rejectDialogVisible" title="驳回理由" width="500px">
<el-form>
<el-form-item label="驳回理由" required>
<el-input v-model="rejectReason" type="textarea" :rows="4" placeholder="请输入驳回理由" maxlength="200"
show-word-limit/>
show-word-limit />
</el-form-item>
</el-form>
<template #footer>
@ -191,17 +176,17 @@
</template>
<script setup>
import {onMounted, reactive, ref} from 'vue'
import {ElMessage} from 'element-plus'
import { onMounted, reactive, 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 dayjs from "dayjs";
import {permissionMapping, hasMenuPermission} from "@/utils/menuTreePermission.js"
import { permissionMapping, hasMenuPermission } from "@/utils/menuTreePermission.js"
const adminStore = useAdminStore();
const {adminData, menuTree} = storeToRefs(adminStore);
const { adminData, menuTree } = storeToRefs(adminStore);
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
@ -317,7 +302,7 @@ const showRejectDialog = (row) => {
//
const getRefundGoods = async () => {
try {
const res = await API({url: '/general/goods'})
const res = await API({ url: '/general/goods' })
refundGoodsOptions.value = res.data || []
} catch (error) {
console.error('获取商品列表失败', error)
@ -366,7 +351,7 @@ const get = async function (val) {
return
}
}
const res = await API({url: '/audit/selectRefund', data: params})
const res = await API({ url: '/audit/selectRefund', data: params })
tableData.value = res.list || []
pagination.value.total = res.total || 0
console.log('查全部的total', pagination.value.total, res.total)
@ -389,7 +374,7 @@ const handleApprove = async (row) => {
action: 1,// action1,2
rejectReason: ''
}
await API({url: '/audit/audit', data: params})
await API({ url: '/audit/audit', data: params })
ElMessage.success('审核通过成功')
await get()
clicked.value = false
@ -421,7 +406,7 @@ const handleReject = async () => {
action: 2,
rejectReason: rejectReason.value
}
await API({url: '/audit/audit', data: params})
await API({ url: '/audit/audit', data: params })
ElMessage.success('驳回成功')
rejectDialogVisible.value = false
await get()
@ -534,21 +519,21 @@ const get7Days = function () {
const handleButtonClick = function (name) {
activeName.value = name
if (name === 'wait') {
if(!hasrefundWait){
if (!hasrefundWait) {
ElMessage.error('暂无权限')
return
}
if(hasrefundWaitShow){
if (hasrefundWaitShow) {
adminWait()
}
} else if (name === 'pass') {
if(!hasrefundThrough){
if (!hasrefundThrough) {
ElMessage.error('暂无权限')
return
}
adminPass()
} else if (name === 'reject') {
if(!hasrefundReject){
if (!hasrefundReject) {
ElMessage.error('暂无权限')
return
}
@ -624,8 +609,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,
@ -655,7 +640,7 @@ const format3 = (num) => {
}
//
const rules = reactive({
reason: [{required: true, message: '请输入驳回理由', trigger: 'blur'}]
reason: [{ required: true, message: '请输入驳回理由', trigger: 'blur' }]
})
const handlePageSizeChange = function (val) {
pagination.value.pageSize = val
@ -717,7 +702,7 @@ onMounted(async () => {
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}

124
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)
//
@ -379,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('导出成功')
}
@ -400,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/
@ -465,53 +465,38 @@ const getTagText = (state) => {
<div class="select">
<div class="selectRow">
<el-text class="text" size="large">精网号</el-text>
<el-input class="selectContent" v-model="beanConsumeArticle.jwcode" placeholder="请输入精网号"
clearable/>
<el-input class="selectContent" v-model="beanConsumeArticle.jwcode" placeholder="请输入精网号" clearable />
</div>
<div class="selectRow">
<el-text class="text" size="large">地区</el-text>
<el-select class="selectContent" v-model="beanConsumeArticle.dept"
placeholder="请选择地区"
clearable>
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item"/>
<el-select class="selectContent" v-model="beanConsumeArticle.dept" placeholder="请选择地区" clearable>
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item" />
</el-select>
</div>
<div class="selectRow">
<el-text class="text" size="large">类型</el-text>
<el-select class="selectContent"
style="width: 20px"
v-model="beanConsumeArticle.payMode"
placeholder="请选择类型" clearable
@change="handlePayModeChange"
>
<el-option label="打赏" value="0"/>
<el-option label="付费购买" value="1"/>
<el-option label="其他" value="2"/>
<el-select class="selectContent" style="width: 20px" v-model="beanConsumeArticle.payMode" placeholder="请选择类型"
clearable @change="handlePayModeChange">
<el-option label="打赏" value="0" />
<el-option label="付费购买" value="1" />
<el-option label="其他" value="2" />
</el-select>
</div>
<div class="selectRow">
<el-text class="text" size="large">文章/视频ID:</el-text>
<el-input class="selectContent" v-model="beanConsumeArticle.articleId"
placeholder="请输入文章/视频ID" clearable/>
</div>
<div class="selectRow">
<el-text class="text" size="large">文章/视频标题</el-text>
<el-input class="selectContent" v-model="beanConsumeArticle.articleName"
placeholder="请输入文章/视频标题" clearable/>
<el-text class="textB" size="large">文章/视频ID:</el-text>
<el-input class="selectContent" v-model="beanConsumeArticle.articleId" placeholder="请输入文章/视频ID" clearable />
</div>
</div>
</el-col>
<el-col>
<div class="select">
<div class="selectRow" style="width: 30.5vw;">
<div class="selectRow" style="width: 33vw;">
<el-text class="text" size="large">付费时间</el-text>
<el-date-picker class="selectContent" v-model="getTime" type="datetimerange" range-separator=""
start-placeholder="起始时间"
end-placeholder="结束时间" style="width:25vw"
@change="handleDatePickerChange"
value-format="YYYY-MM-DD HH:mm:ss" :default-time="defaultTime"/>
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>
@ -520,14 +505,21 @@ const getTagText = (state) => {
</div>
<div class="selectRow">
<el-text class="text" size="large">作者</el-text>
<el-input class="selectContent" v-model="beanConsumeArticle.author" placeholder="请输入作者"
clearable/>
<el-input class="selectContent" v-model="beanConsumeArticle.author" placeholder="请输入作者" clearable />
</div>
<div class="selectRow">
<el-text class="textB" size="large">文章/视频标题</el-text>
<el-input class="selectContent" v-model="beanConsumeArticle.articleName" placeholder="请输入文章/视频标题" clearable />
</div>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</el-col>
<el-col>
<div class="selectButton">
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" @click="exportExcel()">导出Excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</el-col>
</el-card>
@ -542,30 +534,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) }}
@ -577,15 +569,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'">
@ -601,7 +593,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>
@ -616,8 +608,6 @@ const getTagText = (state) => {
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
@ -644,7 +634,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;
}
@ -665,18 +655,26 @@ const getTagText = (state) => {
}
/** 搜索的样式 */
.selectButton {
margin-left: 1vw;
margin-top: 1vh;
}
.select {
display: flex;
.selectRow {
width: 17vw;
width: 16vw;
display: flex;
align-items: center;
justify-content: center;
padding: 0 0.5vw;
.text {
width: 5vw;
width: 4vw;
font-size: 15px;
}
.textB {
width: 6vw;
font-size: 15px;
}

87
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 }
])
// //
@ -310,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)
//
@ -385,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('导出成功')
}
@ -406,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
@ -471,21 +471,18 @@ const getTagText = (state) => {
<div class="select">
<div class="selectRow">
<el-text class="text">精网号</el-text>
<el-input class="selectContent" v-model="beanConsumeFan.jwcode" placeholder="请输入精网号"
clearable/>
<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 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 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>
@ -495,10 +492,8 @@ const getTagText = (state) => {
<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"/>
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>
@ -506,10 +501,10 @@ const getTagText = (state) => {
</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>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
</el-col>
@ -524,41 +519,41 @@ const getTagText = (state) => {
<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>
<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="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="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 || '未知类型' }}
{{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-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>
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'">
@ -574,7 +569,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>
@ -589,8 +584,6 @@ const getTagText = (state) => {
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
@ -617,7 +610,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;
}
@ -650,7 +643,7 @@ const getTagText = (state) => {
padding: 0 0.5vw;
.text {
width: 5vw;
width: 4vw;
font-size: 15px;
}

92
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)
//
@ -410,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('导出成功');
@ -439,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
@ -504,44 +504,41 @@ const getTagText = (state) => {
<div class="select">
<div class="selectRow">
<el-text class="text">精网号</el-text>
<el-input class="selectContent" v-model="beanConsumeLive.jwcode" placeholder="请输入精网号" clearable/>
<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-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 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 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/>
<el-input class="selectContent" v-model="beanConsumeLive.liveName" placeholder="请输入直播间" clearable />
</div>
</div>
</el-col>
<el-col>
<div class="select">
<div class="selectRow" style="width: 31.5vw;">
<div class="selectRow" style="width: 31.4vw;">
<el-text class="text">消费时间</el-text>
<el-date-picker class="selectContent" v-model="getTime" type="datetimerange" range-separator=""
start-placeholder="起始时间"
end-placeholder="结束时间" style="margin-right:1vw;width:480px"
@change="handleDatePickerChange"
:default-time="defaultTime"/>
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>
@ -549,11 +546,10 @@ const getTagText = (state) => {
</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>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
</el-col>
@ -569,39 +565,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'">
@ -617,7 +613,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>
@ -632,8 +628,6 @@ const getTagText = (state) => {
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
@ -660,7 +654,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;
}
@ -692,7 +686,7 @@ const getTagText = (state) => {
padding: 0 0.5vw;
.text {
width: 5vw;
width: 4vw;
font-size: 15px;
}

90
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,
@ -566,34 +566,27 @@ const getMarket = async function () {
<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/>
<el-text class="text" size="large">精网号</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 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"/>
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 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>
@ -604,33 +597,28 @@ const getMarket = async function () {
<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"/>
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' : ''">
:type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 1vw"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 1vw"
:type="activeTimeRange === '7days' ? 'primary' : ''">
: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>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
</el-col>
@ -648,16 +636,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 }}
@ -667,8 +655,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>
@ -689,7 +677,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>
@ -697,23 +685,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'">
@ -729,7 +717,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>
@ -792,7 +780,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;
}
@ -819,7 +807,7 @@ const getMarket = async function () {
padding: 0 0.5vw;
.text {
width: 5vw;
width: 4vw;
font-size: 15px;
}

47
src/views/history/newHistory.vue

@ -1,5 +1,5 @@
<template>
<el-card>
<el-card class="card1">
<el-text size="large">姓名</el-text>
<el-input v-model="searchObj.name" placeholder="请输入姓名" style="width: 12vw;margin-right:1vw"
clearable></el-input>
@ -12,11 +12,11 @@
<el-date-picker v-model="dateRange" type="datetimerange" :default-time="defaultTime" range-separator=""
start-placeholder="开始时间" end-placeholder="结束时间" style="width: 25vw;margin-right:1vw" />
<el-button type="success" @click="resetSearch">重置</el-button>
<el-button type="primary" @click="get">查询</el-button>
<el-button type="success" @click="resetSearch">重置</el-button>
</el-card>
<el-card style="margin-top:10px" v-show="tableData.length > 0">
<el-card class="card2" style="margin-top:10px" v-show="tableData.length > 0">
<el-table :data="tableData" style="width: 82vw;height:60vh">
<el-table-column type="index" label="序号" width="100" header-align="center" align="center">
<template #default="scope">
@ -116,4 +116,43 @@ const handleCurrentChange = function (val) {
}
</script>
<style scoped></style>
<style scoped lang="scss">
.pagination {
display: flex;
margin-top: 1vh;
}
//
.card1 {
background: #F3FAFE;
}
//
.card2 {
background: #E7F4FD;
}
//
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
/* 表头 */
:deep(.el-table__header th) {
background-color: #F3FAFE !important;
}
/* 鼠标悬停 */
:deep(.el-table__row:hover > .el-table__cell) {
background-color: #E5EBFE !important;
}
</style>

47
src/views/history/oldHistory.vue

@ -1,5 +1,5 @@
<template>
<el-card>
<el-card class="card1">
<el-text size="large">姓名</el-text>
<el-input v-model="searchObj.name" placeholder="请输入姓名" style="width: 12vw;margin-right:1vw"
clearable></el-input>
@ -12,11 +12,11 @@
<el-date-picker v-model="dateRange" type="datetimerange" :default-time="defaultTime" range-separator=""
start-placeholder="开始时间" end-placeholder="结束时间" style="width: 25vw;margin-right:1vw" />
<el-button type="success" @click="resetSearch">重置</el-button>
<el-button type="primary" @click="getOld">查询</el-button>
<el-button type="success" @click="resetSearch">重置</el-button>
</el-card>
<el-card style="margin-top:10px" v-show="tableData.length > 0">
<el-card class="card2" style="margin-top:10px" v-show="tableData.length > 0">
<el-table :data="tableData" style="width: 82vw;height:60vh">
<el-table-column type="index" label="序号" width="100" header-align="center" align="center">
<template #default="scope">
@ -114,4 +114,43 @@ const handleCurrentChange = function (val) {
}
</script>
<style scoped></style>
<style scoped lang="scss">
.pagination {
display: flex;
margin-top: 1vh;
}
//
.card1 {
background: #F3FAFE;
}
//
.card2 {
background: #E7F4FD;
}
//
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
/* 表头 */
:deep(.el-table__header th) {
background-color: #F3FAFE !important;
}
/* 鼠标悬停 */
:deep(.el-table__row:hover > .el-table__cell) {
background-color: #E5EBFE !important;
}
</style>

1
src/views/home.vue

@ -180,6 +180,7 @@ function logout() {
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="refreshData()">数据刷新</el-dropdown-item>
<el-dropdown-item @click="message()">查看个人信息</el-dropdown-item>
<el-dropdown-item @click="openChangePassword">修改密码</el-dropdown-item>
<el-dropdown-item @click="logout">退出登录</el-dropdown-item>

34
src/views/permissions/rolePermission.vue

@ -41,7 +41,7 @@ const addRole = ref({
const addRoleMarket = ref([])
const getRoleList = async function (val) {
if(!findMenuById(menuTree.value, permissionMapping.roleManageShow)){
if (!findMenuById(menuTree.value, permissionMapping.roleManageShow)) {
ElMessage.error('无此权限')
return
}
@ -172,7 +172,7 @@ function processTreeData(data) {
}
const handleAddRole = async function () {
if(!findMenuById(menuTree.value, permissionMapping.addRoleInfo)){
if (!findMenuById(menuTree.value, permissionMapping.addRoleInfo)) {
ElMessage.error('无此权限')
return
}
@ -277,10 +277,10 @@ const getLists = async function () {
//
const goldenBeanMenuIds = new Set([
permissionMapping.beanAudit,
permissionMapping.beanRecharge,
permissionMapping.beanConsume,
permissionMapping.beanDetail
permissionMapping.beanAudit,
permissionMapping.beanRecharge,
permissionMapping.beanConsume,
permissionMapping.beanDetail
])
// 15,43,44,45,46,47,//
// 18,52,53,54,//
@ -302,11 +302,11 @@ const filterGoldenBeanMenus = (tree) => {
}
// (????????)
const filterPermission = (tree) => {
return tree.filter(item =>{
if(item.id === permissionMapping.permissionManage){
return tree.filter(item => {
if (item.id === permissionMapping.permissionManage) {
return false
}
else if(item.children && item.children.length > 0){
else if (item.children && item.children.length > 0) {
item.children = filterPermission(item.children)
}
return true
@ -468,7 +468,7 @@ const permissionEditRoleInit = async function (row) {
//
const permissionEditRole = async function () {
if(!findMenuById(menuTree.value, permissionMapping.editRoleInfo)){
if (!findMenuById(menuTree.value, permissionMapping.editRoleInfo)) {
ElMessage.error('无此权限')
return
}
@ -574,7 +574,7 @@ const Rolerules = reactive({
const throttledHandleAddRole = _.throttle(handleAddRole, 5000, {
trailing: false
})
const canLook = findMenuById(menuTree.value,permissionMapping.roleManageShow)
const canLook = findMenuById(menuTree.value, permissionMapping.roleManageShow)
const canAdd = findMenuById(menuTree.value, permissionMapping.addRoleInfo)
const canEdit = findMenuById(menuTree.value, permissionMapping.editRoleInfo)
//
@ -591,15 +591,16 @@ onMounted(async function () {
<el-text size="large">角色名称</el-text>
<el-input v-model="role.name" style="width: 240px" placeholder="请输入角色名称" clearable />
<div style="margin-left: auto;">
<el-button type="success" @click="reset()">重置</el-button>
<el-button type="primary" @click="searchRole()" :disabled="!canLook" v-if="canLook">查询</el-button>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
</el-card>
<el-card class="card2">
<div class="add-item">
<el-button style="color: #048efb; border: 1px solid #048efb" @click="permissionAddInit()" :disabled="!canAdd" v-if="canAdd">新增角色</el-button>
<el-button style="color: #048efb; border: 1px solid #048efb" @click="permissionAddInit()" :disabled="!canAdd"
v-if="canAdd">新增角色</el-button>
</div>
<div>
<el-table :data="roleData" style="width: 100%" show-overflow-tooltip>
@ -612,7 +613,7 @@ onMounted(async function () {
</el-table-column>
<el-table-column prop="roleName" label="角色名称" />
<el-table-column prop="fatherName" label="上级角色" >
<el-table-column prop="fatherName" label="上级角色">
<template #default="scope">
{{ scope.row.fatherName || '-' }}
</template>
@ -626,7 +627,8 @@ onMounted(async function () {
</el-table-column>
<el-table-column prop="operation" label="操作" width="200px">
<template #default="scope">
<el-button type="warning" text @click="permissionEditRoleInit(scope.row)" :disabled="(scope.row.id === 2)|| (scope.row.id === 1) || !canEdit" v-if="canEdit">
<el-button type="warning" text @click="permissionEditRoleInit(scope.row)"
:disabled="(scope.row.id === 2) || (scope.row.id === 1) || !canEdit" v-if="canEdit">
编辑
</el-button>
</template>
@ -740,8 +742,6 @@ onMounted(async function () {
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;

214
src/views/permissions/userPermission.vue

@ -1,16 +1,16 @@
<script setup>
import {computed, onMounted, ref} from 'vue'
import {ElMessage, ElMessageBox} from 'element-plus'
import {InfoFilled} from '@element-plus/icons-vue'
import { computed, onMounted, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { InfoFilled } from '@element-plus/icons-vue'
import _ from 'lodash'
import request from '@/util/http'
import API from '@/util/http'
import {useAdminStore} from "@/store/index.js"
import {storeToRefs} from "pinia"
import {findMenuById, permissionMapping} from "@/utils/menuTreePermission.js"
import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia"
import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js"
const adminStore = useAdminStore()
const {adminData, menuTree} = storeToRefs(adminStore)
const { adminData, menuTree } = storeToRefs(adminStore)
//
const tableData = ref([])
@ -47,23 +47,23 @@ const showStatusConfirm = (row, targetStatus) => {
//
const addUserRules = {
account: [
{required: true, message: '请输入OA号', trigger: 'blur'},
{pattern: /^\d+$/, message: 'OA号必须为数字', trigger: 'blur'},
{max: 20, message: '长度不能超过20位', trigger: 'blur'}
{ required: true, message: '请输入OA号', trigger: 'blur' },
{ pattern: /^\d+$/, message: 'OA号必须为数字', trigger: 'blur' },
{ max: 20, message: '长度不能超过20位', trigger: 'blur' }
],
name: [
{required: true, message: '请输入用户名', trigger: 'blur'},
{max: 20, message: '长度不能超过20位', trigger: 'blur'}
{ required: true, message: '请输入用户名', trigger: 'blur' },
{ max: 20, message: '长度不能超过20位', trigger: 'blur' }
],
market: [
{required: true, message: '请选择所属地区', trigger: 'change'}
{ required: true, message: '请选择所属地区', trigger: 'change' }
],
permission: [
{required: true, message: '请选择角色名称', trigger: 'change'}
{ required: true, message: '请选择角色名称', trigger: 'change' }
],
postiton: [
{required: true, message: '请输入职位', trigger: 'blur'},
{max: 20, message: '长度不能超过20位', trigger: 'blur'}
{ required: true, message: '请输入职位', trigger: 'blur' },
{ max: 20, message: '长度不能超过20位', trigger: 'blur' }
],
machineIds: [
{
@ -216,8 +216,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,
@ -325,7 +325,7 @@ const Ref = ref(null)
const permissionList = ref([])
const getRoles = async function () {
try {
const res = await API({url: '/role/selectAll'})
const res = await API({ url: '/role/selectAll' })
permissionList.value = res.data.map(item => ({
label: item.roleName,
value: item.id
@ -439,7 +439,7 @@ const getUserLists = async function (selectedRoleId) {
parentRoleTip.value = '';
const parentRes = await request({
url: '/role/selectFather',
data: {id: selectedRoleId} // ID
data: { id: selectedRoleId } // ID
});
const parentId = parentRes.data.fatherId;
const parentName = parentRes.data.parentName;
@ -457,7 +457,7 @@ const getUserLists = async function (selectedRoleId) {
// }
const res = await API({
url: '/menu/tree',
data: {id: roleId}
data: { id: roleId }
})
data.value = processTreeData(res.data)
permissionEditObj.value.checkedKeys = collectIds(res.data) || [];
@ -472,11 +472,11 @@ const getUserLists = async function (selectedRoleId) {
//
const editAdminRules = {
market: [
{required: true, message: '请选择所属地区', trigger: 'change'}
{ required: true, message: '请选择所属地区', trigger: 'change' }
],
postiton: [
{required: true, message: '请输入职位', trigger: ['blur', 'change']},
{max: 20, message: '长度不能超过20位', trigger: ['blur', 'change']}
{ required: true, message: '请输入职位', trigger: ['blur', 'change'] },
{ max: 20, message: '长度不能超过20位', trigger: ['blur', 'change'] }
],
machineIds: [
{
@ -501,7 +501,7 @@ const permissionEdit = async function () {
ElMessage.error('无此权限')
return
}
let {adminName: userName, roleName: oldRole, roleId: newRoleId} = permissionEditObj.value;
let { adminName: userName, roleName: oldRole, roleId: newRoleId } = permissionEditObj.value;
if (oldRole == null) {
oldRole = '暂未分配角色'
}
@ -517,15 +517,15 @@ const permissionEdit = async function () {
});
});
await ElMessageBox.confirm(
`确认修改权限角色?<br>您正在将【${userName}】的权限角色从【${oldRole}】修改为【${newRole}】<br>变更后,该用户的可操作权限将同步更新为新角色配置,涉及数据访问、功能操作等权限变化,请谨慎确认。`,
'警告',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: "warning",
lockScroll: false,
dangerouslyUseHTMLString: true // HTML
}
`确认修改权限角色?<br>您正在将【${userName}】的权限角色从【${oldRole}】修改为【${newRole}】<br>变更后,该用户的可操作权限将同步更新为新角色配置,涉及数据访问、功能操作等权限变化,请谨慎确认。`,
'警告',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: "warning",
lockScroll: false,
dangerouslyUseHTMLString: true // HTML
}
)
const result = await request({
url: '/permission/updateAdmin',
@ -544,12 +544,12 @@ const permissionEdit = async function () {
console.log('编辑最后提交数据', permissionEditObj.value);
if (result.code === 200) {
await ElMessageBox.alert(
`用户${userName}的权限角色已更改为【${newRole}`,
'成功',
{
confirmButtonText: '确定',
type: 'success' // success
}
`用户${userName}的权限角色已更改为【${newRole}`,
'成功',
{
confirmButtonText: '确定',
type: 'success' // success
}
);
getPermission();
closeUserEditVisible();
@ -599,7 +599,7 @@ const editStatus = async function (row) {
ElMessage.error('无此权限')
return
}
const {id, account, targetStatus, ...restRow} = currentStatusRow.value
const { id, account, targetStatus, ...restRow } = currentStatusRow.value
try {
statusLoading.value[id] = true
@ -618,7 +618,7 @@ const editStatus = async function (row) {
console.log('请求成功2', result)
if (result.code === 200) {
ElMessage.success(
permissionEditObj.value.adminStatus === 1 ? '启用成功' : '禁用成功'
permissionEditObj.value.adminStatus === 1 ? '启用成功' : '禁用成功'
)
statusLoading.value[id] = false
}
@ -673,8 +673,8 @@ const handleMarketChangeAddUser = (value) => {
if (Array.isArray(value) && value.length > 0) {
//
const selectedMarkets = value
.map(path => Array.isArray(path) && path.length > 0 ? path[path.length - 1] : null)
.filter(Boolean);
.map(path => Array.isArray(path) && path.length > 0 ? path[path.length - 1] : null)
.filter(Boolean);
//
const hasHeadquarters = selectedMarkets.includes('总部');
@ -697,8 +697,8 @@ const handleMarketChangeEditUser = (value) => {
if (Array.isArray(value) && value.length > 0) {
//
const selectedMarkets = value
.map(path => Array.isArray(path) && path.length > 0 ? path[path.length - 1] : null)
.filter(Boolean);
.map(path => Array.isArray(path) && path.length > 0 ? path[path.length - 1] : null)
.filter(Boolean);
//
const hasHeadquarters = selectedMarkets.includes('总部');
@ -915,25 +915,24 @@ onMounted(async function () {
<div class="head-card">
<div class="head-card-element">
<el-text class="mx-1" size="large">OA号</el-text>
<el-input v-model="admin.account" style="width: 240px" placeholder="请输入OA号" clearable/>
<el-input v-model="admin.account" style="width: 240px" placeholder="请输入OA号" clearable />
</div>
<div class="head-card-element" style="margin-left: 50px">
<el-text class="mx-1" size="large">所属地区</el-text>
<el-cascader v-model="admin.market" :options="marketsTree" placeholder="请选择所属地区" clearable
style="width:180px"
@change="handleMarketChange"/>
<el-cascader v-model="admin.market" :options="marketsTree" placeholder="请选择所属地区" clearable style="width:180px"
@change="handleMarketChange" />
</div>
<div class="head-card-element" style="margin-left: 50px">
<el-text class="mx-1" size="large">职位名称</el-text>
<el-select v-model="admin.postiton" placeholder="请选择职位名称" style="width: 240px" clearable>
<el-option v-for="item in postiton" :key="item" :label="item" :value="item"/>
<el-option v-for="item in postiton" :key="item" :label="item" :value="item" />
</el-select>
</div>
<div class="head-card-btn">
<el-button type="success" @click="reset()">重置</el-button>
<el-button type="primary" @click="search()" v-if="canLook">查询</el-button>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
</el-card>
@ -941,7 +940,7 @@ onMounted(async function () {
<!-- 展示表单 -->
<div class="add-item">
<el-button style="color: #048efb; border: 1px solid #048efb" :disabled="!canAdd" v-if="canAdd"
@click="userAddInit()">新增用户
@click="userAddInit()">新增用户
</el-button>
</div>
@ -950,31 +949,31 @@ onMounted(async function () {
<el-table-column type="index" label="序号" width="100px" 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="account" label="OA号"/>
<el-table-column prop="name" label="姓名"/>
<el-table-column prop="market" label="所属地区"/>
<el-table-column prop="postiton" label="职位"/>
<el-table-column prop="account" label="OA号" />
<el-table-column prop="name" label="姓名" />
<el-table-column prop="market" label="所属地区" />
<el-table-column prop="postiton" label="职位" />
<el-table-column prop="roleName" label="部门权限">
</el-table-column>
<el-table-column prop="remark" label="备注"/>
<el-table-column prop="remark" label="备注" />
<el-table-column prop="operation" label="操作" width="280px">
<template #default="scope">
<el-button type="warning" text :disabled="!canReset" @click="resetPassword(scope.row)" v-if="canReset">
重置密码
</el-button>
<el-button type="primary" text @click="permissionEditInit(scope.row)" v-if="canEdit"
:disabled="!canEdit || scope.row.adminStatus === 0 || scope.row.account === adminData.account">
:disabled="!canEdit || scope.row.adminStatus === 0 || scope.row.account === adminData.account">
修改权限
</el-button>
<el-popconfirm title="确定将此用户删除吗?" @confirm="delConfirm">
<template #reference>
<el-button type="danger" text @click="del(scope.row)" v-if="canDel"
:disabled="!canDel ||scope.row.adminStatus === 0 || scope.row.account === adminData.account">
:disabled="!canDel || scope.row.adminStatus === 0 || scope.row.account === adminData.account">
删除
</el-button>
</template>
@ -990,20 +989,19 @@ onMounted(async function () {
<el-table-column prop="adminStatus" label="状态">
<template #default="scope">
<el-switch :model-value="scope.row.adminStatus" :active-value="1" :inactive-value="0" size="large"
v-if="change"
:disabled="!change || scope.row.account === adminData.account || statusLoading[scope.row.id]"
@change="(targetStatus) => showStatusConfirm(scope.row, targetStatus)" style="
v-if="change"
:disabled="!change || scope.row.account === adminData.account || statusLoading[scope.row.id]"
@change="(targetStatus) => showStatusConfirm(scope.row, targetStatus)" style="
--el-switch-on-color: #13ce66;
--el-switch-off-color: #ff4949;
" active-text="启用" inactive-text="禁用" inline-prompt/>
" active-text="启用" inactive-text="禁用" inline-prompt />
</template>
</el-table-column>
</el-table>
<div class="pagination" style="margin-top: 1vh;">
<el-pagination background :page-size="getObj.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
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>
</div>
</el-card>
@ -1011,47 +1009,45 @@ onMounted(async function () {
<!-- 新增用户权限 -->
<el-dialog v-model="userAddVisible" title="新增用户权限" width="800px" :close-on-click-modal="false"
@close="handleDialogClose">
@close="handleDialogClose">
<template #footer>
<el-form ref="Ref" :rules="addUserRules" :model="addAdmin" label-width="auto"
style="max-width: 600px; align-items: center">
style="max-width: 600px; align-items: center">
<el-form-item prop="account" label="OA号:" required clearable>
<el-input v-model="addAdmin.account" placeholder="请输入OA号" style="width: 220px"/>
<el-input v-model="addAdmin.account" placeholder="请输入OA号" style="width: 220px" />
</el-form-item>
<el-form-item prop="name" label="用户名:" required clearable>
<el-input v-model="addAdmin.name" placeholder="请输入用户名" style="width: 220px"/>
<el-input v-model="addAdmin.name" placeholder="请输入用户名" style="width: 220px" />
</el-form-item>
<el-form-item prop="market" label="所属地区:" required clearable>
<el-cascader v-model="addAdmin.market" :options="marketsTree" placeholder="请选择所属地区" clearable
collapse-tags
collapse-tags-tooltip style="width:220px" @change="handleMarketChangeAddUser"
:max-collapse-tags="2"
:props="addUserProps"/>
<el-cascader v-model="addAdmin.market" :options="marketsTree" placeholder="请选择所属地区" clearable collapse-tags
collapse-tags-tooltip style="width:220px" @change="handleMarketChangeAddUser" :max-collapse-tags="2"
:props="addUserProps" />
</el-form-item>
<el-form-item prop="permission" label="角色名称:" required>
<el-select v-model="addAdmin.permission" placeholder="请选择角色名称" style="width: 220px" clearable>
<el-option v-for="item in permissionList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="postiton" label="职位:" required>
<el-input v-model="addAdmin.postiton" placeholder="请输入职位" style="width: 220px" clearable/>
<el-input v-model="addAdmin.postiton" placeholder="请输入职位" style="width: 220px" clearable />
</el-form-item>
<el-form-item prop="machineIds" label="机器码:" required>
<div style="display: flex; align-items: center; flex-wrap: wrap; gap: 10px;">
<!-- 动态添加的机器码输入框 -->
<div v-for="(item, index) in addAdmin.machineIds" :key="index">
<el-input v-model="addAdmin.machineIds[index]" placeholder="请输入机器码"
style="width: 220px; margin-right: 10px;"/>
style="width: 220px; margin-right: 10px;" />
</div>
<el-button type="primary" @click="addMachineIdInput">添加</el-button>
</div>
</el-form-item>
<el-form-item prop="remark" label="备注">
<el-input v-model="addAdmin.remark" style="width: 300px" :rows="2" maxlength="100" show-word-limit
type="textarea"/>
type="textarea" />
</el-form-item>
</el-form>
@ -1067,40 +1063,38 @@ onMounted(async function () {
<!-- 这是编辑用户权限弹窗 -->
<el-dialog v-model="userEditVisible" title="编辑用户权限" width="800px" :close-on-click-modal="false">
<el-form ref="Ref" :rules="editAdminRules" :model="permissionEditObj" label-width="auto"
style="max-width: 600px; align-items: center">
style="max-width: 600px; align-items: center">
<el-form-item prop="account" label="用户账号:" clearable>
<el-input v-model="permissionEditObj.account" placeholder="请输入OA号" style="width: 220px" disabled/>
<el-input v-model="permissionEditObj.account" placeholder="请输入OA号" style="width: 220px" disabled />
</el-form-item>
<el-form-item prop="name" label="用户名称:">
<el-input v-model="permissionEditObj.adminName" placeholder="请输入用户名" style="width: 220px" disabled/>
<el-input v-model="permissionEditObj.adminName" placeholder="请输入用户名" style="width: 220px" disabled />
</el-form-item>
<el-form-item prop="market" label="所属地区:" clearable>
<el-cascader v-model="permissionEditObj.market" :options="marketsTree" placeholder="请选择所属地区" clearable
collapse-tags collapse-tags-tooltip style="width:220px" @change="handleMarketChangeEditUser"
:max-collapse-tags="2" :props="editUserProps"/>
collapse-tags collapse-tags-tooltip style="width:220px" @change="handleMarketChangeEditUser"
:max-collapse-tags="2" :props="editUserProps" />
</el-form-item>
<el-form-item prop="postiton" label="职位:">
<el-input v-model="permissionEditObj.postiton" placeholder="请输入职位" style="width: 220px" clearable/>
<el-input v-model="permissionEditObj.postiton" placeholder="请输入职位" style="width: 220px" clearable />
</el-form-item>
<el-form-item prop="roleName" label="角色名称:">
<el-select v-model="permissionEditObj.roleId" placeholder="请选择角色" style="width: 220px"
@change="getUserLists">
<el-select v-model="permissionEditObj.roleId" placeholder="请选择角色" style="width: 220px" @change="getUserLists">
<el-option v-for="item in permissionList" :key="item.value" :label="item.label"
:value="item.value"></el-option>
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="parentName" label="上级角色:">
<el-select v-model="permissionEditObj.parentId" placeholder="无上级角色" :disabled="!!parentRoleTip"
style="width: 220px">
<el-option v-if="parentRoleTip" :key="0" :label="parentRoleTip" :value="null" disabled/>
style="width: 220px">
<el-option v-if="parentRoleTip" :key="0" :label="parentRoleTip" :value="null" disabled />
<el-option v-else v-for="item in permissionList" :key="item.value" :label="item.label" disabled
:value="item.value"></el-option>
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="permissionSelect" label="权限列表:">
<el-tree v-if="data.length > 0" :data="data" :disabled="true" show-checkbox node-key="id"
:props="{ label: 'menuName', children: 'children' }"
:default-checked-keys="permissionEditObj.checkedKeys">
:props="{ label: 'menuName', children: 'children' }" :default-checked-keys="permissionEditObj.checkedKeys">
</el-tree>
<div v-else style="display: flex; align-items: center; gap: 8px;">
<span style="color: #999;">暂无数据</span>
@ -1111,7 +1105,7 @@ onMounted(async function () {
<!-- 动态添加的机器码输入框 -->
<div v-for="(item, index) in permissionEditObj.machineIds" :key="index">
<el-input v-model="permissionEditObj.machineIds[index]" placeholder=""
style="width: 220px; margin-right: 10px;"/>
style="width: 220px; margin-right: 10px;" />
</div>
<el-button type="primary" @click="UseraddMachineIdInput">添加</el-button>
</div>
@ -1131,11 +1125,11 @@ onMounted(async function () {
<!-- 重置密码确认弹窗 -->
<el-dialog v-model="resetConfirmVisible" width="500px" :close-on-click-modal="false"
:before-close="cancelResetPassword">
:before-close="cancelResetPassword">
<el-row>
<el-col :span="4" style="margin-top: 20px">
<el-icon class="dialog-icon" color="#10AEFF" size="50">
<InfoFilled/>
<InfoFilled />
</el-icon>
</el-col>
<el-col :span="20">
@ -1152,17 +1146,14 @@ onMounted(async function () {
</template>
</el-dialog>
<el-dialog v-model="ackVisible" width="700px"
:close-on-click-modal="false"
:style="{
backgroundImage: 'url(/src/assets/SvgIcons/背景.svg',
backgroundSize: 'cover',
backgroundPosition: 'center',
height:'400px'
}"
@close="() => { if (currentStatusRow) currentStatusRow.adminStatus = currentStatusRow.adminStatus === 1 ? 0 : 1 }">
<div class="status-confirm-content"
>
<el-dialog v-model="ackVisible" width="700px" :close-on-click-modal="false" :style="{
backgroundImage: 'url(/src/assets/SvgIcons/背景.svg',
backgroundSize: 'cover',
backgroundPosition: 'center',
height: '400px'
}"
@close="() => { if (currentStatusRow) currentStatusRow.adminStatus = currentStatusRow.adminStatus === 1 ? 0 : 1 }">
<div class="status-confirm-content">
将要{{ currentStatusRow?.adminStatus === 1 ? '禁用' : '启用' }}该用户
<br>
</div>
@ -1186,7 +1177,6 @@ onMounted(async function () {
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
@ -1202,7 +1192,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;
}

110
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'
@ -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;
@ -354,26 +354,22 @@ onMounted(async function () {
<div class="select">
<div class="selectRow">
<el-text class="text" size="large">精网号</el-text>
<el-input class="selectContent" v-model="selectData.jwcode" placeholder="请输入精网号"
clearable/>
<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 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/>
<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 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>
@ -383,28 +379,26 @@ onMounted(async function () {
<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"/>
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' : ''">
: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>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
</el-col>
@ -419,16 +413,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>
@ -447,14 +441,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'">
@ -470,7 +464,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>
@ -484,8 +478,6 @@ onMounted(async function () {
</el-dialog>
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
@ -512,7 +504,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;
}

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

@ -1,5 +1,5 @@
<template>
<div class="father">
<div style="height: 4vh;">
<el-button-group>
<el-button
class="no-active-btn"
@ -101,6 +101,8 @@ onMounted(() => {
<style scoped lang="scss">
/* 自定义按钮组布局 */
.custom-button-group {
display: flex;
margin-bottom: 16px;

99
src/views/recharge/bean/beanSystemRecharge.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'
@ -78,15 +78,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'
@ -97,15 +97,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'
@ -116,15 +116,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'
@ -239,7 +239,7 @@ const exportExcel = async () => {
},
}
try {
const res = await API({url: '/export/exportBean', data: params})
const res = await API({ url: '/export/exportBean', data: params })
console.log('系统充值导出的参数为:', params);
if (res.code === 200) {
@ -268,7 +268,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 === 9;
@ -341,13 +341,12 @@ onMounted(async function () {
<div class="select">
<div class="selectRow">
<el-text class="text" size="large">精网号</el-text>
<el-input class="selectContent" v-model="selectData.jwcode" placeholder="请输入精网号"
clearable/>
<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-option v-for="item in market" :key="item" :label="item" :value="item" />
</el-select>
</div>
</div>
@ -357,26 +356,25 @@ onMounted(async function () {
<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"/>
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' : ''">
:type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
</el-button>
</div>
</div>
<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>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</el-col>
</el-card>
@ -390,17 +388,17 @@ onMounted(async function () {
<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>
<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 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') }}
@ -412,14 +410,14 @@ onMounted(async function () {
<!-- 分页 -->
<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>
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="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'">
@ -435,7 +433,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>
@ -484,7 +482,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;
}
@ -520,5 +518,4 @@ onMounted(async function () {
}
}
}
</style>

93
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)
@ -207,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)
@ -215,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('活动数据格式错误,请联系管理员')
@ -246,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,
@ -279,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('充值方式格式错误,请联系管理员')
@ -334,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
@ -494,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 {
@ -522,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
@ -589,26 +589,23 @@ const getTagText = (state) => {
<div class="select">
<div class="selectRow">
<el-text class="text" size="large">精网号</el-text>
<el-input class="selectContent" v-model="rechargeUser.jwcode" placeholder="请输入精网号"
clearable/>
<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 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"/>
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-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>
@ -617,32 +614,29 @@ const getTagText = (state) => {
<el-col>
<div class="select">
<div class="selectRow" style="width: 36vw;">
<el-text class="text" size="large">充值时间</el-text>
<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"/>
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' : ''">
:type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 1vw"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 1vw"
:type="activeTimeRange === '7days' ? 'primary' : ''">
: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>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
@ -662,21 +656,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>
@ -684,7 +678,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') }}
@ -696,15 +690,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'">
@ -720,7 +714,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>
@ -734,7 +728,6 @@ const getTagText = (state) => {
</el-dialog>
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
@ -761,7 +754,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;
}

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

@ -14,7 +14,7 @@ import dayjs from "dayjs";
const adminStore = useAdminStore();
const { adminData, menuTree } = storeToRefs(adminStore);
const showEmployeeData = ref(false)
const canLook = findMenuById(menuTree.value,permissionMapping.coinRefundDetail)
const canLook = findMenuById(menuTree.value, permissionMapping.coinRefundDetail)
const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
@ -161,7 +161,7 @@ const getSelectBy = async function (val) {
refundUser: { ...refundUser.value, flag: showEmployeeData.value ? 0 : 1 }
}
})
console.log('===============================',refundUser.value)
console.log('===============================', refundUser.value)
// refundUser.value
const detailWithoutSort = {
...refundUser.value,
@ -309,7 +309,7 @@ const getGoods = async function () {
//
onMounted(async function () {
console.log('=======',adminData.value)
console.log('=======', adminData.value)
await getSelectBy()
await getMarket()
await getRefundTypes()
@ -499,57 +499,63 @@ const getMarket = async function () {
</script>
<template>
<el-card class="card1" style="margin-bottom: 1vh;">
<div class="condition">
<div style="display: flex;align-items: center;width:18vw">
<el-text>精网号</el-text>
<el-input v-model="refundUser.jwcode" placeholder="请输入精网号" style="width: 10vw;" clearable />
</div>
<div style="display: flex;align-items: center;width:18vw">
<el-text>商品名称</el-text>
<el-select v-model="refundUser.goodsName" placeholder="请选择商品名称" style="width: 10vw;" clearable filterable>
<el-option v-for="item in goods" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div style="display: flex;align-items: center;width:18vw">
<el-text size="large">所属地区</el-text>
<el-cascader v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区" clearable style="width:10vw"
@change="handleMarketChange" />
</div>
<div style="display: flex;align-items: center;width:18vw">
<el-text>退款类型</el-text>
<el-select v-model="refundUser.refundType" placeholder="请选择退款类型" style="width: 10vw" clearable>
<el-option v-for="item in refundType" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div>
<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="refundUser.jwcode" placeholder="请输入精网号" style="width: 10vw;"
clearable />
</div>
<div class="selectRow">
<el-text class="text" size="large">商品名称</el-text>
<el-select class="selectContent" v-model="refundUser.goodsName" placeholder="请选择商品名称" style="width: 10vw;"
clearable filterable>
<el-option v-for="item in goods" :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 style="width:10vw" @change="handleMarketChange" />
</div>
<div class="selectRow">
<el-text size="large">退款类型</el-text>
<el-select class="selectContent" v-model="refundUser.refundType" placeholder="请选择退款类型" style="width: 10vw"
clearable>
<el-option v-for="item in refundType" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox>
</div>
</div>
<div>
<el-col :span="24">
<div>
<el-text>退款时间</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: 10px" :type="activeTimeRange === 'today' ? 'primary' : ''">
</el-col>
<el-col>
<div class="select">
<div class="selectRow" style="width: 35vw">
<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: 20vw;" @change="handleDatePickerChange"
:default-time="defaultTime" :disabled-date="disabledDate" />
<el-button @click="getToday()" style="margin-left: 0.3vw"
:type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 10px"
<el-button @click="getYesterday()" style="margin-left: 0.3vw"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 10px" :type="activeTimeRange === '7days' ? 'primary' : ''">
<el-button @click="get7Days()" style="margin-left: 0.3vw"
:type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
</el-button>
<el-button type="success" @click="reset()">重置</el-button>
</div>
<div class="selectRow" style="justify-content: flex-start;">
<el-button type="primary" @click="search()" v-if="canLook">查询</el-button>
<el-button type="primary" @click="exportExcel">导出Excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</el-col>
</div>
</div>
</el-col>
</el-card>
<el-card class="card2">
@ -560,8 +566,8 @@ const getMarket = async function () {
任务金币{{ format3(Math.abs(taskGolds).toFixed(2)) }}
</div>
<!-- 设置表格容器的高度和滚动样式 -->
<div style="height: 58vh; overflow-y: auto;">
<el-table :data="tableData" style="width: 82vw;" @sort-change="handleSortChange">
<div style="height: 58vh; ">
<el-table :data="tableData" style="height: 57vh" @sort-change="handleSortChange">
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<span>{{
@ -574,10 +580,9 @@ const getMarket = async function () {
<el-table-column prop="jwcode" label="精网号" fixed="left" width="110px" />
<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="110px" show-overflow-tooltip />
<el-table-column prop="refundType" label="退款类型" width="100px" />
<el-table-column prop="refundModel" label="退款方式" width="110px">
<el-table-column prop="refundModel" label="退款方式" width="110px">
<template #default="scope">
{{ scope.row.refundModel === 0 ? '全部退款' : scope.row.refundModel === 1 ? '部分退款' : '' }}
</template>
@ -638,8 +643,6 @@ const getMarket = async function () {
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;
@ -681,9 +684,25 @@ const getMarket = async function () {
background-color: #E5EBFE !important;
}
.condition{
/** 搜索的样式 */
.select {
display: flex;
width:82vw;
margin-bottom: 0.5vh;
.selectRow {
width: 17vw;
display: flex;
align-items: center;
justify-content: center;
padding: 0 0.5vw;
.text {
width: 4vw;
font-size: 15px;
}
.selectContent {
flex: 1;
}
}
}
</style>

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

@ -8,8 +8,8 @@
</el-select>
<div style="float: right;">
<el-button type="success" @click="reset">重置</el-button>
<el-button type="primary" @click="search">查询</el-button>
<el-button type="success" @click="reset">重置</el-button>
</div>
</el-card>
@ -21,15 +21,15 @@
消费金豆总数{{ format3(stats.consumeSum) }}金豆&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<el-table :data="tableData" height="65vh" @sort-change="handleSortChange" :row-style="{ height: '60px' }">
<el-table-column type="index" label="序号" width="100px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize
}}</span>
</template>
<el-table-column type="index" label="序号" width="80px" fixed="left">
<template #default="scope">
<span>{{
scope.$index + 1 + (pagination.pageNum - 1) * pagination.pageSize
}}</span>
</template>
</el-table-column>
<el-table-column label="姓名" style="width: 120px;" prop="name" show-overflow-tooltip />
<el-table-column label="精网号" style="width: 120px;" prop="jwcode" />
<el-table-column label="精网号" style="width: 110px;" prop="jwcode" />
<el-table-column label="所属地区" style="width: 120px;" prop="dept" />
<el-table-column label="现有金豆" style="width: 120px;" prop="beanNum" sortable="custom" />
<el-table-column label="免费金豆" style="width: 120px;" prop="freeBean" sortable="custom" />
@ -37,10 +37,13 @@
<el-table-column label="历史消费" style="width: 120px;" prop="totalCostBean" sortable="custom" />
</el-table>
<el-pagination class="pagination" v-model:current-page="pagination.pageNum"
v-model:page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
<div class="pagination">
<el-pagination background v-model:current-page="pagination.pageNum"
v-model:page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total" @size-change="handlePageSizeChange"
@current-change="handleCurrentChange"></el-pagination>
</div>
</el-card>
</template>
@ -76,13 +79,13 @@ const pagination = ref({
const get = async function () {
try {
trim()
if(searchObj.value.jwcode){
const numRef = /^\d{1,9}$/;
if(!numRef.test(searchObj.value.jwcode)){
ElMessage.error('请检查精网号格式')
return
if (searchObj.value.jwcode) {
const numRef = /^\d{1,9}$/;
if (!numRef.test(searchObj.value.jwcode)) {
ElMessage.error('请检查精网号格式')
return
}
}
}
const params = {
beanUser: { //
jwcode: searchObj.value.jwcode, //
@ -107,27 +110,27 @@ const get = async function () {
}
const getStats = async () => {
try {
const params = {
beanUser:{
jwcode: searchObj.value.jwcode,
dept: searchObj.value.dept
}
try {
const params = {
beanUser: {
jwcode: searchObj.value.jwcode,
dept: searchObj.value.dept
}
const res = await API({
url: '/beanUser/userBeanSum',
data: params
})
stats.value.sumBean = res.data.sumBean
stats.value.permanentBean = res.data.permanentBean
stats.value.freeBean = res.data.freeBean
stats.value.consumeSum = res.data.consumeSum
console.log('see see stats和搜索对象', stats.value, params)
} catch (error) {
console.log('请求失败', error)
}
const res = await API({
url: '/beanUser/userBeanSum',
data: params
})
stats.value.sumBean = res.data.sumBean
stats.value.permanentBean = res.data.permanentBean
stats.value.freeBean = res.data.freeBean
stats.value.consumeSum = res.data.consumeSum
console.log('see see stats和搜索对象', stats.value, params)
} catch (error) {
console.log('请求失败', error)
}
}
const handleSortChange = (column) => {
if (column.prop === 'beanNum') {
searchObj.value.sortField = 'jinbi'
@ -141,7 +144,7 @@ const handleSortChange = (column) => {
searchObj.value.sortField = ''
}
searchObj.value.sortOrder = column.order === 'ascending' ? 'asc' : 'desc'
console.log('排序字段:', searchObj.value.sortField,'排序方式:', searchObj.value.sortOrder)
console.log('排序字段:', searchObj.value.sortField, '排序方式:', searchObj.value.sortOrder)
search()
}
const getmarkets = async () => {
@ -189,32 +192,31 @@ onMounted(() => {
</script>
<style scoped lang="scss">
.pagination {
display: flex;
margin-top: 1vh;
display: flex;
margin-top: 1vh;
}
//
.card1 {
background: #F3FAFE;
background: #F3FAFE;
}
//
.card2 {
background: #E7F4FD;
background: #E7F4FD;
}
//
.goldStatistics {
margin-left: 1vw;
margin-bottom: 1vh;
color: #000000;
font-family: "PingFang SC";
font-size: 16px;
font-style: normal;
font-weight: 700;
line-height: 20px;
margin-left: 1vw;
margin-bottom: 1vh;
color: #000000;
font-family: "PingFang SC";
font-size: 16px;
font-style: normal;
font-weight: 700;
line-height: 20px;
}
//
@ -223,17 +225,16 @@ onMounted(() => {
:deep(.el-table__cell),
/* 表格 */
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
}
/* 表头 */
:deep(.el-table__header th) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
}
/* 鼠标悬停 */
:deep(.el-table__row:hover > .el-table__cell) {
background-color: #E5EBFE !important;
background-color: #E5EBFE !important;
}
</style>

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

@ -397,9 +397,9 @@ const format3 = (num) => {
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox>
</div>
<el-button type="primary" @click="search()">查询</el-button>
<el-button @click="reset" type="success">重置</el-button>
<el-button type="primary" @click="exportExcel()">导出Excel</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button @click="reset" type="success">重置</el-button>
</div>
<!-- </div> -->
</el-card>
@ -544,7 +544,6 @@ const format3 = (num) => {
</template>
<style scoped lang="scss">
//
.card1 {
background: #F3FAFE;

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

@ -1,10 +1,10 @@
<script setup>
import {onMounted, ref} from 'vue'
import { onMounted, ref } from 'vue'
import {ElMessage} from 'element-plus'
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";
import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia"
@ -54,7 +54,7 @@ const getPlatform = async () => {
method: 'post',
})
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('平台信息格式错误,请联系管理员')
@ -120,7 +120,7 @@ const getObj = ref({
// ===========================================================================
//
const get = async function (val) {
if(!findMenuById(menuTree.value, permissionMapping.coinCustomerDetail)){
if (!findMenuById(menuTree.value, permissionMapping.coinCustomerDetail)) {
ElMessage.error('无此权限')
return
}
@ -143,7 +143,7 @@ const get = async function (val) {
console.log('jwcode 类型:', typeof goldDetail.value.jwcode);
console.log('jwcode 值:', goldDetail.value.jwcode);
const requestData = {...getObj.value, goldDetail: {...goldDetail.value}};
const requestData = { ...getObj.value, goldDetail: { ...goldDetail.value } };
console.log('最终请求参数', JSON.stringify(requestData, null, 2)); //
// markets''''
@ -165,7 +165,7 @@ const get = async function (val) {
const result = await API({
url: '/goldDetail/getGoldDetail',
method: 'post',
data: {...getObj.value, goldDetail: {...goldDetail.value, flag: showEmployeeData.value ? 0 : 1}}
data: { ...getObj.value, goldDetail: { ...goldDetail.value, flag: showEmployeeData.value ? 0 : 1 } }
})
console.log('响应数据', result)
tableData.value = result.data.list
@ -174,7 +174,7 @@ const get = async function (val) {
url: '/goldDetail/getTotal',
method: 'post',
data: {
goldDetail: {...goldDetail.value, flag: showEmployeeData.value ? 0 : 1},
goldDetail: { ...goldDetail.value, flag: showEmployeeData.value ? 0 : 1 },
/* jwcode: goldDetail.value.jwcode || '',
payPlatform: goldDetail.value.payPlatform || '',
type: goldDetail.value.type || '',
@ -304,7 +304,7 @@ const exportExcel = async function () {
},
}
const res = await API({url: '/goldDetail/export', data: params})
const res = await API({ url: '/goldDetail/export', data: params })
if (res.code === 200) {
ElMessage.success('导出成功')
}
@ -345,7 +345,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 === 0; //0
@ -436,8 +436,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,
@ -460,71 +460,64 @@ const format3 = (num) => {
</script>
<template>
<div>
<el-card class="card1" style="margin-bottom: 1vh;">
<el-row style="margin-bottom: 10px">
<el-col :span="5">
<div class="head-card-element">
<el-text class="mx-1" size="large">精网号</el-text>
<el-input v-model="goldDetail.jwcode" style="width: 150px" placeholder="请输入精网号" clearable/>
<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="goldDetail.jwcode" placeholder="请输入精网号" clearable />
</div>
</el-col>
<el-col :span="5">
<div class="head-card-element">
<el-text class="mx-1" size="large">平台信息</el-text>
<el-select v-model="goldDetail.payPlatform" placeholder="请选择平台信息" style="width: 160px" clearable
:loading="isLoadingPlatform">
<el-option v-for="item in platform" :key="item.id" :label="item.label" :value="item.value"/>
<div class="selectRow">
<el-text class="text" size="large">平台信息</el-text>
<el-select class="selectContent" v-model="goldDetail.payPlatform" placeholder="请选择平台信息" style="width: 10vw;"
clearable :loading="isLoadingPlatform">
<el-option v-for="item in platform" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</div>
</el-col>
<el-col :span="5">
<div class="head-card-element">
<el-text class="mx-1" size="large">数量更新类型</el-text>
<el-select v-model="goldDetail.type" placeholder="请选择更新类型" style="width: 160px" clearable>
<el-option v-for="item in type" :key="item.value" :label="item.label" :value="item.value"/>
<div class="selectRow">
<el-text class="textB" size="large">数量更新类型</el-text>
<el-select v-model="goldDetail.type" placeholder="请选择更新类型" clearable>
<el-option v-for="item in type" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</el-col>
<el-col :span="5">
<div class="head-card-element">
<el-text class="mx-1" size="large">所属地区</el-text>
<el-cascader
v-model="selectedMarketPath"
:options="markets"
placeholder="请选择所属地区"
clearable
style="width:180px"
@change="handleMarketChange"
/>
<div class="selectRow">
<el-text class="text" size="large">所属地区</el-text>
<el-cascader class="selectContent" v-model="selectedMarketPath" :options="markets" placeholder="请选择所属地区"
style="width:10vw" clearable @change="handleMarketChange" />
</div>
</el-col>
<el-col :span="3">
<div class="head-card-element">
<div>
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox>
</div>
</el-col>
</el-row>
<div class="head-card-element">
<el-text class="mx-1" size="large">更新时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator="" start-placeholder="起始时间"
end-placeholder="结束时间" style="width: 400px" @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>
</div>
</el-col>
<el-col>
<div class="select">
<div class="selectRow" style="width: 35vw">
<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: 20vw" @change="handleDatePickerChange"
:default-time="defaultTime" :disabled-date="disabledDate" />
<el-button @click="getToday()" style="margin-left: 0.3vw"
:type="activeTimeRange === 'today' ? 'primary' : ''">
</el-button>
<el-button @click="getYesterday()" style="margin-left: 0.3vw"
:type="activeTimeRange === 'yesterday' ? 'primary' : ''">
</el-button>
<el-button @click="get7Days()" style="margin-left: 0.3vw"
:type="activeTimeRange === '7days' ? 'primary' : ''">
近7天
</el-button>
</div>
<div class="selectRow" style="justify-content: flex-start;">
<el-button type="primary" @click="search()">查询</el-button>
<el-button type="primary" @click="exportExcel">导出Excel表格</el-button>
<el-button type="primary" @click="openExportList">查看导出列表</el-button>
<el-button type="success" @click="reset()">重置</el-button>
</div>
</div>
</el-col>
</el-card>
<el-card class="card2">
<div class="goldStatistics">
@ -534,19 +527,19 @@ const format3 = (num) => {
任务金币{{ format3(totalTaskGold || 0) }}&nbsp;&nbsp;
<a style="color:#b1b1b1; font-size: small;">当前合计仅显示筛选范围内的金币净变化充值总额 - 消费总额 + 退款总额)</a>
</div>
<div style="height: 55vh; overflow-y: auto">
<el-table :data="tableData" style="width: 82vw" @sort-change="handleSortChange" height="55vh">
<el-table-column type="index" label="序号" width="100px" fixed="left">
<div style="height: 58vh; ">
<el-table :data="tableData" style="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>
<span>{{
scope.$index + 1 + (getObj.pageNum - 1) * getObj.pageSize
}}</span>
</template>
</el-table-column>
<el-table-column fixed="left" prop="name" label="姓名" width="150" show-overflow-tooltip/>
<el-table-column fixed="left" prop="jwcode" label="精网号" width="120"/>
<el-table-column prop="market" label="所属地区" width="120"/>
<el-table-column prop="payPlatform" label="平台信息" width="140"/>
<el-table-column fixed="left" prop="name" label="姓名" width="150" show-overflow-tooltip />
<el-table-column fixed="left" prop="jwcode" label="精网号" width="120" />
<el-table-column prop="market" label="所属地区" width="120" />
<el-table-column prop="payPlatform" label="平台信息" width="140" />
<el-table-column prop="type" label="更新类型" width="110">
<template #default="scope">
<span v-if="scope.row.type === 0">充值</span>
@ -577,30 +570,29 @@ const format3 = (num) => {
<span>{{ (scope.row.taskGold || 0) }}</span>
</template>
</el-table-column>
<el-table-column prop="adminName" label="提交人" width="110"/>
<el-table-column prop="adminName" label="提交人" width="110" />
<el-table-column prop="auditTime" sortable="custom" label="更新时间" width="210" show-overflow-tooltip>
<template #default="scope">
<span>{{
moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss')
}}</span>
<span>{{
moment(scope.row.auditTime).format('YYYY-MM-DD HH:mm:ss')
}}</span>
</template>
</el-table-column>
</el-table>
</div>
<!-- 此处分页 -->
<div class="pagination" style="margin-top: 20px;display: flex;">
<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'">
@ -616,7 +608,7 @@ const format3 = (num) => {
<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>
@ -633,6 +625,10 @@ const format3 = (num) => {
<style scoped lang="scss">
.pagination {
display: flex;
margin-top: 1vh;
}
//
.card1 {
@ -679,4 +675,31 @@ const format3 = (num) => {
display: flex;
justify-content: flex-end;
}
/** 搜索的样式 */
.select {
display: flex;
.selectRow {
width: 17vw;
display: flex;
align-items: center;
justify-content: center;
padding: 0 0.5vw;
.text {
width: 4vw;
font-size: 15px;
}
.textB {
width: 9vw;
font-size: 15px;
}
.selectContent {
flex: 1;
}
}
}
</style>
Loading…
Cancel
Save