|
|
@@ -40,6 +40,15 @@
|
|
|
<el-radio-button label="未提交" value="3" />
|
|
|
<el-radio-button label="用户放弃" value="4" />
|
|
|
</el-radio-group>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="handleBatchAudit"
|
|
|
+ v-permission="'finance:subsidyReview:audit'"
|
|
|
+ style="margin-left: 20px;"
|
|
|
+ >
|
|
|
+ 批量审核
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
|
|
|
<template #type="{ row }">
|
|
|
@@ -90,6 +99,9 @@
|
|
|
|
|
|
<!-- 操作日志弹窗 -->
|
|
|
<log-dialog ref="logDialogRef" />
|
|
|
+
|
|
|
+ <!-- 批量审核弹窗 -->
|
|
|
+ <batch-audit ref="batchAuditRef" @success="handleBatchAuditSuccess" />
|
|
|
</ele-page>
|
|
|
</template>
|
|
|
|
|
|
@@ -100,6 +112,7 @@
|
|
|
import request from '@/utils/request';
|
|
|
import OrderDetail from '@/views/recycleOrder/components/order-detail.vue';
|
|
|
import LogDialog from './components/log-dialog.vue';
|
|
|
+ import BatchAudit from './components/batch-audit.vue';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
defineOptions({ name: 'subsidyReview' });
|
|
|
|
|
|
@@ -140,6 +153,7 @@
|
|
|
|
|
|
/** 表格列配置 */
|
|
|
const columns = ref([
|
|
|
+ { type: 'selection', width: 55, align: 'center' },
|
|
|
{ label: '申请时间', prop: 'submitTime', align: 'center', width: 180 },
|
|
|
{ label: '用户UID', prop: 'userId', align: 'center' },
|
|
|
{ label: '用户昵称', prop: 'nickName', align: 'center' },
|
|
|
@@ -194,11 +208,8 @@
|
|
|
|
|
|
// 审核
|
|
|
const handleAudit = (row) => {
|
|
|
- pageRef.value?.messageBoxConfirm({
|
|
|
- message: '确定审核通过吗?',
|
|
|
- fetch: () =>
|
|
|
- request.post(`/order/orderCompensationLog/audit/${row.id}`)
|
|
|
- });
|
|
|
+ // 使用批量审核的弹窗,传入单个ID
|
|
|
+ batchAuditRef.value?.open([row.id]);
|
|
|
};
|
|
|
|
|
|
// 日志弹窗引用
|
|
|
@@ -208,4 +219,36 @@
|
|
|
const handleLog = (row) => {
|
|
|
logDialogRef.value?.open(row);
|
|
|
};
|
|
|
+
|
|
|
+ // 批量审核
|
|
|
+ const batchAuditRef = ref(null);
|
|
|
+ const handleBatchAudit = () => {
|
|
|
+ const selectedRows = pageRef.value?.getSelections() || [];
|
|
|
+ if (selectedRows.length === 0) {
|
|
|
+ ElMessage.warning('请先选择要审核的记录');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 只能审核待审核状态的记录
|
|
|
+ const pendingRows = selectedRows.filter(row => row.status == 1);
|
|
|
+ if (pendingRows.length === 0) {
|
|
|
+ ElMessage.warning('请选择待审核状态的记录');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (pendingRows.length !== selectedRows.length) {
|
|
|
+ ElMessage.warning('只能审核待审核状态的记录,已自动过滤其他状态的记录');
|
|
|
+ }
|
|
|
+
|
|
|
+ const ids = pendingRows.map(row => row.id);
|
|
|
+ batchAuditRef.value?.open(ids);
|
|
|
+ };
|
|
|
+
|
|
|
+ const handleBatchAuditSuccess = () => {
|
|
|
+ // 批量审核成功后刷新表格和统计数据
|
|
|
+ reload();
|
|
|
+ fetchStatistics();
|
|
|
+ // 清空选中状态
|
|
|
+ pageRef.value?.tableRef?.clearSelection();
|
|
|
+ };
|
|
|
</script>
|