|
|
@@ -14,6 +14,7 @@
|
|
|
<el-option label="待审核" :value="1" />
|
|
|
<el-option label="已通过" :value="2" />
|
|
|
<el-option label="已拒绝" :value="3" />
|
|
|
+ <el-option label="已打回" :value="5" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="提交时间">
|
|
|
@@ -73,10 +74,11 @@
|
|
|
<span v-if="row.createdAt">{{ formatUnix(row.createdAt) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column fixed="right" label="操作" align="center" width="150">
|
|
|
+ <el-table-column fixed="right" label="操作" align="center" width="200">
|
|
|
<template #default="scope">
|
|
|
<template v-if="scope.row.status === 1">
|
|
|
<el-button type="success" link @click="handleAudit(scope.row, 2)">通过</el-button>
|
|
|
+ <el-button type="warning" link @click="handleAudit(scope.row, 5)">打回</el-button>
|
|
|
<el-button type="danger" link @click="handleAudit(scope.row, 3)">拒绝</el-button>
|
|
|
</template>
|
|
|
<span v-else>-</span>
|
|
|
@@ -116,11 +118,14 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 审核弹窗 -->
|
|
|
- <el-dialog v-model="auditDialogVisible" :title="auditStatus === 2 ? '审核通过' : '审核拒绝'" width="400px" center>
|
|
|
+ <el-dialog v-model="auditDialogVisible" :title="auditDialogTitle" width="400px" center>
|
|
|
<el-form ref="auditFormRef" :model="auditFormData" label-width="80px">
|
|
|
<el-form-item v-if="auditStatus === 3" label="拒绝原因">
|
|
|
<el-input v-model="auditFormData.rejectReason" type="textarea" :rows="2" placeholder="请输入拒绝原因" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item v-if="auditStatus === 5" label="打回原因">
|
|
|
+ <el-input v-model="auditFormData.rejectReason" type="textarea" :rows="2" placeholder="请输入打回原因,用户可根据此原因补充截图后重新提交" />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="审核备注">
|
|
|
<el-input v-model="auditFormData.auditRemark" type="textarea" :rows="3" placeholder="请输入审核备注" />
|
|
|
</el-form-item>
|
|
|
@@ -133,7 +138,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, reactive, onMounted } from "vue";
|
|
|
+import { ref, reactive, computed, onMounted } from "vue";
|
|
|
import dayjs from "dayjs";
|
|
|
import { Refresh } from "@element-plus/icons-vue";
|
|
|
import { ElNotification } from "element-plus";
|
|
|
@@ -145,13 +150,19 @@ const searchForm = ref({ userId: null, taskId: null, status: null });
|
|
|
const tableData = ref([]);
|
|
|
const pageable = reactive({ pageNum: 1, pageSize: 30, total: 0 });
|
|
|
|
|
|
-const statusMap = { 0: "进行中", 1: "待审核", 2: "已通过", 3: "已拒绝" };
|
|
|
+const statusMap = { 0: "进行中", 1: "待审核", 2: "已通过", 3: "已拒绝", 5: "已打回" };
|
|
|
|
|
|
const getStatusType = (status) => {
|
|
|
- const types = { 0: "info", 1: "warning", 2: "success", 3: "danger" };
|
|
|
+ const types = { 0: "info", 1: "warning", 2: "success", 3: "danger", 5: "warning" };
|
|
|
return types[status] || "default";
|
|
|
};
|
|
|
|
|
|
+// 审核弹窗标题
|
|
|
+const auditDialogTitle = computed(() => {
|
|
|
+ const titles = { 2: "审核通过", 3: "审核拒绝", 5: "打回修改" };
|
|
|
+ return titles[auditStatus.value] || "审核";
|
|
|
+});
|
|
|
+
|
|
|
const formatUnix = (val) => {
|
|
|
if (!val) return "";
|
|
|
return dayjs.unix(val).format("YYYY-MM-DD HH:mm:ss");
|