|
|
|
@ -33,7 +33,7 @@ |
|
|
|
<div class="select"> |
|
|
|
<div class="selectRow" style="width: 36vw;"> |
|
|
|
<el-text class="text" size="large"> |
|
|
|
{{ activeName === 'wait' ? $t('common.submitTime') : $t('common.auditTime') }} |
|
|
|
{{ (activeName === 'wait' || activeName === 'change') ? $t('common.submitTime') : $t('common.auditTime') }} |
|
|
|
</el-text> |
|
|
|
<el-date-picker class="selectContent" v-model="dateRange" type="datetimerange" |
|
|
|
:range-separator="$t('common.to')" :start-placeholder="$t('common.startTime')" |
|
|
|
@ -67,6 +67,10 @@ |
|
|
|
@click="handleButtonClick('reject')" class="custom-tab-button"> |
|
|
|
{{ $t('audit.rejected') }} |
|
|
|
</el-button> |
|
|
|
<el-button v-if="hasrefundWait && hasrefundWaitShow" :type="activeName === 'change' ? 'primary' : 'default'" |
|
|
|
@click="handleButtonClick('change')" class="custom-tab-button"> |
|
|
|
待处理 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="goldStatistics"> |
|
|
|
@ -115,15 +119,26 @@ |
|
|
|
{{ row.taskGold / 100 }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="activeName === 'change'" |
|
|
|
prop="redDiff" |
|
|
|
label="金币补差额" |
|
|
|
width="130" |
|
|
|
sortable="custom" |
|
|
|
> |
|
|
|
<template #default="{ row }"> |
|
|
|
{{ row.redDiff != null ? (row.redDiff / 100) : 0 }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" :label="$t('audit.note')" width="150" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="adminName" :label="$t('audit.submitter')" width="120" /> |
|
|
|
<el-table-column v-if="checkTab === 'reject'" prop="rejectReason" :label="$t('audit.rejectReason')" width="150" |
|
|
|
show-overflow-tooltip /> |
|
|
|
<el-table-column v-if="checkTab !== 'pending'" prop="auditName" :label="$t('audit.auditor')" width="120" /> |
|
|
|
<el-table-column v-if="checkTab === 'pass' || checkTab === 'reject'" prop="auditName" :label="$t('audit.auditor')" width="120" /> |
|
|
|
<el-table-column prop="createTime" :label="$t('audit.submitTime')" width="180" sortable="custom"> |
|
|
|
<template #default="{ row }"> |
|
|
|
{{ |
|
|
|
checkTab === 'pending' |
|
|
|
(checkTab === 'pending' || checkTab === 'change') |
|
|
|
? moment(row.auditTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
: moment(row.createTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
}} |
|
|
|
@ -136,7 +151,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-if="checkTab === 'pending' && (hasrefundWaitThough || hasrefundWaitReject) && hasrefundWaitShow" fixed="right" |
|
|
|
v-if="(checkTab === 'pending' || checkTab === 'change') && (hasrefundWaitThough || hasrefundWaitReject) && hasrefundWaitShow" fixed="right" |
|
|
|
prop="operation" :label="$t('audit.operation')" width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<div class="operation"> |
|
|
|
@ -225,7 +240,8 @@ const approveDialogVisible = ref(false) |
|
|
|
const STATUS = { |
|
|
|
PENDING: 0, // 待审核 |
|
|
|
APPROVED: 1, // 通过 |
|
|
|
REJECTED: 2 // 驳回 |
|
|
|
REJECTED: 2, // 驳回 |
|
|
|
WAIT_HANDLE: 4 // 待处理(红包) |
|
|
|
} |
|
|
|
//无法选择的时间 |
|
|
|
const disabledDate = (time) => { |
|
|
|
@ -302,6 +318,8 @@ const handleSortChange = (column) => { |
|
|
|
sortField.value = 'freeGold' |
|
|
|
} else if (column.prop === 'taskGold') { |
|
|
|
sortField.value = 'task_gold' |
|
|
|
} else if (column.prop === 'redDiff') { |
|
|
|
sortField.value = 'red_diff' |
|
|
|
} else if (column.prop === 'createTime') { |
|
|
|
sortField.value = 'create_time' |
|
|
|
} else if (column.prop === 'auditTime') { |
|
|
|
@ -394,17 +412,26 @@ const handleApproveConfirm = async () => { |
|
|
|
orderCode: currentRecord.value.orderCode, |
|
|
|
auditId: adminData.value.id, |
|
|
|
action: 1, // action的1是通过,2是驳回 |
|
|
|
rejectReason: '' |
|
|
|
} |
|
|
|
await API({ url: '/audit/audit', data: params }) |
|
|
|
rejectReason: '', |
|
|
|
price: currentRecord.value.price, |
|
|
|
linkId: currentRecord.value.linkId |
|
|
|
} |
|
|
|
const res = await API({ url: '/audit/audit', data: params }) |
|
|
|
if (res && res.success === false) { |
|
|
|
ElMessage.error(res.message || '红包退票失败') |
|
|
|
} else if (res && res.success === true) { |
|
|
|
ElMessage.success(t('elmessage.approveSuccess')) |
|
|
|
} else { |
|
|
|
ElMessage.error(t('elmessage.operationFailed')) |
|
|
|
} |
|
|
|
approveDialogVisible.value = false |
|
|
|
await get() |
|
|
|
clicked.value = false |
|
|
|
await getStats() |
|
|
|
} catch (error) { |
|
|
|
console.error(t('elmessage.approveFailed'), error) |
|
|
|
ElMessage.error(t('elmessage.operationFailed')) |
|
|
|
} finally { |
|
|
|
clicked.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
import _ from 'lodash'; |
|
|
|
@ -608,6 +635,14 @@ const handleButtonClick = function (name) { |
|
|
|
return |
|
|
|
} |
|
|
|
adminReject() |
|
|
|
} else if (name === 'change') { |
|
|
|
if (!hasrefundWait) { |
|
|
|
ElMessage.error(t('elmessage.noPermission')) |
|
|
|
return |
|
|
|
} |
|
|
|
if (hasrefundWaitShow) { |
|
|
|
adminChange() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// const handleClick = function (tab, event) { |
|
|
|
@ -641,6 +676,13 @@ const adminWait = async function () { |
|
|
|
await get() |
|
|
|
await getStats() |
|
|
|
} |
|
|
|
// 待处理(红包) |
|
|
|
const adminChange = async function () { |
|
|
|
checkTab.value = 'change' |
|
|
|
searchForm.value.auditStatus = STATUS.WAIT_HANDLE |
|
|
|
await get() |
|
|
|
await getStats() |
|
|
|
} |
|
|
|
// 已通过 |
|
|
|
const adminPass = async function () { |
|
|
|
checkTab.value = 'pass' |
|
|
|
|