feat(审批): 添加撤回审批功能并优化审批状态显示
- 在approval.js中添加withdrawApproval API方法 - 在leave.vue和goout.vue中启用撤回按钮并调用新API - 在todo/index.vue中优化审批状态显示逻辑
This commit is contained in:
@@ -133,7 +133,7 @@
|
||||
<el-table-column label="操作" align="center" width="160">
|
||||
<template slot-scope="scope" v-if="scope.row.approvalStatus === '待审批'">
|
||||
<el-button icon="el-icon-edit" size="mini" @click="handleEdit(scope.row)">修改</el-button>
|
||||
<!-- <el-button icon="el-icon-delete" size="mini" @click="handleWithdraw(scope.row)">撤回</el-button> -->
|
||||
<el-button icon="el-icon-delete" size="mini" @click="handleWithdraw(scope.row)">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
<script>
|
||||
import { getLeaveRequest, addLeaveRequest, updateLeaveRequest } from "@/api/wms/leaveRequest";
|
||||
import { listApproval, updateApproval } from "@/api/wms/approval"
|
||||
import { listApproval, updateApproval, withdrawApproval } from "@/api/wms/approval"
|
||||
import { listDept } from "@/api/wms/dept"
|
||||
import FileUpload from '@/components/FileUpload'
|
||||
import EmployeeSelector from '@/components/EmployeeSelector'
|
||||
@@ -390,10 +390,8 @@ export default {
|
||||
handleWithdraw(row) {
|
||||
this.$modal.confirm('是否确认撤回请假申请编号为"' + row.applyId + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return updateApproval({
|
||||
approvalId: row.approvalId,
|
||||
approvalStatus: '已撤销'
|
||||
});
|
||||
// 撤销审批
|
||||
return withdrawApproval(row.approvalId)
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
|
||||
Reference in New Issue
Block a user