|
|
@ -2,28 +2,33 @@ |
|
|
|
<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: 12vw;margin-right:1vw" clearable /> |
|
|
|
<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-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-text size="large">退款方式:</el-text> |
|
|
|
<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-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-cascader v-model="selectedMarketPath" :options="market" placeholder="请选择所属地区" clearable |
|
|
|
style="width:12vw" |
|
|
|
@change="handleMarketChange"/> |
|
|
|
</el-col> |
|
|
|
<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-text size="large"> |
|
|
|
{{ activeName === 'wait' ? '提交时间:' : '审核时间:' }} |
|
|
|
</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> |
|
|
@ -48,18 +53,18 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<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 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 }} |
|
|
@ -80,14 +85,20 @@ |
|
|
|
{{ 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 }"> |
|
|
|
{{ moment(row.createTime).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
<!-- {{ moment(row.createTime).format('YYYY-MM-DD HH:mm:ss') }}--> |
|
|
|
{{ |
|
|
|
checkTab === 'pending' |
|
|
|
? moment(row.auditTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
: moment(row.createTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
}} |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-if="checkTab !== 'pending'" prop="auditTime" label="审核时间" width="180" sortable="custom"> |
|
|
@ -106,7 +117,7 @@ |
|
|
|
</template> |
|
|
|
</el-popconfirm> |
|
|
|
<el-button :disabled="scope.row.auditStatus === 1 || scope.row.auditStatus === 2" type="primary" text |
|
|
|
@click="showRejectDialog(scope.row)"> |
|
|
|
@click="showRejectDialog(scope.row)"> |
|
|
|
驳回 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
@ -114,15 +125,16 @@ |
|
|
|
</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> |
|
|
@ -135,16 +147,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 { 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 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), |
|
|
@ -229,7 +242,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) |
|
|
@ -274,7 +287,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) |
|
|
@ -293,7 +306,7 @@ const handleApprove = async (row) => { |
|
|
|
action: 1,// action的1是通过,2是驳回 |
|
|
|
rejectReason: '' |
|
|
|
} |
|
|
|
await API({ url: '/audit/audit', data: params }) |
|
|
|
await API({url: '/audit/audit', data: params}) |
|
|
|
ElMessage.success('审核通过成功') |
|
|
|
get() |
|
|
|
getStats() |
|
|
@ -321,7 +334,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 |
|
|
|
get() |
|
|
@ -497,8 +510,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, |
|
|
@ -528,7 +541,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 |
|
|
@ -549,7 +562,7 @@ onMounted(async () => { |
|
|
|
<style scoped> |
|
|
|
.pagination { |
|
|
|
display: flex; |
|
|
|
margin-top:0.5vh; |
|
|
|
margin-top: 0.5vh; |
|
|
|
} |
|
|
|
|
|
|
|
.operation { |
|
|
|