|
@ -9,7 +9,8 @@ |
|
|
style="width: 12vw" @change="handleMarketChange" /> |
|
|
style="width: 12vw" @change="handleMarketChange" /> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col> |
|
|
<el-col> |
|
|
<el-text size="large" style="width: 80px">充值时间:</el-text> |
|
|
|
|
|
|
|
|
<el-text size="large" style="width: 80px" v-show="checkTab === 'pending'">充值时间:</el-text> |
|
|
|
|
|
<el-text size="large" style="width: 80px" v-show="checkTab === 'reject' || checkTab === 'pass'">审核时间:</el-text> |
|
|
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="至" start-placeholder="开始时间" |
|
|
<el-date-picker v-model="dateRange" type="datetimerange" range-separator="至" start-placeholder="开始时间" |
|
|
end-placeholder="结束时间" style="width: 25vw;margin-right:1vw" @change="handleDatePickerChange" |
|
|
end-placeholder="结束时间" style="width: 25vw;margin-right:1vw" @change="handleDatePickerChange" |
|
|
:default-time="defaultTime" /> |
|
|
:default-time="defaultTime" /> |
|
@ -22,8 +23,8 @@ |
|
|
</el-card> |
|
|
</el-card> |
|
|
|
|
|
|
|
|
<el-card> |
|
|
<el-card> |
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> |
|
|
|
|
|
<el-tab-pane label="待审核" name="wait"></el-tab-pane> |
|
|
|
|
|
|
|
|
<el-tabs v-model="checkTab" type="card" @tab-click="handleClick"> |
|
|
|
|
|
<el-tab-pane label="待审核" name="pending"></el-tab-pane> |
|
|
<el-tab-pane label="已通过" name="pass"></el-tab-pane> |
|
|
<el-tab-pane label="已通过" name="pass"></el-tab-pane> |
|
|
<el-tab-pane label="已驳回" name="reject"></el-tab-pane> |
|
|
<el-tab-pane label="已驳回" name="reject"></el-tab-pane> |
|
|
</el-tabs> |
|
|
</el-tabs> |
|
@ -119,7 +120,6 @@ const tableData = ref([]) |
|
|
const marketOptions = ref("") |
|
|
const marketOptions = ref("") |
|
|
const dateRange = ref([]) |
|
|
const dateRange = ref([]) |
|
|
const activeTimeRange = ref('') |
|
|
const activeTimeRange = ref('') |
|
|
const activeName = ref('wait') |
|
|
|
|
|
const sortField = ref('') |
|
|
const sortField = ref('') |
|
|
const sortOrder = ref('') |
|
|
const sortOrder = ref('') |
|
|
const checkTab = ref('pending') |
|
|
const checkTab = ref('pending') |
|
@ -128,12 +128,16 @@ const reason = ref('') |
|
|
const rejectRow = ref({ |
|
|
const rejectRow = ref({ |
|
|
id: null |
|
|
id: null |
|
|
})// 驳回行数据 |
|
|
})// 驳回行数据 |
|
|
|
|
|
const clicked = ref(false) |
|
|
// 状态常量 |
|
|
// 状态常量 |
|
|
const STATUS = { |
|
|
const STATUS = { |
|
|
PENDING: 0, // 待审核 |
|
|
PENDING: 0, // 待审核 |
|
|
APPROVED: 1, // 通过 |
|
|
APPROVED: 1, // 通过 |
|
|
REJECTED: 2 // 驳回 |
|
|
REJECTED: 2 // 驳回 |
|
|
} |
|
|
} |
|
|
|
|
|
const cancelClicked = ref(false) |
|
|
|
|
|
// 存储地区选择变化 |
|
|
|
|
|
const selectedMarkets = ref("") |
|
|
const searchForm = ref({ |
|
|
const searchForm = ref({ |
|
|
jwcode: '', |
|
|
jwcode: '', |
|
|
market: '', |
|
|
market: '', |
|
@ -154,8 +158,6 @@ const stats = ref({ |
|
|
permanentBean: 0, |
|
|
permanentBean: 0, |
|
|
freeBean: 0 |
|
|
freeBean: 0 |
|
|
}) |
|
|
}) |
|
|
// 存储地区选择变化 |
|
|
|
|
|
const selectedMarkets = ref("") |
|
|
|
|
|
const handleSortChange = (column) => { |
|
|
const handleSortChange = (column) => { |
|
|
if (column.prop === 'permanentBean') { |
|
|
if (column.prop === 'permanentBean') { |
|
|
sortField.value = 'permanentBean' |
|
|
sortField.value = 'permanentBean' |
|
@ -173,7 +175,7 @@ const handleSortChange = (column) => { |
|
|
console.log('排序方式:', sortOrder.value) |
|
|
console.log('排序方式:', sortOrder.value) |
|
|
get() |
|
|
get() |
|
|
} |
|
|
} |
|
|
const handleSearch = function () { |
|
|
|
|
|
|
|
|
const handleSearch = async function () { |
|
|
trimJwCode() |
|
|
trimJwCode() |
|
|
if (searchForm.value.jwcode) { |
|
|
if (searchForm.value.jwcode) { |
|
|
const numRef = /^\d{1,9}$/; |
|
|
const numRef = /^\d{1,9}$/; |
|
@ -182,15 +184,20 @@ const handleSearch = function () { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
get() |
|
|
|
|
|
getStats() |
|
|
|
|
|
|
|
|
await get() |
|
|
|
|
|
await getStats() |
|
|
} |
|
|
} |
|
|
const get = async function () { |
|
|
const get = async function () { |
|
|
if (findMenuById(menuTree.value, permissionMapping.View_Golden_Bean_Recharge_Audit)) { |
|
|
if (findMenuById(menuTree.value, permissionMapping.View_Golden_Bean_Recharge_Audit)) { |
|
|
try { |
|
|
try { |
|
|
if (dateRange.value && dateRange.value.length === 2) { |
|
|
if (dateRange.value && dateRange.value.length === 2) { |
|
|
|
|
|
if(checkTab.value === 'pending'){ |
|
|
searchForm.value.createStartTime = moment(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') |
|
|
searchForm.value.createStartTime = moment(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') |
|
|
searchForm.value.createEndTime = moment(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
searchForm.value.createEndTime = moment(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
|
|
}else{ |
|
|
|
|
|
searchForm.value.auditStartTime = moment(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
|
|
searchForm.value.auditEndTime = moment(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
searchForm.value.createStartTime = '' |
|
|
searchForm.value.createStartTime = '' |
|
|
searchForm.value.createEndTime = '' |
|
|
searchForm.value.createEndTime = '' |
|
@ -252,7 +259,6 @@ const getStats = async () => { |
|
|
ElMessage.error('无此权限') |
|
|
ElMessage.error('无此权限') |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
const clicked = ref(false); |
|
|
|
|
|
// 处理通过操作 |
|
|
// 处理通过操作 |
|
|
const handleApprove = async (row) => { |
|
|
const handleApprove = async (row) => { |
|
|
clicked.value = true |
|
|
clicked.value = true |
|
@ -276,8 +282,6 @@ const handleApprove = async (row) => { |
|
|
clicked.value = false |
|
|
clicked.value = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//控制驳回确认按钮禁用状态 |
|
|
|
|
|
const cancelClicked = ref(false) |
|
|
|
|
|
// 处理驳回操作 |
|
|
// 处理驳回操作 |
|
|
const handleReject = async () => { |
|
|
const handleReject = async () => { |
|
|
cancelClicked.value = true |
|
|
cancelClicked.value = true |
|
@ -307,37 +311,38 @@ const handleReject = async () => { |
|
|
cancelClicked.value = false |
|
|
cancelClicked.value = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
const getToday = function () { |
|
|
|
|
|
|
|
|
const getToday = async function () { |
|
|
const today = dayjs() |
|
|
const today = dayjs() |
|
|
const startTime = today.startOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
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] |
|
|
dateRange.value = [startTime, endTime] |
|
|
console.log('dateRange', dateRange.value) |
|
|
console.log('dateRange', dateRange.value) |
|
|
activeTimeRange.value = 'today' |
|
|
activeTimeRange.value = 'today' |
|
|
get() |
|
|
|
|
|
getStats() |
|
|
|
|
|
|
|
|
await get() |
|
|
|
|
|
await getStats() |
|
|
} |
|
|
} |
|
|
const getYesterday = function () { |
|
|
|
|
|
|
|
|
const getYesterday = async function () { |
|
|
|
|
|
|
|
|
const today = dayjs() |
|
|
const today = dayjs() |
|
|
const startTime = today.subtract(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
const startTime = today.subtract(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
const endTime = today.subtract(1, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
const endTime = today.subtract(1, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
dateRange.value = [startTime, endTime] |
|
|
dateRange.value = [startTime, endTime] |
|
|
console.log('dateRange', dateRange.value) |
|
|
console.log('dateRange', dateRange.value) |
|
|
activeTimeRange.value = 'yesterday' |
|
|
activeTimeRange.value = 'yesterday' |
|
|
get() |
|
|
|
|
|
getStats() |
|
|
|
|
|
|
|
|
await get() |
|
|
|
|
|
await getStats() |
|
|
} |
|
|
} |
|
|
const get7Days = function () { |
|
|
|
|
|
|
|
|
const get7Days = async function () { |
|
|
const today = dayjs() |
|
|
const today = dayjs() |
|
|
const startTime = today.subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
const startTime = today.subtract(6, 'day').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] |
|
|
dateRange.value = [startTime, endTime] |
|
|
console.log('dateRange', dateRange.value) |
|
|
console.log('dateRange', dateRange.value) |
|
|
activeTimeRange.value = '7days' |
|
|
activeTimeRange.value = '7days' |
|
|
get() |
|
|
|
|
|
getStats() |
|
|
|
|
|
|
|
|
await get() |
|
|
|
|
|
await getStats() |
|
|
} |
|
|
} |
|
|
const resetSearch = function () { |
|
|
|
|
|
|
|
|
const resetSearch = async function () { |
|
|
const status = searchForm.value.status; |
|
|
const status = searchForm.value.status; |
|
|
searchForm.value = { |
|
|
searchForm.value = { |
|
|
jwcode: '', |
|
|
jwcode: '', |
|
@ -351,14 +356,12 @@ const resetSearch = function () { |
|
|
selectedMarkets.value = [] |
|
|
selectedMarkets.value = [] |
|
|
dateRange.value = [] |
|
|
dateRange.value = [] |
|
|
activeTimeRange.value = '' |
|
|
activeTimeRange.value = '' |
|
|
get() |
|
|
|
|
|
getStats() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await get() |
|
|
|
|
|
await getStats() |
|
|
} |
|
|
} |
|
|
const handleClick = function (tab) { |
|
|
|
|
|
resetSearch() |
|
|
|
|
|
activeName.value = tab.props.name |
|
|
|
|
|
if (tab.props.name === 'wait') { |
|
|
|
|
|
|
|
|
const handleClick = async function (tab) { |
|
|
|
|
|
checkTab.value = tab.props.name |
|
|
|
|
|
if (tab.props.name === 'pending') { |
|
|
adminWait() |
|
|
adminWait() |
|
|
} else if (tab.props.name === 'pass') { |
|
|
} else if (tab.props.name === 'pass') { |
|
|
adminPass() |
|
|
adminPass() |
|
@ -457,8 +460,8 @@ const trimJwCode = () => { |
|
|
} |
|
|
} |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getmarkets() |
|
|
getmarkets() |
|
|
get() |
|
|
|
|
|
getStats() |
|
|
|
|
|
|
|
|
await get() |
|
|
|
|
|
await getStats() |
|
|
console.log("看看通信来的用户身份", adminData.value) |
|
|
console.log("看看通信来的用户身份", adminData.value) |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|