勘察审核完成

This commit is contained in:
2024-10-15 10:28:14 +08:00
parent d9f5eb8958
commit 96e5df3a45
+33 -7
View File
@@ -120,8 +120,9 @@
show-overflow-tooltip
>
<template v-slot:default="scope">
<el-button type="success" @click="handleApprove(scope.row)">通过</el-button>
<el-button type="danger" @click="openModel(scope.$index)">驳回</el-button>
<el-button type="success" v-if="scope.row.status === 0" @click="handleApprove(scope.row)">通过</el-button>
<el-button type="danger" v-if="scope.row.status === 0" @click="handleReject(scope.row)">驳回</el-button>
<!-- <el-button type="danger" @click="openModel(scope.$index)">驳回</el-button>-->
</template>
</el-table-column>
</el-table>
@@ -200,12 +201,37 @@ const searchEvnt = () => {
};
const handleApprove = (item) => {
console.log("调试:", item)
approve(item.id).then((res) => {
ElMessage({
type: 'success'
ElMessageBox.confirm('确定要通过该申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
approve(item.id).then((res) => {
item.status = 2;
ElMessage({
type: 'success',
message: '申请已被通过!'
})
})
})
}).catch(() => {
});
}
const handleReject = (item) => {
ElMessageBox.confirm('确定要拒绝该申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
reject(item.id).then((res) => {
item.status = 1;
ElMessage({
type: 'success',
message: '申请已被拒绝!'
})
})
}).catch(() => {
});
}
// 驳回原因