| | |
| | | </el-main> |
| | | </el-container> |
| | | <el-dialog title="基本信息" :visible.sync="dialogshowArr[0].show" width="50%"> |
| | | <el-form :model="empBaseInfoForm" :rules="rules" label-position="right" label-width="120px"> |
| | | <el-form ref="empBaseInfoForm" :model="empBaseInfoForm" :rules="rules" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="档案号"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="护卫点" required prop="deptNeme"> |
| | | <el-form-item label="护卫点" required message="请选择护卫点" prop="deptNeme"> |
| | | <treeselect |
| | | v-model="empBaseInfoForm.deptId" |
| | | :multiple="false" |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="putEmpBase()">保 存</el-button> |
| | | <el-button type="primary" @click="putEmpBaseContinue()">保存并继续新增</el-button> |
| | | <el-button type="primary" @click="putEmpBase('empBaseInfoForm')">保 存</el-button> |
| | | <el-button type="primary" @click="putEmpBaseContinue('empBaseInfoForm')">保存并继续新增</el-button> |
| | | <el-button @click="dialogIsShow()">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | this.empBaseInfoForm.version = row.version |
| | | this.dialogshowArr[0].show = true |
| | | }, |
| | | putEmpBase() { |
| | | if (this.isAdd) { |
| | | this.$post('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => { |
| | | this.buttonLoading = false |
| | | this.$message({ |
| | | message: this.$t('tips.createSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.cleanEmpBase() |
| | | this.selectEmpBase() |
| | | }) |
| | | } else { |
| | | this.$put('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.updateSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.$emit('success') |
| | | this.cleanEmpBase() |
| | | this.selectEmpBase() |
| | | }) |
| | | } |
| | | this.dialogIsShow() |
| | | putEmpBase(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | if (this.isAdd) { |
| | | this.$post('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => { |
| | | this.buttonLoading = false |
| | | this.$message({ |
| | | message: this.$t('tips.createSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.cleanEmpBase() |
| | | this.selectEmpBase() |
| | | }) |
| | | } else { |
| | | this.$put('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => { |
| | | this.$message({ |
| | | message: this.$t('tips.updateSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.$emit('success') |
| | | this.cleanEmpBase() |
| | | this.selectEmpBase() |
| | | }) |
| | | } |
| | | this.dialogIsShow() |
| | | } |
| | | }) |
| | | }, |
| | | putEmpBaseContinue() { |
| | | if (this.isAdd) { |
| | | this.$post('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => { |
| | | this.buttonLoading = false |
| | | this.$message({ |
| | | message: this.$t('tips.createSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.cleanEmpBase() |
| | | this.selectEmpBase() |
| | | }) |
| | | } |
| | | putEmpBaseContinue(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | if (this.isAdd) { |
| | | this.$post('hr/empBaseInfo', { ...this.empBaseInfoForm }).then(() => { |
| | | this.buttonLoading = false |
| | | this.$message({ |
| | | message: this.$t('tips.createSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.cleanEmpBase() |
| | | this.selectEmpBase() |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | selectWorkExperience() { |
| | | this.$get('hr/empWorkExperience/list') |