1、相关方人员-pc端离职流程简化

liujun-人员离职流程简化
liujun 2024-12-17 18:12:17 +08:00
parent 933a5e995b
commit 3b45fa6e24
1 changed files with 58 additions and 38 deletions

View File

@ -134,7 +134,7 @@
<template slot-scope="{row}">
<div style="display: flex;">
<div style="margin-right: 13px;">
<el-button v-if="row.USER_ID != userId" type="primary" icon="el-icon-view" size="mini" @click="handleShow(row)"></el-button>
<el-button v-if="row.USER_ID !== userId" type="primary" icon="el-icon-view" size="mini" @click="handleShow(row)"></el-button>
<el-button v-if="row.AUDIT_STATE == 1 && row.USER_ID != userId" type="success" icon="el-icon-s-check" size="mini" @click="handleEditState(row)"></el-button>
</div>
<template v-show="loginUser.ACCOUNT_TYPE === '0'">
@ -146,6 +146,7 @@
</template>
<el-button v-if="row.ACCOUNT_TYPE == '1'" type="info" icon="el-icon-postcard" size="mini" @click="handlePrinting(row)"></el-button>
<el-button v-if="row.ISPUSH == '0'" type="primary" icon="el-icon-position" size="mini" @click="goPush(row)"></el-button>
<el-button v-if="row.USER_ID !== userId" type="danger" icon="el-icon-position" size="mini" @click="resign(row)"></el-button>
</div>
</template>
</el-table-column>
@ -452,10 +453,10 @@ export default {
this.$refs.tree.filter(val)
}
},
created() {
this.getList('')
this.hasButton()
this.getTreeList()
async created() {
await this.getList('')
await this.hasButton()
await this.getTreeList()
},
methods: {
goPush(row) {
@ -499,6 +500,23 @@ export default {
this.listLoading = false
})
},
resign() {
this.$confirm('确定后该员工会离职, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '离职成功!'
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消离职'
})
})
},
getRowKey(row) {
return row.USER_ID
},
@ -655,7 +673,7 @@ export default {
},
getList(DEPARTMENT_ID) {
console.info(DEPARTMENT_ID)
return new Promise((resolve, reject) => {
this.listLoading = true
if (DEPARTMENT_ID) {
this.DEPARTMENT_ID = DEPARTMENT_ID
@ -677,7 +695,6 @@ export default {
).then((data) => {
this.listLoading = false
this.varList = data.userList
console.log(this.varList)
for (let i = 0; i < this.varList.length; i++) {
if (this.varList[i].cardImgCount) {
this.varList[i].BASIC_STATE = 1
@ -688,8 +705,11 @@ export default {
}
}
this.total = data.page.total
resolve()
}).catch((e) => {
this.listLoading = false
reject()
})
})
},
//