| | |
| | | </el-table> |
| | | <el-table |
| | | v-show="showArr[1].show" |
| | | :data="jobContentData" |
| | | ref="workExperienceTable" |
| | | :data="workExperienceData" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | /> |
| | | <el-table-column |
| | | fixed="left" |
| | | label="操作" |
| | | width="100" |
| | | > |
| | | <template> |
| | | <el-button type="text" size="small">编辑</el-button> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="editWorkExperience(scope.row)">编辑</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="userNumb" |
| | | label="员工编号" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | label="姓名" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | prop="sex" |
| | | label="性别" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | prop="idNumber" |
| | | label="身份证号码" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | prop="startDate" |
| | | label="开始时间" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | prop="endDate" |
| | | label="结束时间" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | prop="jobContent" |
| | | label="主要工作内容" |
| | | width="300" |
| | | /> |
| | | <el-table-column prop="empNumb" label="员工编号" width="180" /> |
| | | <el-table-column prop="empName" label="员工姓名" width="180" /> |
| | | <el-table-column prop="certificateNumb" label="证件号码" width="180" /> |
| | | <el-table-column prop="workUnit" label="工作单位" width="180" /> |
| | | <el-table-column prop="beginDate" label="开始日期" width="180" /> |
| | | <el-table-column prop="endDate" label="结束日期" width="180" /> |
| | | <el-table-column prop="jobContent" label="主要工作内容" width="180" /> |
| | | </el-table> |
| | | <el-table |
| | | v-show="showArr[2].show" |
| | |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="工作经历" :visible.sync="dialogshowArr[1].show" width="50%"> |
| | | <el-form :model="jobContentForm" label-position="right" label-width="120px"> |
| | | <el-form :model="workExperienceForm" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="员工编号"> |
| | | <el-input v-model="jobContentForm.name" /> |
| | | <el-input v-model="workExperienceForm.empNumb" /> |
| | | </el-form-item> |
| | | <el-form-item label="身份证号码"> |
| | | <el-input v-model="jobContentForm.name" /> |
| | | <el-input v-model="workExperienceForm.certificateNumb" /> |
| | | </el-form-item> |
| | | <el-form-item label="部门名称"> |
| | | <el-input v-model="workExperienceForm.deptName" /> |
| | | </el-form-item> |
| | | <el-form-item label="开始时间"> |
| | | <el-date-picker |
| | | v-model="jobContentForm.name" |
| | | v-model="workExperienceForm.beginDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="姓名"> |
| | | <el-input v-model="jobContentForm.name" /> |
| | | <el-input v-model="workExperienceForm.empName" /> |
| | | </el-form-item> |
| | | <el-form-item label="性别" prop="region"> |
| | | <el-select v-model="jobContentForm.name" placeholder="请选择性别"> |
| | | <el-select v-model="workExperienceForm.sex" placeholder="请选择性别"> |
| | | <el-option label="男" value="1" /> |
| | | <el-option label="女" value="2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="岗位名称"><el-input v-model="workExperienceForm.jobName" /></el-form-item> |
| | | <el-form-item label="结束时间"> |
| | | <el-date-picker |
| | | v-model="jobContentForm.name" |
| | | v-model="workExperienceForm.endDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="工作单位"> |
| | | <el-input v-model="jobContentForm.name" /> |
| | | <el-input v-model="workExperienceForm.workUnit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="主要工作内容"> |
| | | <el-input v-model="jobContentForm.name" type="textarea" /> |
| | | <el-input v-model="workExperienceForm.jobContent" type="textarea" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="putWorkExperience()">保 存</el-button> |
| | | <el-button type="primary" @click="putWorkExperienceContinue()">保存并继续新增</el-button> |
| | | <el-button @click="dialogIsShow()">取 消</el-button> |
| | | <el-button type="primary" @click="dialogIsShow()">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | reviewRecords: '2019-02-05', |
| | | remark: '' |
| | | }], |
| | | jobContentData: [{ |
| | | name: '王小虎', |
| | | userNumb: '12321222', |
| | | sex: '女', |
| | | idNumber: '430422199823222222', |
| | | startDate: '2020-01-01', |
| | | endDate: '2020-01-01', |
| | | jobContent: '深圳市宇川智能系统' |
| | | }, { |
| | | name: '王小虎', |
| | | userNumb: '12321222', |
| | | sex: '女', |
| | | idNumber: '430422199823222222', |
| | | startDate: '2020-01-01', |
| | | endDate: '2020-01-01', |
| | | jobContent: '深圳市宇川智能系统' |
| | | }, { |
| | | name: '王小虎', |
| | | userNumb: '12321222', |
| | | sex: '女', |
| | | idNumber: '430422199823222222', |
| | | startDate: '2020-01-01', |
| | | endDate: '2020-01-01', |
| | | jobContent: '深圳市宇川智能系统' |
| | | }], |
| | | workExperienceData: [], |
| | | basicInformationData: [], |
| | | contractData: [{ |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | national: '汉', |
| | | idNumber: '430422199823222222', |
| | | contractStartDate: '2020-01-12', |
| | | contractEndDate: '2020-01-12', |
| | | contractYear: '10', |
| | | contractStatus: '正常', |
| | | contractTransactor: '盘琪', |
| | | contractDate: '2020-01-12', |
| | | remark: '' |
| | | }, { |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | national: '汉', |
| | | idNumber: '430422199823222222', |
| | | contractStartDate: '2020-01-12', |
| | | contractEndDate: '2020-01-12', |
| | | contractYear: '10', |
| | | contractStatus: '正常', |
| | | contractTransactor: '盘琪', |
| | | contractDate: '2020-01-12', |
| | | remark: '' |
| | | }, { |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | national: '汉', |
| | | idNumber: '430422199823222222', |
| | | contractStartDate: '2020-01-12', |
| | | contractEndDate: '2020-01-12', |
| | | contractYear: '10', |
| | | contractStatus: '正常', |
| | | contractTransactor: '盘琪', |
| | | contractDate: '2020-01-12', |
| | | remark: '' |
| | | }, { |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | national: '汉', |
| | | idNumber: '430422199823222222', |
| | | contractStartDate: '2020-01-12', |
| | | contractEndDate: '2020-01-12', |
| | | contractYear: '10', |
| | | contractStatus: '正常', |
| | | contractTransactor: '盘琪', |
| | | contractDate: '2020-01-12', |
| | | remark: '' |
| | | }, { |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | national: '汉', |
| | | idNumber: '430422199823222222', |
| | | contractStartDate: '2020-01-12', |
| | | contractEndDate: '2020-01-12', |
| | | contractYear: '10', |
| | | contractStatus: '正常', |
| | | contractTransactor: '盘琪', |
| | | contractDate: '2020-01-12', |
| | | remark: '' |
| | | }, { |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | national: '汉', |
| | | idNumber: '430422199823222222', |
| | | contractStartDate: '2020-01-12', |
| | | contractEndDate: '2020-01-12', |
| | | contractYear: '10', |
| | | contractStatus: '正常', |
| | | contractTransactor: '盘琪', |
| | | contractDate: '2020-01-12', |
| | | remark: '' |
| | | }, { |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | national: '汉', |
| | | idNumber: '430422199823222222', |
| | | contractStartDate: '2020-01-12', |
| | | contractEndDate: '2020-01-12', |
| | | contractYear: '10', |
| | | contractStatus: '正常', |
| | | contractTransactor: '盘琪', |
| | | contractDate: '2020-01-12', |
| | | remark: '' |
| | | }], |
| | | attendanceData: [{ |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | idNumber: '430422199823222222', |
| | | attendanceMonth: '2020-01', |
| | | attendanceDay: '129', |
| | | overtimeDay: '8', |
| | | overtimeHour: '150', |
| | | charge: '有', |
| | | leaveDay: '1', |
| | | absenteeismDay: '1', |
| | | remark: '有' |
| | | }, { |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | idNumber: '430422199823222222', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | attendanceMonth: '2020-01', |
| | | attendanceDay: '129', |
| | | overtimeDay: '8', |
| | | overtimeHour: '150', |
| | | charge: '有', |
| | | leaveDay: '1', |
| | | absenteeismDay: '1', |
| | | remark: '有' |
| | | }, { |
| | | userNumb: '12321222', |
| | | idNumber: '430422199823222222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | attendanceMonth: '2020-01', |
| | | attendanceDay: '129', |
| | | overtimeDay: '8', |
| | | overtimeHour: '150', |
| | | charge: '有', |
| | | leaveDay: '1', |
| | | absenteeismDay: '1', |
| | | remark: '有' |
| | | }], |
| | | leaveData: [{ |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | idNumber: '430422199823222222', |
| | | leaveStartDate: '2020-01-01', |
| | | leaveEndDate: '2020-01-01', |
| | | leaveDay: '1', |
| | | leaveType: '病假', |
| | | comeDate: '2020-01-01', |
| | | report: '盘琪', |
| | | remark: '请假按摩' |
| | | |
| | | }, { |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | idNumber: '430422199823222222', |
| | | leaveStartDate: '2020-01-01', |
| | | leaveEndDate: '2020-01-01', |
| | | leaveDay: '1', |
| | | leaveType: '病假', |
| | | comeDate: '2020-01-01', |
| | | report: '盘琪', |
| | | remark: '请假按摩' |
| | | }, { |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | | deptName: '开发部', |
| | | sex: '女', |
| | | idNumber: '430422199823222222', |
| | | leaveStartDate: '2020-01-01', |
| | | leaveEndDate: '2020-01-01', |
| | | leaveDay: '1', |
| | | leaveType: '病假', |
| | | comeDate: '2020-01-01', |
| | | report: '盘琪', |
| | | remark: '请假按摩' |
| | | }], |
| | | contractData: [], |
| | | attendanceData: [], |
| | | leaveData: [], |
| | | resignData: [{ |
| | | userNumb: '12321222', |
| | | name: '王小虎', |
| | |
| | | 'prop12': '', |
| | | 'prop13': '' |
| | | }], |
| | | |
| | | badRecordData: [], |
| | | |
| | | data5: [{ |
| | | 'prop0': '', |
| | | 'prop1': '编辑', |
| | |
| | | reviewRecords: '', |
| | | remark: '' |
| | | }, |
| | | jobContentForm: { |
| | | name: '', |
| | | userNumb: '', |
| | | workExperienceForm: { |
| | | workExperienceId: '', |
| | | empId: '', |
| | | empNumb: '', |
| | | empName: '', |
| | | certificateNumb: '', |
| | | sex: '', |
| | | idNumber: '', |
| | | startDate: '', |
| | | deptId: '', |
| | | deptName: '', |
| | | JobId: '', |
| | | jobName: '', |
| | | workUnit: '', |
| | | beginDate: '', |
| | | endDate: '', |
| | | jobContent: '' |
| | | jobContent: '', |
| | | createTime: '', |
| | | creator: '', |
| | | modifyTime: '', |
| | | modifier: '', |
| | | delFlag: '', |
| | | version: '' |
| | | }, |
| | | empBaseInfoForm: { |
| | | empId: '', |
| | |
| | | }, mounted() { |
| | | this.getBadRecord() |
| | | this.selectEmpBase() |
| | | this.selectWorkExperience() |
| | | }, |
| | | methods: { |
| | | dialogIsShow() { |
| | |
| | | this.dialogshowArr[12].show = true |
| | | }, |
| | | butDelete() { |
| | | if (this.thisShowIndex === 12) { |
| | | var selected = this.$refs.badRecordTable.selection |
| | | if (selected.length > 0) { |
| | | const badIds = [] |
| | | selected.forEach((j) => { |
| | | badIds.push(j.badId) |
| | | }) |
| | | this.$delete(`hr/empBadRecord/` + badIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.deleteSuccess'), |
| | | type: 'success' |
| | | switch (this.thisShowIndex) { |
| | | case 1: |
| | | var selected = this.$refs.workExperienceTable.selection |
| | | if (selected.length > 0) { |
| | | const delIds = [] |
| | | selected.forEach((j) => { |
| | | delIds.push(j.workExperienceId) |
| | | }) |
| | | this.getBadRecord() |
| | | }) |
| | | } |
| | | this.$delete(`hr/empWorkExperience/` + delIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.deleteSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.selectWorkExperience() |
| | | }) |
| | | } |
| | | break |
| | | case 12: |
| | | // eslint-disable-next-line no-redeclare |
| | | var selected = this.$refs.badRecordTable.selection |
| | | if (selected.length > 0) { |
| | | const badIds = [] |
| | | selected.forEach((j) => { |
| | | badIds.push(j.badId) |
| | | }) |
| | | this.$delete(`hr/empBadRecord/` + badIds).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.deleteSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.getBadRecord() |
| | | }) |
| | | } |
| | | break |
| | | } |
| | | }, |
| | | |
| | | selectEmpBase() { |
| | | this.$get('hr/empBaseInfo/list').then((r) => { |
| | | this.basicInformationData = r.data.data.rows |
| | |
| | | }) |
| | | } |
| | | this.dialogIsShow() |
| | | }, |
| | | selectWorkExperience() { |
| | | this.$get('hr/empWorkExperience/list').then((r) => { |
| | | this.workExperienceData = r.data.data.rows |
| | | }).catch((error) => { |
| | | console.error(error) |
| | | this.$message({ |
| | | message: this.$t('tips.getDataFail'), |
| | | type: 'error' |
| | | }) |
| | | }) |
| | | }, |
| | | putWorkExperience() { |
| | | if (this.isAdd) { |
| | | this.$post('hr/empWorkExperience', { ...this.workExperienceForm }).then(() => { |
| | | this.buttonLoading = false |
| | | this.$message({ |
| | | message: this.$t('tips.createSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.cleanWorkExperience() |
| | | this.selectWorkExperience() |
| | | }) |
| | | } else { |
| | | this.$put('hr/empWorkExperience', { ...this.workExperienceForm }).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.updateSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.$emit('success') |
| | | this.cleanWorkExperience() |
| | | this.selectWorkExperience() |
| | | }) |
| | | } |
| | | this.dialogIsShow() |
| | | }, |
| | | putWorkExperienceContinue() { |
| | | if (this.isAdd) { |
| | | this.$post('hr/empWorkExperience', { ...this.workExperienceForm }).then(() => { |
| | | this.buttonLoading = false |
| | | this.$message({ |
| | | message: this.$t('tips.createSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.cleanWorkExperience() |
| | | this.selectWorkExperience() |
| | | }) |
| | | } |
| | | }, |
| | | cleanWorkExperience() { |
| | | this.workExperienceForm.workUnit = '' |
| | | this.workExperienceForm.beginDate = '' |
| | | this.workExperienceForm.endDate = '' |
| | | this.workExperienceForm.jobContent = '' |
| | | this.workExperienceForm.createTime = '' |
| | | this.workExperienceForm.creator = '' |
| | | this.workExperienceForm.modifyTime = '' |
| | | this.workExperienceForm.modifier = '' |
| | | this.workExperienceForm.delFlag = '' |
| | | this.workExperienceForm.version = '' |
| | | }, |
| | | editWorkExperience(row) { |
| | | this.isAdd = false |
| | | this.workExperienceForm.workExperienceId = row.workExperienceId |
| | | this.workExperienceForm.empId = row.empId |
| | | this.workExperienceForm.empNumb = row.empNumb |
| | | this.workExperienceForm.empName = row.empName |
| | | this.workExperienceForm.certificateNumb = row.certificateNumb |
| | | this.workExperienceForm.sex = row.sex |
| | | this.workExperienceForm.deptId = row.deptId |
| | | this.workExperienceForm.deptName = row.deptName |
| | | this.workExperienceForm.JobId = row.JobId |
| | | this.workExperienceForm.jobName = row.jobName |
| | | this.workExperienceForm.workUnit = row.workUnit |
| | | this.workExperienceForm.beginDate = row.beginDate |
| | | this.workExperienceForm.endDate = row.endDate |
| | | this.workExperienceForm.jobContent = row.jobContent |
| | | this.workExperienceForm.createTime = row.createTime |
| | | this.workExperienceForm.creator = row.creator |
| | | this.workExperienceForm.modifyTime = row.modifyTime |
| | | this.workExperienceForm.modifier = row.modifier |
| | | this.workExperienceForm.delFlag = row.delFlag |
| | | this.workExperienceForm.version = row.version |
| | | this.dialogshowArr[1].show = true |
| | | } |
| | | } |
| | | } |