|
|
@ -3,36 +3,30 @@ |
|
|
|
<el-row style="margin-bottom: 10px"> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-text size="large">精网号:</el-text> |
|
|
|
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" style="width: 240px" clearable/> |
|
|
|
<el-input v-model="searchForm.jwcode" placeholder="请输入精网号" style="width: 240px" clearable /> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-text class="mx-1" size="large">所属地区:</el-text> |
|
|
|
<el-cascader |
|
|
|
v-model="selectedMarketPath" |
|
|
|
:options="marketOptions" |
|
|
|
placeholder="请选择所属地区" |
|
|
|
clearable |
|
|
|
style="width:180px" |
|
|
|
@change="handleMarketChange" |
|
|
|
/> |
|
|
|
</el-col> |
|
|
|
<el-text class="mx-1" size="large">所属地区:</el-text> |
|
|
|
<el-cascader v-model="selectedMarketPath" :options="marketOptions" 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-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' : ''"> 今 |
|
|
|
:type="activeTimeRange === 'today' ? 'primary' : ''"> 今 |
|
|
|
</el-button> |
|
|
|
<el-button @click="getYesterday()" style="margin-left: 10px" |
|
|
|
:type="activeTimeRange === 'yesterday' ? 'primary' : ''"> 昨 |
|
|
|
:type="activeTimeRange === 'yesterday' ? 'primary' : ''"> 昨 |
|
|
|
</el-button> |
|
|
|
<el-button @click="get7Days()" style="margin-left: 10px" |
|
|
|
:type="activeTimeRange === '7days' ? 'primary' : ''"> 近7天 |
|
|
|
:type="activeTimeRange === '7days' ? 'primary' : ''"> 近7天 |
|
|
|
</el-button> |
|
|
|
<el-button type="success" @click="resetSearch">重置</el-button> |
|
|
|
<el-button type="primary" @click="handleSearch">查询</el-button> |
|
|
@ -57,17 +51,16 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table :data="tableData" height="540px" @sort-change="handleSortChange"> |
|
|
|
<el-table-column prop="id" label="序号" width="80"/> |
|
|
|
<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="id" label="序号" width="80" /> |
|
|
|
<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') }} |
|
|
@ -83,14 +76,13 @@ |
|
|
|
<div class="operation"> |
|
|
|
<el-popconfirm title="确定要通过此条记录吗?" @confirm="throttledHandleApprove(scope.row)"> |
|
|
|
<template #reference> |
|
|
|
<el-button :disabled="scope.row.status === 1 || scope.row.status === 2" type="primary" |
|
|
|
text> |
|
|
|
<el-button :disabled="scope.row.status === 1 || scope.row.status === 2" type="primary" text> |
|
|
|
通过 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-popconfirm> |
|
|
|
<el-button :disabled="scope.row.status === 1 || scope.row.status === 2" type="primary" text |
|
|
|
@click="showRejectDialog(scope.row)"> |
|
|
|
@click="showRejectDialog(scope.row)"> |
|
|
|
驳回 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
@ -98,41 +90,39 @@ |
|
|
|
</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="rejectDialogVisible" 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> |
|
|
|
<span class="dialog-footer"> |
|
|
|
<el-button @click="rejectDialogVisible = false">取消</el-button> |
|
|
|
<el-button type="primary" @click="handleReject()">确定</el-button> |
|
|
|
</span> |
|
|
|
<span class="dialog-footer"> |
|
|
|
<el-button @click="rejectDialogVisible = false">取消</el-button> |
|
|
|
<el-button type="primary" @click="handleReject()">确定</el-button> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</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' |
|
|
|
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' |
|
|
|
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 adminStore = useAdminStore(); |
|
|
|
const {adminData, menuTree} = storeToRefs(adminStore); |
|
|
|
import {permissionMapping, findMenuById} from "@/utils/menuTreePermission.js" |
|
|
|
const { adminData, menuTree } = storeToRefs(adminStore); |
|
|
|
import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js" |
|
|
|
import dayjs from "dayjs"; |
|
|
|
|
|
|
|
const tableData = ref([]) |
|
|
@ -199,8 +189,8 @@ const getmarkets = async function () { |
|
|
|
|
|
|
|
return allChildren.map(child => { |
|
|
|
const grandchildren = child.children && child.children.length |
|
|
|
? transformTree([child]) // 递归处理子节点 |
|
|
|
: null; |
|
|
|
? transformTree([child]) // 递归处理子节点 |
|
|
|
: null; |
|
|
|
|
|
|
|
return { |
|
|
|
value: child.name, |
|
|
@ -234,13 +224,13 @@ const handleSortChange = (column) => { |
|
|
|
get() |
|
|
|
} |
|
|
|
const handleSearch = function () { |
|
|
|
if(searchForm.value.jwcode){ |
|
|
|
const numRef = /^\d{1,9}$/; |
|
|
|
if(!numRef.test(searchForm.value.jwcode)){ |
|
|
|
ElMessage.error('请检查精网号格式') |
|
|
|
return |
|
|
|
} |
|
|
|
if (searchForm.value.jwcode) { |
|
|
|
const numRef = /^\d{1,9}$/; |
|
|
|
if (!numRef.test(searchForm.value.jwcode)) { |
|
|
|
ElMessage.error('请检查精网号格式') |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
get() |
|
|
|
getStats() |
|
|
|
} |
|
|
@ -254,6 +244,9 @@ const get = async function () { |
|
|
|
searchForm.value.createStartTime = '' |
|
|
|
searchForm.value.createEndTime = '' |
|
|
|
} |
|
|
|
if (searchForm.value.market === '总部' || searchForm.value.market === '研发部') { |
|
|
|
searchForm.value.market = ''; |
|
|
|
} |
|
|
|
const params = { |
|
|
|
pageNum: pagination.value.pageNum,//页码 |
|
|
|
pageSize: pagination.value.pageSize,//页面大小 |
|
|
@ -270,7 +263,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) |
|
|
@ -317,7 +310,7 @@ const handleApprove = async (row) => { |
|
|
|
id: row.id, |
|
|
|
auditName: adminData.value.name, |
|
|
|
} |
|
|
|
await API({url: '/beanAudit/status1', data: params}) |
|
|
|
await API({ url: '/beanAudit/status1', data: params }) |
|
|
|
ElMessage.success('审核通过成功') |
|
|
|
get() |
|
|
|
getStats() |
|
|
@ -343,7 +336,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('驳回成功') |
|
|
|
rejectDialogVisible.value = false |
|
|
|
get() |
|
|
@ -406,7 +399,7 @@ const resetSearch = function () { |
|
|
|
} |
|
|
|
|
|
|
|
const handleClick = function (tab) { |
|
|
|
resetSearch() |
|
|
|
resetSearch() |
|
|
|
activeName.value = tab.props.name |
|
|
|
if (tab.props.name === 'wait') { |
|
|
|
adminWait() |
|
|
|