| | |
| | | <el-main> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-button type="danger" @click="showXzyg">新增员工</el-button> |
| | | <el-button type="danger" @click="showXzyg(0)">新增员工</el-button> |
| | | <el-button type="primary" @click="delEmp">删除员工</el-button> |
| | | <el-button type="danger" @click="showYgdg(0)">员工调岗</el-button> |
| | | <el-button type="danger" @click="showDryg(0)">导入员工</el-button> |
| | |
| | | <el-table-column prop="sexName" label="性别" width="50" /> |
| | | <el-table-column prop="age" label="年龄" /> |
| | | <el-table-column prop="educationName" label="最高学历" width="100" /> |
| | | <el-table-column prop="censusAddress" label="籍贯" /> |
| | | <el-table-column prop="nativePlaceName" label="籍贯" /> |
| | | <el-table-column prop="telePhone" label="联系电话" /> |
| | | <el-table-column prop="entryDate" label="入职日期" width="100" /> |
| | | <el-table-column prop="delFlag" label="员工状态"> |
| | |
| | | size: 20, |
| | | num: 1 |
| | | }, |
| | | empBaseInfoForm: {}, |
| | | empBaseInfoForm: { |
| | | empId: '', |
| | | customerId: '', |
| | | archivesNumb: '', |
| | | deptId: '', |
| | | deptName: '', |
| | | empNumb: '', |
| | | empName: '', |
| | | sex: '1', |
| | | JobId: '', |
| | | jobName: '', |
| | | empType: '1', |
| | | certificateType: '', |
| | | certificateNumb: '', |
| | | nation: '01', |
| | | certificateValidity: '', |
| | | marriage: '1', |
| | | age: '', |
| | | stature: '', |
| | | birthdate: '', |
| | | politics: '13', |
| | | entryDate: '', |
| | | education: '61', |
| | | seniority: '', |
| | | nativePlace: '', |
| | | nativePlaceName: '', |
| | | censusAddress: '', |
| | | currentAddress: '', |
| | | guardNumb: '', |
| | | telePhone: '', |
| | | returnReceipt: '', |
| | | introducer: '', |
| | | archivesStatus: '0', |
| | | bankName: '', |
| | | bankNumb: '', |
| | | InsuranceType: '', |
| | | socialNumb: '', |
| | | family: '', |
| | | handbookStatus: '0', |
| | | urgencyPhone: '', |
| | | empCardStatus: '0', |
| | | certificateList: '', |
| | | createTime: '', |
| | | creator: '', |
| | | modifyTime: '', |
| | | modifier: '', |
| | | delFlag: '0', |
| | | empStatus: 0, |
| | | version: '' |
| | | }, |
| | | ygdgForm: {}, |
| | | gbdaForm: {}, |
| | | depts: [], |
| | |
| | | calculateSeniority(val) { |
| | | this.empBaseInfoForm.seniority = calculateSeniority(val) |
| | | }, |
| | | cleanEmpBase() { |
| | | this.empBaseInfoForm.empId = '' |
| | | this.empBaseInfoForm.customerId = '' |
| | | this.empBaseInfoForm.archivesNumb = '' |
| | | this.empBaseInfoForm.deptId = '' |
| | | this.empBaseInfoForm.deptName = '' |
| | | this.empBaseInfoForm.empNumb = '' |
| | | this.empBaseInfoForm.empName = '' |
| | | this.empBaseInfoForm.sex = '' |
| | | this.empBaseInfoForm.JobId = '' |
| | | this.empBaseInfoForm.jobName = '' |
| | | this.empBaseInfoForm.empType = '' |
| | | this.empBaseInfoForm.certificateType = '' |
| | | this.empBaseInfoForm.certificateNumb = '' |
| | | this.empBaseInfoForm.nation = '' |
| | | this.empBaseInfoForm.certificateValidity = '' |
| | | this.empBaseInfoForm.marriage = '' |
| | | this.empBaseInfoForm.age = '' |
| | | this.empBaseInfoForm.stature = '' |
| | | this.empBaseInfoForm.birthdate = '' |
| | | this.empBaseInfoForm.politics = '' |
| | | this.empBaseInfoForm.entryDate = '' |
| | | this.empBaseInfoForm.education = '' |
| | | this.empBaseInfoForm.seniority = '' |
| | | this.empBaseInfoForm.nativePlace = '' |
| | | this.empBaseInfoForm.nativePlaceName = '' |
| | | this.empBaseInfoForm.censusAddress = '' |
| | | this.empBaseInfoForm.currentAddress = '' |
| | | this.empBaseInfoForm.guardNumb = '' |
| | | this.empBaseInfoForm.telePhone = '' |
| | | this.empBaseInfoForm.returnReceipt = '' |
| | | this.empBaseInfoForm.introducer = '' |
| | | this.empBaseInfoForm.archivesStatus = '' |
| | | this.empBaseInfoForm.bankName = '' |
| | | this.empBaseInfoForm.bankNumb = '' |
| | | this.empBaseInfoForm.InsuranceType = '' |
| | | this.empBaseInfoForm.socialNumb = '' |
| | | this.empBaseInfoForm.family = '' |
| | | this.empBaseInfoForm.handbookStatus = '' |
| | | this.empBaseInfoForm.urgencyPhone = '' |
| | | this.empBaseInfoForm.empCardStatus = '' |
| | | this.empBaseInfoForm.certificateList = '' |
| | | this.empBaseInfoForm.createTime = '' |
| | | this.empBaseInfoForm.creator = '' |
| | | this.empBaseInfoForm.modifyTime = '' |
| | | this.empBaseInfoForm.modifier = '' |
| | | this.empBaseInfoForm.delFlag = '' |
| | | this.empBaseInfoForm.version = '' |
| | | }, |
| | | editEmpBase(row) { |
| | | this.isAdd = false |
| | | this.empBaseInfoForm.empId = row.empId |
| | | this.empBaseInfoForm.customerId = row.customerId |
| | | this.empBaseInfoForm.archivesNumb = row.archivesNumb |
| | | this.empBaseInfoForm.deptId = row.deptId |
| | | this.empBaseInfoForm.deptName = row.deptName |
| | | this.empBaseInfoForm.empNumb = row.empNumb |
| | | this.empBaseInfoForm.empName = row.empName |
| | | this.empBaseInfoForm.sex = row.sex |
| | | this.empBaseInfoForm.JobId = row.JobId |
| | | this.empBaseInfoForm.jobName = row.jobName |
| | | this.empBaseInfoForm.empType = row.empType |
| | | this.empBaseInfoForm.certificateType = row.certificateType |
| | | this.empBaseInfoForm.certificateNumb = row.certificateNumb |
| | | this.empBaseInfoForm.nation = row.nation |
| | | this.empBaseInfoForm.certificateValidity = row.certificateValidity |
| | | this.empBaseInfoForm.marriage = row.marriage |
| | | this.empBaseInfoForm.age = row.age |
| | | this.empBaseInfoForm.stature = row.stature |
| | | this.empBaseInfoForm.birthdate = row.birthdate |
| | | this.empBaseInfoForm.politics = row.politics |
| | | this.empBaseInfoForm.entryDate = row.entryDate |
| | | this.empBaseInfoForm.education = row.education |
| | | this.empBaseInfoForm.seniority = row.seniority |
| | | this.empBaseInfoForm.nativePlace = row.nativePlace |
| | | this.empBaseInfoForm.censusAddress = row.censusAddress |
| | | this.empBaseInfoForm.currentAddress = row.currentAddress |
| | | this.empBaseInfoForm.guardNumb = row.guardNumb |
| | | this.empBaseInfoForm.telePhone = row.telePhone |
| | | this.empBaseInfoForm.returnReceipt = row.returnReceipt |
| | | this.empBaseInfoForm.introducer = row.introducer |
| | | this.empBaseInfoForm.archivesStatus = row.archivesStatus |
| | | this.empBaseInfoForm.bankName = row.bankName |
| | | this.empBaseInfoForm.bankNumb = row.bankNumb |
| | | this.empBaseInfoForm.InsuranceType = row.InsuranceType |
| | | this.empBaseInfoForm.socialNumb = row.socialNumb |
| | | this.empBaseInfoForm.family = row.family |
| | | this.empBaseInfoForm.handbookStatus = row.handbookStatus |
| | | this.empBaseInfoForm.urgencyPhone = row.urgencyPhone |
| | | this.empBaseInfoForm.empCardStatus = row.empCardStatus |
| | | this.empBaseInfoForm.certificateList = row.certificateList |
| | | this.empBaseInfoForm.createTime = row.createTime |
| | | this.empBaseInfoForm.creator = row.creator |
| | | this.empBaseInfoForm.modifyTime = row.modifyTime |
| | | this.empBaseInfoForm.modifier = row.modifier |
| | | this.empBaseInfoForm.delFlag = row.delFlag |
| | | this.empBaseInfoForm.version = row.version |
| | | this.showXzyg(1) |
| | | }, |
| | | putEmpBase(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | |
| | | type: 'success' |
| | | }) |
| | | this.cleanEmpBase() |
| | | this.selectEmpBase() |
| | | }) |
| | | } else { |
| | | this.$put('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => { |
| | |
| | | }) |
| | | this.$emit('success') |
| | | this.cleanEmpBase() |
| | | this.selectEmpBase() |
| | | }) |
| | | } |
| | | this.fetch() |
| | |
| | | showEmpInfo() { |
| | | this.dialogTableVisible = true |
| | | }, |
| | | showXzyg() { |
| | | if (!this.dialogShowXzyg) { |
| | | showXzyg(val) { |
| | | if (val === 0) { |
| | | this.isAdd = true |
| | | } |
| | | if (!this.dialogShowXzyg) { |
| | | // this.isAdd = true |
| | | this.dialogShowXzyg = true |
| | | } else { |
| | | this.isAdd = false |
| | | // this.isAdd = false |
| | | this.dialogShowXzyg = false |
| | | } |
| | | }, |
| | |
| | | cb(results) |
| | | }, |
| | | jobNameSelect(item) { |
| | | this.ygdgForm.jobName = item.value |
| | | this.ygdgForm.JobId = item.code |
| | | this.empBaseInfoForm.jobName = item.value |
| | | this.empBaseInfoForm.JobId = item.code |
| | | }, |
| | | generateUserInfo(index, val) { |
| | | var userinfo = toCardGetUserInfo(val) |