This commit is contained in:
liushuai
2020-05-09 17:41:04 +08:00
parent 443d0e3ab6
commit 0ef126be10
7 changed files with 102 additions and 41 deletions

View File

@@ -160,6 +160,11 @@
{{ 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.岗位名称 }}
@@ -318,6 +323,19 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="班组" prop="Post">
<el-select v-model="people_form.TeamValue" clearable placeholder="请选择班组" style="width: 200px" size="small">
<el-option
v-for="item in Team"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="btnLoading" @click="cancel">取消</el-button>
@@ -437,7 +455,7 @@
</template>
<script>
import { moveGroups, getTree, tree, getTablePeople, getTablePeopleForName, addDepartmentName, delList, editList, delPeopleList, fetchEducationData, fetchPostData, addPeople, editPeople, quit, searchLeavingList } from '@/api/BasicData/PersonnelManagement'
import { fetchteamviwer, moveGroups, getTree, tree, getTablePeople, getTablePeopleForName, addDepartmentName, delList, editList, delPeopleList, fetchEducationData, fetchPostData, addPeople, editPeople, quit, searchLeavingList } from '@/api/BasicData/PersonnelManagement'
import { uploadPerson } from '@/utils/request'
import { readFile } from '@/utils/request'
import request from '@/utils/request'
@@ -445,6 +463,7 @@ import request from '@/utils/request'
export default {
data() {
return {
Team: [],
handleAdd_disable: false,
addPeople_disable: false,
limit: 999,
@@ -496,7 +515,9 @@ export default {
PositionStatus: null,
Education: null,
Post: null,
PeopleID: null
PeopleID: null,
TeamValue: ''
},
rules: {
Name: [{ required: true, message: '请输入', trigger: 'blur' }],
@@ -535,8 +556,20 @@ export default {
this.getTreeData()
this.fetchEducationData()
this.fetchPostData()
this.fetchTeamViwer()
},
methods: {
// 获取班组信息
fetchTeamViwer() {
fetchteamviwer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Team.push({
label: response.data[i].班组名称,
value: response.data[i].班组流水号
})
}
})
},
// 删除人员照片
deletePhoto(row) {
this.$confirm('此操作将永久删除该图片, 是否继续?', '提示', {
@@ -771,7 +804,7 @@ export default {
submitAddPeople() {
this.addPeople_disable = true
this.btnLoading = true
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 => {
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, this.people_form.TeamValue).then(response => {
this.btnLoading = false
if (response.data[0].result === '1') {
this.people_DFV = false
@@ -800,11 +833,12 @@ export default {
this.people_form.TimeOfEntry = row.入公司时间
this.people_form.Birthday = row.出生日期
this.people_form.ContactInformation = row.联系电话
this.people_form.TeamValue = parseInt(row.班组流水号)
},
submitEditPeople() {
this.addPeople_disable = true
this.btnLoading = true
editPeople(this.people_form.PeopleID, 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 => {
editPeople(this.people_form.PeopleID, 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, this.people_form.TeamValue).then(response => {
this.btnLoading = false
if (response.data[0].result === '1') {
if (this.id !== '' && this.Name === '') {