@@ -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') {
@@ -393,18 +411,27 @@ const handleApproveConfirm = async () => {
const params = {
orderCode: currentRecord.value.orderCode,
auditId: adminData.value.id,
- action: 1,// action的1是通过,2是驳回
- rejectReason: ''
+ action: 1, // action的1是通过,2是驳回
+ 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'))
}
- await API({ url: '/audit/audit', data: params })
- ElMessage.success(t('elmessage.approveSuccess'))
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'
@@ -828,4 +870,4 @@ onMounted(async () => {
}
}
}
-
\ No newline at end of file
+