|
|
|
|
@@ -15,6 +15,8 @@
|
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="fetchPeopleForName"/>
|
|
|
|
|
</el-input>
|
|
|
|
|
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addPeople()">新增</el-button>
|
|
|
|
|
<el-button type="danger" icon="el-icon-circle-close-outline" size="small" @click="Quit()">离职</el-button>
|
|
|
|
|
<el-button type="text" size="small" style="float: right" @click="searchLeavingList">离职名单</el-button>
|
|
|
|
|
<!--<el-button v-popover:popover4 type="success" icon="el-icon-sort" size="small" @click="moveGroup">移动-->
|
|
|
|
|
<!--</el-button>-->
|
|
|
|
|
<!--<el-button size="small" @click="postMaintain()">岗位维护</el-button>-->
|
|
|
|
|
@@ -51,7 +53,7 @@
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-card class="box-card" style="min-height: 743px; max-height: 743px">
|
|
|
|
|
<el-card class="box-card" style="min-height: 700px; max-height: 743px">
|
|
|
|
|
<div slot="header" class="clearfix">
|
|
|
|
|
<span>部门维护</span>
|
|
|
|
|
<el-button style="float: right; padding: 3px 0" type="text" @click="expandALL()">展开</el-button>
|
|
|
|
|
@@ -77,9 +79,10 @@
|
|
|
|
|
stripe
|
|
|
|
|
tooltip-effect="dark"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
height="679"
|
|
|
|
|
height="659"
|
|
|
|
|
highlight-current-row
|
|
|
|
|
border
|
|
|
|
|
size="mini"
|
|
|
|
|
@selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="selection"
|
|
|
|
|
@@ -168,7 +171,7 @@
|
|
|
|
|
<el-pagination
|
|
|
|
|
:current-page="PageCurrent"
|
|
|
|
|
:page-sizes="[10, 20, 30, 40]"
|
|
|
|
|
:page-size="10"
|
|
|
|
|
:page-size="PageSize"
|
|
|
|
|
:total="total"
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
@size-change="handleSizeChange"
|
|
|
|
|
@@ -291,14 +294,108 @@
|
|
|
|
|
<el-button v-else-if="people_title === '编辑人员'" type="primary" @click="submitEditPeople">确定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!--离职名单-->
|
|
|
|
|
<el-dialog :visible.sync="LeavingListVisiable" title="离职名单" center style="height: 800px" width="80%">
|
|
|
|
|
<el-table
|
|
|
|
|
:data="LeavingList"
|
|
|
|
|
stripe
|
|
|
|
|
tooltip-effect="dark"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
height="500"
|
|
|
|
|
highlight-current-row
|
|
|
|
|
border
|
|
|
|
|
size="mini">
|
|
|
|
|
<el-table-column align="center" label="部门名称" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.节点名称 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="考勤编号" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.考勤编号 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="密码" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.密码 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="姓名" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.姓名 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="性别" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.性别 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="身份证号" width="165">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.身份证号 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="学历" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.学历名称 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="入职时间" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.入公司时间 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="出生日期" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.出生日期 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="联系方式" width="110">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.联系电话 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="岗位工种" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.岗位名称 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="民族" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.民族 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="家庭住址" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.家庭住址 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<div class="block" style="margin-top: 10px;">
|
|
|
|
|
<el-pagination
|
|
|
|
|
:current-page="PageCurrentN"
|
|
|
|
|
:page-sizes="[10, 20, 30, 40]"
|
|
|
|
|
:page-size="PageSizeN"
|
|
|
|
|
:total="totalN"
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
@size-change="handleSizeChangeN"
|
|
|
|
|
@current-change="handleCurrentChangeN"/>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getTree, tree, getTablePeople, getTablePeopleForName, addDepartmentName, delList, editList, delPeopleList, fetchEducationData, fetchPostData, addPeople, editPeople } from '@/api/BasicData/PersonnelManagement'
|
|
|
|
|
import { getTree, tree, getTablePeople, getTablePeopleForName, addDepartmentName, delList, editList, delPeopleList, fetchEducationData, fetchPostData, addPeople, editPeople, quit, searchLeavingList } from '@/api/BasicData/PersonnelManagement'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
PageCurrentN: 1,
|
|
|
|
|
PageSizeN: 10,
|
|
|
|
|
totalN: null,
|
|
|
|
|
LeavingList: [],
|
|
|
|
|
LeavingListVisiable: false,
|
|
|
|
|
departmentData: [],
|
|
|
|
|
expandAll: true,
|
|
|
|
|
i: 1,
|
|
|
|
|
@@ -449,6 +546,7 @@ export default {
|
|
|
|
|
if (response.data[0].result === '1') {
|
|
|
|
|
this.getTreeData()
|
|
|
|
|
this.$message.success('添加成功')
|
|
|
|
|
this.i = 0
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('添加失败')
|
|
|
|
|
}
|
|
|
|
|
@@ -458,6 +556,7 @@ export default {
|
|
|
|
|
if (response.data[0].result === '1') {
|
|
|
|
|
this.getTreeData()
|
|
|
|
|
this.$message.success('添加成功')
|
|
|
|
|
this.i = 1
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('添加失败')
|
|
|
|
|
}
|
|
|
|
|
@@ -538,21 +637,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
addPeople() {
|
|
|
|
|
if (this.id) {
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
|
|
|
|
|
if (response.data[0].result === '1') {
|
|
|
|
|
this.i = 1
|
|
|
|
|
this.handleNodeClick()
|
|
|
|
|
this.$message.success('添加成功')
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('添加失败')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
=======
|
|
|
|
|
this.people_title = '新增人员'
|
|
|
|
|
this.people_DFV = true
|
|
|
|
|
this.addForm('people_form')
|
|
|
|
|
>>>>>>> 7cdb10d153358b72f95165dd7f3a12ad7675f14d
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning(`请选择部门名称`)
|
|
|
|
|
}
|
|
|
|
|
@@ -561,7 +648,7 @@ export default {
|
|
|
|
|
this.people_DFV = false
|
|
|
|
|
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
|
|
|
|
|
if (response.data[0].result === '1') {
|
|
|
|
|
this.i = 1
|
|
|
|
|
this.i = 0
|
|
|
|
|
this.handleNodeClick()
|
|
|
|
|
this.$message.success('添加成功')
|
|
|
|
|
} else {
|
|
|
|
|
@@ -604,6 +691,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
deletePeopleTable(row) {
|
|
|
|
|
this.deleteRow(delPeopleList, row.人员编号, function() { this.id ? this.handleNodeClick() : this.feathPeopleForName() })
|
|
|
|
|
this.i = 0
|
|
|
|
|
},
|
|
|
|
|
postMaintain() {
|
|
|
|
|
|
|
|
|
|
@@ -623,8 +711,49 @@ export default {
|
|
|
|
|
this.total = response.data.total
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleSizeChangeN(val) {
|
|
|
|
|
this.PageSizeN = val
|
|
|
|
|
this.PageCurrentN = 1
|
|
|
|
|
this.getTable(searchLeavingList, [this.PageCurrentN, this.PageSizeN], ['LeavingList', 'totalN'])
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChangeN(val) {
|
|
|
|
|
this.PageCurrentN = val
|
|
|
|
|
this.getTable(searchLeavingList, [this.PageCurrentN, this.PageSizeN], ['LeavingList', 'totalN'])
|
|
|
|
|
},
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
this.multipleSelection = val
|
|
|
|
|
},
|
|
|
|
|
Quit() {
|
|
|
|
|
if (this.multipleSelection.length === 0) {
|
|
|
|
|
this.$message.warning('请选择进行离职操作的员工')
|
|
|
|
|
} else {
|
|
|
|
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
|
|
|
quit(this.multipleSelection[i].人员编号).then(response => {
|
|
|
|
|
if (response.data[0].result === '1') {
|
|
|
|
|
this.$message.success('离职成功')
|
|
|
|
|
getTablePeople(this.id, this.PageCurrent, this.PageSize).then(response => {
|
|
|
|
|
this.List = response.data.rows
|
|
|
|
|
this.total = response.data.total
|
|
|
|
|
})
|
|
|
|
|
} else { this.$message.error('离职失败') }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '已取消离职操作'
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
searchLeavingList() {
|
|
|
|
|
this.LeavingListVisiable = true
|
|
|
|
|
this.getTable(searchLeavingList, [this.PageCurrentN, this.PageSizeN], ['LeavingList', 'totalN'])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|