|
|
@ -1,65 +1,36 @@ |
|
|
|
<template> |
|
|
|
<el-row> |
|
|
|
<el-col> |
|
|
|
<div> |
|
|
|
<el-card style="margin-bottom: 20px;margin-top:10px"> |
|
|
|
<el-row style="margin-bottom: 5px"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-card style="margin-bottom: 0.5vh;margin-top:0.5vh;width:82.5vw"> |
|
|
|
<el-col style="margin-bottom: 0.5vh"> |
|
|
|
<el-text size="large">精网号:</el-text> |
|
|
|
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" style="width: 240px" clearable/> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<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: 240px" clearable> |
|
|
|
<el-select v-model="searchForm.goodsName" placeholder="请输入商品名" style="width: 12vw;margin-right:1vw" clearable> |
|
|
|
<el-option v-for="item in refundGoodsOptions" :key="item" :label="item" :value="item"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
|
|
|
|
<el-text size="large">退款方式:</el-text> |
|
|
|
<el-select v-model="searchForm.refundModel" placeholder="请选择" style="width: 240px" clearable> |
|
|
|
<el-option label="全部退款" value="0"/> |
|
|
|
<el-option label="部分退款" value="1"/> |
|
|
|
<el-select v-model="searchForm.refundModel" placeholder="请选择" style="width: 12vw;margin-right:1vw" clearable> |
|
|
|
<el-option label="全部退款" value="0" /> |
|
|
|
<el-option label="部分退款" value="1" /> |
|
|
|
</el-select> |
|
|
|
|
|
|
|
<el-text size="large">所属地区:</el-text> |
|
|
|
<el-cascader v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区" clearable style="width:12vw" |
|
|
|
@change="handleMarketChange" /> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-text class="mx-1" size="large">所属地区:</el-text> |
|
|
|
<el-cascader |
|
|
|
v-model="selectedMarketPath" |
|
|
|
:options="market" |
|
|
|
placeholder="请选择所属地区" |
|
|
|
clearable |
|
|
|
style="width:180px" |
|
|
|
@change="handleMarketChange" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="15"> |
|
|
|
<div class="time-controls"> |
|
|
|
<div class="time-group"> |
|
|
|
<el-text size="large" style="width: 80px">提交时间:</el-text> |
|
|
|
<el-date-picker v-model="dateRange" 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-col> |
|
|
|
<el-text size="large">提交时间:</el-text> |
|
|
|
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="至" start-placeholder="开始时间" class="time-controls" |
|
|
|
end-placeholder="结束时间" style="margin-right:1vw;width:25vw" @change="handleDatePickerChange" |
|
|
|
:default-time="defaultTime"/> |
|
|
|
<el-button @click="getToday()" :type="activeTimeRange === 'today' ? 'primary' : ''">今</el-button> |
|
|
|
<el-button @click="getYesterday()" :type="activeTimeRange === 'yesterday' ? 'primary' : ''">昨</el-button> |
|
|
|
<el-button @click="get7Days()" :type="activeTimeRange === '7days' ? 'primary' : ''">近7天</el-button> |
|
|
|
<el-button type="success" @click="resetSearch">重置</el-button> |
|
|
|
<el-button type="primary" @click="handleSearch">查询</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-card> |
|
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> |
|
|
@ -69,26 +40,26 @@ |
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
<div> |
|
|
|
总条数:{{ stats.totalNum }}条 |
|
|
|
退款总金币数:{{ (stats.permanentGolds + stats.freeGolds + stats.taskGolds).toFixed(2) }}金币 |
|
|
|
永久金币:{{ stats.permanentGolds.toFixed(2) }}金币 |
|
|
|
免费金币:{{ stats.freeGolds.toFixed(2) }}金币 |
|
|
|
任务金币:{{ stats.taskGolds.toFixed(2) }}金币 |
|
|
|
总条数:{{ format3(stats.totalNum) }}条 |
|
|
|
退款总金币数:{{ format3(stats.permanentGolds + stats.freeGolds + stats.taskGolds) }}金币 |
|
|
|
永久金币:{{ format3(stats.permanentGolds) }}金币 |
|
|
|
免费金币:{{ format3(stats.freeGolds.toFixed(2)) }}金币 |
|
|
|
任务金币:{{ format3(stats.taskGolds.toFixed(2)) }}金币 |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table :data="tableData" height="540px" @sort-change="handleSortChange"> |
|
|
|
<el-table-column type="index" label="序号" width="60"/> |
|
|
|
<el-table-column prop="name" label="姓名" width="120"/> |
|
|
|
<el-table-column prop="jwcode" label="精网号" width="120"/> |
|
|
|
<el-table-column prop="market" label="所属地区" width="120"/> |
|
|
|
<el-table :data="tableData" style="height:55vh" @sort-change="handleSortChange"> |
|
|
|
<el-table-column type="index" label="序号" width="60" /> |
|
|
|
<el-table-column prop="name" label="姓名" width="120" /> |
|
|
|
<el-table-column prop="jwcode" label="精网号" width="120" /> |
|
|
|
<el-table-column prop="market" label="所属地区" width="120" /> |
|
|
|
|
|
|
|
<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="120" sortable="custom"> |
|
|
|
<template #default="{ row }"> |
|
|
|
{{ row.sumGold / 100 }} |
|
|
@ -109,11 +80,11 @@ |
|
|
|
{{ row.taskGold / 100 }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" label="备注" width="150" show-overflow-tooltip/><!-- 当内容过长被隐藏时显示 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 }"> |
|
|
|
{{ moment(row.createTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
@ -143,8 +114,7 @@ |
|
|
|
</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" |
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total" @size-change="handlePageSizeChange" |
|
|
|
@current-change="handleCurrentChange"></el-pagination> |
|
|
|
</el-card> |
|
|
|
|
|
|
@ -152,7 +122,7 @@ |
|
|
|
<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> |
|
|
@ -165,33 +135,25 @@ |
|
|
|
</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 {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"; |
|
|
|
const trimJwCode = () => { |
|
|
|
if (searchForm.value.jwcode) { |
|
|
|
searchForm.value.jwcode = searchForm.value.jwcode.replace(/\s/g, ''); |
|
|
|
} |
|
|
|
} |
|
|
|
const adminStore = useAdminStore(); |
|
|
|
const { adminData, menuTree } = storeToRefs(adminStore); |
|
|
|
const defaultTime = [ |
|
|
|
new Date(2000, 1, 1, 0, 0, 0), |
|
|
|
new Date(2000, 2, 1,23 , 59, 59), |
|
|
|
new Date(2000, 2, 1, 23, 59, 59), |
|
|
|
] |
|
|
|
// 标记当前激活的时间范围按钮 |
|
|
|
// 当前激活的时间按钮 |
|
|
|
const activeTimeRange = ref('') |
|
|
|
// 日期选择器变化时清除按钮激活状态 |
|
|
|
const handleDatePickerChange = () => { |
|
|
|
activeTimeRange.value = '' |
|
|
|
} |
|
|
|
|
|
|
|
const scopeValue = ref(null) // 当前行 |
|
|
|
const rejectDialogVisible = ref(false) // 驳回对话框显示状态 |
|
|
|
const rejectReason = ref('') // 驳回理由 |
|
|
|
const rejectDialogVisible = ref(false) |
|
|
|
const rejectReason = ref('') |
|
|
|
// 状态常量 |
|
|
|
const STATUS = { |
|
|
|
PENDING: 0, // 待审核 |
|
|
@ -209,7 +171,6 @@ const searchForm = ref({ |
|
|
|
auditStatus: '0' |
|
|
|
}) |
|
|
|
const checkTab = ref('pending') // 能否不用STATUS常量,0是待审批,1是已通过,2是驳回,参数status需要Integer |
|
|
|
// 时间 |
|
|
|
const dateRange = ref([]) |
|
|
|
const pagination = ref({ |
|
|
|
pageNum: 1, |
|
|
@ -220,6 +181,7 @@ const tableData = ref([]) |
|
|
|
const marketOptions = ref([]) |
|
|
|
const refundGoodsOptions = ref([]) |
|
|
|
const adminInfo = ref({}) |
|
|
|
|
|
|
|
// 统计合计数 |
|
|
|
const stats = ref({ |
|
|
|
totalNum: 0, |
|
|
@ -228,43 +190,14 @@ const stats = ref({ |
|
|
|
freeGolds: 0, |
|
|
|
taskGolds: 0 |
|
|
|
}) |
|
|
|
// 驳回弹出框 |
|
|
|
const rejectVisible = ref(false) |
|
|
|
// 驳回对象 |
|
|
|
const rejectObj = ref({}) |
|
|
|
// 通过对象 |
|
|
|
const passObj = ref({}) |
|
|
|
// 标签页默认是待审批 |
|
|
|
const activeName = ref('wait') |
|
|
|
// 表单验证ref |
|
|
|
const Ref = ref(null) |
|
|
|
// 新增排序字段和排序方式 |
|
|
|
const sortField = ref('') |
|
|
|
const sortOrder = ref('') |
|
|
|
// 表单验证 |
|
|
|
const rules = reactive({ |
|
|
|
reason: [{required: true, message: '请输入驳回理由', trigger: 'blur'}] |
|
|
|
}) |
|
|
|
const getAdminData = async function () { |
|
|
|
try { |
|
|
|
const result = await API({url: '/admin/userinfo', data: {}}) |
|
|
|
adminInfo.value = result |
|
|
|
console.log('请求成功', result) |
|
|
|
console.log('用户信息', adminInfo.value) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
} |
|
|
|
} |
|
|
|
const handlePageSizeChange = function (val) { |
|
|
|
pagination.value.pageSize = val |
|
|
|
get() |
|
|
|
console.log('aaaaaaaaaaaaaaaaaa这是pageSize改变调用') |
|
|
|
} |
|
|
|
const handleCurrentChange = function (val) { |
|
|
|
pagination.value.pageNum = val |
|
|
|
get() |
|
|
|
console.log('aaaaaaaaaaaaaaa这是pageNum改变调用') |
|
|
|
} |
|
|
|
const market = ref("") |
|
|
|
// 处理排序事件 |
|
|
|
const handleSortChange = (column) => { |
|
|
|
if (column.prop === 'sumGold') { |
|
|
@ -293,13 +226,10 @@ const showRejectDialog = (row) => { |
|
|
|
rejectReason.value = '' |
|
|
|
rejectDialogVisible.value = true |
|
|
|
} |
|
|
|
// 查地区 |
|
|
|
const market = ref("") |
|
|
|
|
|
|
|
// 查商品名 |
|
|
|
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) |
|
|
@ -344,7 +274,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) |
|
|
@ -352,10 +282,6 @@ const get = async function (val) { |
|
|
|
console.error('获取数据失败', error) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const adminStore = useAdminStore(); |
|
|
|
const {menuTree} = storeToRefs(adminStore); |
|
|
|
|
|
|
|
// 通过 |
|
|
|
const handleApprove = async (row) => { |
|
|
|
if (findMenuById(menuTree.value, permissionMapping.Refund_Approval)) { |
|
|
@ -363,15 +289,14 @@ const handleApprove = async (row) => { |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
orderCode: row.orderCode, |
|
|
|
auditId: adminInfo.value.id, |
|
|
|
auditId: adminData.value.id, |
|
|
|
action: 1,// action的1是通过,2是驳回 |
|
|
|
rejectReason: '' |
|
|
|
} |
|
|
|
await API({url: '/audit/audit', data: params})// 试一下能不能发 |
|
|
|
await API({ url: '/audit/audit', data: params }) |
|
|
|
ElMessage.success('审核通过成功') |
|
|
|
get() |
|
|
|
getStats() |
|
|
|
console.log('aaaaaaaaaa这是通过调用') |
|
|
|
} catch (error) { |
|
|
|
console.error('审核通过失败', error) |
|
|
|
ElMessage.error('操作失败') |
|
|
@ -392,16 +317,16 @@ const handleReject = async () => { |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
orderCode: scopeValue.value.orderCode, |
|
|
|
auditId: adminInfo.value.id, |
|
|
|
auditId: adminData.value.id, |
|
|
|
action: 2, |
|
|
|
rejectReason: rejectReason.value |
|
|
|
} |
|
|
|
await API({url: '/audit/audit', data: params}) |
|
|
|
await API({ url: '/audit/audit', data: params }) |
|
|
|
ElMessage.success('驳回成功') |
|
|
|
rejectDialogVisible.value = false |
|
|
|
get() |
|
|
|
getStats() |
|
|
|
console.log('aaaaaaaaaa这是驳回调用', params) |
|
|
|
console.log('看看驳回参数', params) |
|
|
|
} catch (error) { |
|
|
|
console.error('驳回失败', error) |
|
|
|
ElMessage.error('操作失败') |
|
|
@ -445,17 +370,12 @@ const getStats = async () => { |
|
|
|
console.log('请求失败', error) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 搜索 |
|
|
|
const handleSearch = function () { |
|
|
|
// pagination.value.pageNum = 1 |
|
|
|
trimJwCode() |
|
|
|
|
|
|
|
get() |
|
|
|
getStats() |
|
|
|
console.log('aaaaaaaaaa这是搜索按钮调用') |
|
|
|
} |
|
|
|
|
|
|
|
// 重置 |
|
|
|
const resetSearch = function () { |
|
|
|
const auditStatus = searchForm.value.auditStatus; |
|
|
@ -476,22 +396,17 @@ const resetSearch = function () { |
|
|
|
get() |
|
|
|
getStats() |
|
|
|
} |
|
|
|
|
|
|
|
// 今天 |
|
|
|
const getToday = function () { |
|
|
|
const today = dayjs() |
|
|
|
const startTime = today.startOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
|
const endTime =today.endOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
|
const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
|
dateRange.value = [startTime, endTime] |
|
|
|
console.log('dateRange', dateRange.value) |
|
|
|
activeTimeRange.value = 'today' // 标记当前激活状态 |
|
|
|
|
|
|
|
activeTimeRange.value = 'today' |
|
|
|
get() |
|
|
|
getStats() |
|
|
|
|
|
|
|
console.log('aaaaaaaaaa这是今天调用') |
|
|
|
} |
|
|
|
|
|
|
|
// 昨天 |
|
|
|
const getYesterday = function () { |
|
|
|
const today = dayjs() |
|
|
@ -499,13 +414,10 @@ const getYesterday = function () { |
|
|
|
const endTime = today.subtract(1, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
|
dateRange.value = [startTime, endTime] |
|
|
|
console.log('dateRange', dateRange.value) |
|
|
|
activeTimeRange.value = 'yesterday' // 标记当前激活状态 |
|
|
|
|
|
|
|
activeTimeRange.value = 'yesterday' |
|
|
|
get() |
|
|
|
getStats() |
|
|
|
console.log('aaaaaaaaaa这是昨天调用') |
|
|
|
} |
|
|
|
|
|
|
|
// 近7天 |
|
|
|
const get7Days = function () { |
|
|
|
const today = dayjs() |
|
|
@ -513,14 +425,10 @@ const get7Days = function () { |
|
|
|
const endTime = today.endOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
|
dateRange.value = [startTime, endTime] |
|
|
|
console.log('dateRange', dateRange.value) |
|
|
|
activeTimeRange.value = '7days' // 标记当前激活状态 |
|
|
|
|
|
|
|
activeTimeRange.value = '7days' |
|
|
|
get() |
|
|
|
getStats() |
|
|
|
console.log('aaaaaaaaaa这是近七天调用') |
|
|
|
} |
|
|
|
|
|
|
|
// 切换标签页 |
|
|
|
const handleClick = function (tab, event) { |
|
|
|
activeName.value = tab.props.name |
|
|
|
if (tab.props.name === 'wait') { |
|
|
@ -531,7 +439,6 @@ const handleClick = function (tab, event) { |
|
|
|
adminReject() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 当前状态 |
|
|
|
const getCurrentStatus = () => { |
|
|
|
switch (activeName.value) { |
|
|
@ -545,38 +452,27 @@ const getCurrentStatus = () => { |
|
|
|
return '' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 待审核充值明细 |
|
|
|
// 待审核 |
|
|
|
const adminWait = async function () { |
|
|
|
checkTab.value = 'pending' |
|
|
|
searchForm.value.auditStatus = STATUS.PENDING |
|
|
|
// pagination.value.pageNum = 1 |
|
|
|
await get() |
|
|
|
await getStats() |
|
|
|
console.log('aaaaaaaaaaaaaaaaa看看checkTab,这是点击待审核调用', checkTab.value) |
|
|
|
} |
|
|
|
|
|
|
|
// 已通过充值明细 |
|
|
|
// 已通过 |
|
|
|
const adminPass = async function () { |
|
|
|
checkTab.value = 'pass' |
|
|
|
searchForm.value.auditStatus = STATUS.APPROVED |
|
|
|
// pagination.value.pageNum = 1 |
|
|
|
await get() |
|
|
|
await getStats() |
|
|
|
console.log('aaaaaaaaaaaaaaaaaaaaa看看checkTab,这是点击已通过调用', checkTab.value) |
|
|
|
} |
|
|
|
|
|
|
|
// 已驳回充值明细 |
|
|
|
// 已驳回 |
|
|
|
const adminReject = async function () { |
|
|
|
checkTab.value = 'reject' |
|
|
|
searchForm.value.auditStatus = STATUS.REJECTED |
|
|
|
// pagination.value.pageNum = 1 |
|
|
|
await get() |
|
|
|
await getStats() |
|
|
|
console.log('aaaaaaaaaaaaaaaaaa看看checkTab,这是点击已驳回调用', checkTab.value) |
|
|
|
} |
|
|
|
|
|
|
|
// 存储地区选择变化 |
|
|
|
const selectedMarketPath = ref("") |
|
|
|
const handleMarketChange = (value) => { |
|
|
|
if (value && value.length > 0) { |
|
|
@ -588,12 +484,10 @@ const handleMarketChange = (value) => { |
|
|
|
// 获取地区,修改为级联下拉框 |
|
|
|
const getMarket = async function () { |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
const result = await API({ |
|
|
|
|
|
|
|
url: '/market/selectMarket', |
|
|
|
}); |
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
}) |
|
|
|
console.log('请求成功', result) |
|
|
|
|
|
|
|
// 递归转换树形结构为级联选择器需要的格式(跳过第一级节点) |
|
|
@ -613,28 +507,49 @@ const getMarket = async function () { |
|
|
|
}; |
|
|
|
}); |
|
|
|
}; |
|
|
|
// 存储地区信息 |
|
|
|
market.value = transformTree(result.data) |
|
|
|
console.log('转换后的地区树==============', market.value) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const trimJwCode = () => { |
|
|
|
if (searchForm.value.jwcode) { |
|
|
|
searchForm.value.jwcode = searchForm.value.jwcode.replace(/\s/g, ''); |
|
|
|
} |
|
|
|
} |
|
|
|
// 日期选择器变化时清除按钮激活状态 |
|
|
|
const handleDatePickerChange = () => { |
|
|
|
activeTimeRange.value = '' |
|
|
|
} |
|
|
|
const format3 = (num) => { |
|
|
|
// 每三位添加逗号 |
|
|
|
return num.toLocaleString('en-US') |
|
|
|
} |
|
|
|
// 表单验证 |
|
|
|
const rules = reactive({ |
|
|
|
reason: [{ required: true, message: '请输入驳回理由', trigger: 'blur' }] |
|
|
|
}) |
|
|
|
const handlePageSizeChange = function (val) { |
|
|
|
pagination.value.pageSize = val |
|
|
|
get() |
|
|
|
} |
|
|
|
const handleCurrentChange = function (val) { |
|
|
|
pagination.value.pageNum = val |
|
|
|
get() |
|
|
|
} |
|
|
|
onMounted(async () => { |
|
|
|
await getAdminData() |
|
|
|
getRefundGoods() |
|
|
|
await getMarket() |
|
|
|
await get() |
|
|
|
await getStats() |
|
|
|
console.log('aaaaaaaaaa这是挂载后调用') |
|
|
|
}) |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
.pagination { |
|
|
|
display: flex; |
|
|
|
margin-top:0.5vh; |
|
|
|
} |
|
|
|
|
|
|
|
.operation { |
|
|
@ -644,9 +559,6 @@ onMounted(async () => { |
|
|
|
.time-controls { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
|
|
|
|
.time-group { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
gap: 10px; |
|
|
|