feat: resignation支持删除操作

This commit is contained in:
caoqianming 2025-11-09 23:15:36 +08:00
parent 84e447527a
commit 83fe31b76a
2 changed files with 24 additions and 0 deletions

View File

@ -187,5 +187,13 @@ export default {
data);
}
},
delete: {
name: "删除",
req: async function(id){
return await http.delete(
`${config.API_URL}/hrm/resignation/${id}/`
);
}
},
}
}

View File

@ -26,6 +26,11 @@
</el-form-item>
</el-form>
<el-footer>
<el-button type="danger"
v-if="localMode=='edit'"
style="margin-right: 4px;"
@click="handleDel"
>删除</el-button>
<ticketd_b
:workflow_key="'wf_resignation'"
:title="ticketTitle"
@ -108,6 +113,17 @@ export default {
console.error('获取离职数据失败:', error);
}
},
handleDel() {
this.$confirm(`确定删除吗?`, "提示", {
type: "warning",
})
.then(()=>{
this.$API.hrm.resignation.delete.req(this.formData.id).then(res=>{
this.$message.success("删除成功");
this.$emit('success');
})
})
},
async submit_b_func() {
if (this.localMode == "add") {
try {