|
@ -1,38 +1,51 @@ |
|
|
<template> |
|
|
<template> |
|
|
<el-card style="margin-bottom: 0.5vh;"> |
|
|
<el-card style="margin-bottom: 0.5vh;"> |
|
|
<el-col style="margin-bottom: 0.5vh"> |
|
|
|
|
|
<el-text size="large">精网号:</el-text> |
|
|
|
|
|
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" style="width: 12vw;margin-right:1vw" clearable/> |
|
|
|
|
|
|
|
|
|
|
|
<el-text size="large">商品名称:</el-text> |
|
|
|
|
|
<el-select v-model="searchForm.goodsName" placeholder="请输入商品名称" style="width: 12vw;margin-right:1vw" |
|
|
|
|
|
clearable> |
|
|
|
|
|
|
|
|
<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="searchForm.jwcode" placeholder="请输入精网号" clearable /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="selectRow"> |
|
|
|
|
|
<el-text class="text" size="large">商品名称:</el-text> |
|
|
|
|
|
<el-select class="selectContent" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable> |
|
|
<el-option v-for="item in refundGoodsOptions" :key="item" :label="item" :value="item"></el-option> |
|
|
<el-option v-for="item in refundGoodsOptions" :key="item" :label="item" :value="item"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
|
|
|
|
|
|
<el-text size="large">退款类型:</el-text> |
|
|
|
|
|
<el-select v-model="searchForm.refundType" placeholder="请选择" style="width: 12vw;margin-right:1vw" clearable> |
|
|
|
|
|
<el-option label="商品退款" value="商品退款"/> |
|
|
|
|
|
<el-option label="金币退款" value="金币退款"/> |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
<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-select> |
|
|
</el-select> |
|
|
|
|
|
|
|
|
<el-text size="large">所属地区:</el-text> |
|
|
|
|
|
<el-cascader v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区" clearable |
|
|
|
|
|
style="width:12vw" |
|
|
|
|
|
@change="handleMarketChange"/> |
|
|
|
|
|
|
|
|
</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" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col> |
|
|
<el-col> |
|
|
<el-text size="large"> |
|
|
|
|
|
|
|
|
<div class="select"> |
|
|
|
|
|
<div class="selectRow" style="width: 36vw;"> |
|
|
|
|
|
<el-text class="text" size="large"> |
|
|
{{ activeName === 'wait' ? '提交时间:' : '审核时间:' }} |
|
|
{{ activeName === 'wait' ? '提交时间:' : '审核时间:' }} |
|
|
</el-text> |
|
|
</el-text> |
|
|
<el-date-picker 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"/> |
|
|
|
|
|
|
|
|
<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" /> |
|
|
|
|
|
<div v-if="false"> |
|
|
<el-button @click="getToday()" :type="activeTimeRange === 'today' ? 'primary' : ''">今</el-button> |
|
|
<el-button @click="getToday()" :type="activeTimeRange === 'today' ? 'primary' : ''">今</el-button> |
|
|
<el-button @click="getYesterday()" :type="activeTimeRange === 'yesterday' ? 'primary' : ''">昨</el-button> |
|
|
<el-button @click="getYesterday()" :type="activeTimeRange === 'yesterday' ? 'primary' : ''">昨</el-button> |
|
|
<el-button @click="get7Days()" :type="activeTimeRange === '7days' ? 'primary' : ''">近7天</el-button> |
|
|
<el-button @click="get7Days()" :type="activeTimeRange === '7days' ? 'primary' : ''">近7天</el-button> |
|
|
<el-button type="success" @click="resetSearch">重置</el-button> |
|
|
|
|
|
<el-button type="primary" @click="handleSearch">查询</el-button> |
|
|
|
|
|
|
|
|
</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> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-card> |
|
|
</el-card> |
|
|
|
|
|
|
|
@ -44,26 +57,27 @@ |
|
|
</el-tabs> |
|
|
</el-tabs> |
|
|
|
|
|
|
|
|
<div> |
|
|
<div> |
|
|
退款总金币数:{{ format3((stats.permanentGolds + stats.freeGolds + stats.taskGolds).toFixed(2)) }}金币 |
|
|
|
|
|
|
|
|
退款总金币数:{{ format3((stats.permanentGolds + stats.freeGolds + stats.taskGolds).toFixed(2)) |
|
|
|
|
|
}}金币 |
|
|
永久金币:{{ format3(stats.permanentGolds.toFixed(2)) }}金币 |
|
|
永久金币:{{ format3(stats.permanentGolds.toFixed(2)) }}金币 |
|
|
免费金币:{{ format3(stats.freeGolds.toFixed(2)) }}金币 |
|
|
免费金币:{{ format3(stats.freeGolds.toFixed(2)) }}金币 |
|
|
任务金币:{{ format3(stats.taskGolds.toFixed(2)) }}金币 |
|
|
任务金币:{{ format3(stats.taskGolds.toFixed(2)) }}金币 |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<el-table :data="tableData" style="height:54vh;width:82vw" @sort-change="handleSortChange"> |
|
|
<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"> |
|
|
<el-table-column prop="refundModel" label="退款方式" width="120"> |
|
|
<template #default="{ row }"> |
|
|
<template #default="{ row }"> |
|
|
{{ row.refundModel === 0 ? '全部退款' : '部分退款' }} |
|
|
{{ row.refundModel === 0 ? '全部退款' : '部分退款' }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</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"> |
|
|
<el-table-column prop="sumGold" label="退款金币总数" width="160" sortable="custom"> |
|
|
<template #default="{ row }"> |
|
|
<template #default="{ row }"> |
|
|
{{ row.sumGold / 100 }} |
|
|
{{ row.sumGold / 100 }} |
|
@ -84,11 +98,11 @@ |
|
|
{{ row.taskGold / 100 }} |
|
|
{{ row.taskGold / 100 }} |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</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" |
|
|
<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"> |
|
|
<el-table-column prop="createTime" label="提交时间" width="180" sortable="custom"> |
|
|
<template #default="{ row }"> |
|
|
<template #default="{ row }"> |
|
|
{{ |
|
|
{{ |
|
@ -128,8 +142,7 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
<el-pagination class="pagination" v-model:current-page="pagination.pageNum" v-model:page-size="pagination.pageSize" |
|
|
<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" |
|
|
|
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" @size-change="handlePageSizeChange" |
|
|
@current-change="handleCurrentChange"></el-pagination> |
|
|
@current-change="handleCurrentChange"></el-pagination> |
|
|
</el-card> |
|
|
</el-card> |
|
|
|
|
|
|
|
@ -137,7 +150,7 @@ |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-form-item label="驳回理由" required> |
|
|
<el-form-item label="驳回理由" required> |
|
|
<el-input v-model="rejectReason" type="textarea" :rows="4" placeholder="请输入驳回理由" maxlength="200" |
|
|
<el-input v-model="rejectReason" type="textarea" :rows="4" placeholder="请输入驳回理由" maxlength="200" |
|
|
show-word-limit/> |
|
|
|
|
|
|
|
|
show-word-limit /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<template #footer> |
|
|
<template #footer> |
|
@ -150,17 +163,17 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<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 API from '@/util/http.js' |
|
|
import moment from 'moment' |
|
|
import moment from 'moment' |
|
|
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" |
|
|
import dayjs from "dayjs"; |
|
|
import dayjs from "dayjs"; |
|
|
|
|
|
|
|
|
const adminStore = useAdminStore(); |
|
|
const adminStore = useAdminStore(); |
|
|
const {adminData, menuTree} = storeToRefs(adminStore); |
|
|
|
|
|
|
|
|
const { adminData, menuTree } = storeToRefs(adminStore); |
|
|
const defaultTime = [ |
|
|
const defaultTime = [ |
|
|
new Date(2000, 1, 1, 0, 0, 0), |
|
|
new Date(2000, 1, 1, 0, 0, 0), |
|
|
new Date(2000, 2, 1, 23, 59, 59), |
|
|
new Date(2000, 2, 1, 23, 59, 59), |
|
@ -250,7 +263,7 @@ const showRejectDialog = (row) => { |
|
|
// 查商品名 |
|
|
// 查商品名 |
|
|
const getRefundGoods = async () => { |
|
|
const getRefundGoods = async () => { |
|
|
try { |
|
|
try { |
|
|
const res = await API({url: '/general/goods'}) |
|
|
|
|
|
|
|
|
const res = await API({ url: '/general/goods' }) |
|
|
refundGoodsOptions.value = res.data || [] |
|
|
refundGoodsOptions.value = res.data || [] |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('获取商品列表失败', error) |
|
|
console.error('获取商品列表失败', error) |
|
@ -295,7 +308,7 @@ const get = async function (val) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
const res = await API({url: '/audit/selectRefund', data: params}) |
|
|
|
|
|
|
|
|
const res = await API({ url: '/audit/selectRefund', data: params }) |
|
|
tableData.value = res.list || [] |
|
|
tableData.value = res.list || [] |
|
|
pagination.value.total = res.total || 0 |
|
|
pagination.value.total = res.total || 0 |
|
|
console.log('查全部的total', pagination.value.total, res.total) |
|
|
console.log('查全部的total', pagination.value.total, res.total) |
|
@ -315,7 +328,7 @@ const handleApprove = async (row) => { |
|
|
action: 1,// action的1是通过,2是驳回 |
|
|
action: 1,// action的1是通过,2是驳回 |
|
|
rejectReason: '' |
|
|
rejectReason: '' |
|
|
} |
|
|
} |
|
|
await API({url: '/audit/audit', data: params}) |
|
|
|
|
|
|
|
|
await API({ url: '/audit/audit', data: params }) |
|
|
ElMessage.success('审核通过成功') |
|
|
ElMessage.success('审核通过成功') |
|
|
await get() |
|
|
await get() |
|
|
clicked.value = false |
|
|
clicked.value = false |
|
@ -347,7 +360,7 @@ const handleReject = async () => { |
|
|
action: 2, |
|
|
action: 2, |
|
|
rejectReason: rejectReason.value |
|
|
rejectReason: rejectReason.value |
|
|
} |
|
|
} |
|
|
await API({url: '/audit/audit', data: params}) |
|
|
|
|
|
|
|
|
await API({ url: '/audit/audit', data: params }) |
|
|
ElMessage.success('驳回成功') |
|
|
ElMessage.success('驳回成功') |
|
|
rejectDialogVisible.value = false |
|
|
rejectDialogVisible.value = false |
|
|
await get() |
|
|
await get() |
|
@ -556,7 +569,7 @@ const format3 = (num) => { |
|
|
} |
|
|
} |
|
|
// 表单验证 |
|
|
// 表单验证 |
|
|
const rules = reactive({ |
|
|
const rules = reactive({ |
|
|
reason: [{required: true, message: '请输入驳回理由', trigger: 'blur'}] |
|
|
|
|
|
|
|
|
reason: [{ required: true, message: '请输入驳回理由', trigger: 'blur' }] |
|
|
}) |
|
|
}) |
|
|
const handlePageSizeChange = function (val) { |
|
|
const handlePageSizeChange = function (val) { |
|
|
pagination.value.pageSize = val |
|
|
pagination.value.pageSize = val |
|
@ -583,4 +596,25 @@ onMounted(async () => { |
|
|
.operation { |
|
|
.operation { |
|
|
display: flex; |
|
|
display: flex; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.select { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
|
|
|
|
.selectRow { |
|
|
|
|
|
width: 17vw; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
padding: 0 0.5vw; |
|
|
|
|
|
|
|
|
|
|
|
.text { |
|
|
|
|
|
width: 5vw; |
|
|
|
|
|
font-size: 15px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.selectContent { |
|
|
|
|
|
flex: 1; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |