| | |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="关闭档案" :visible.sync="dialogShowGbda" width="50%"> |
| | | <el-form :model="gbdaForm" label-position="right" label-width="120px"> |
| | | <el-form ref="gbdaForm" :model="gbdaForm" :rules="gbdaRules" label-position="right" label-width="120px"> |
| | | <el-row> |
| | | <el-col span="24"> |
| | | <el-form-item label="离职类型" prop="region"> |
| | | <el-radio-group v-model="gbdaForm.lzlx"> |
| | | <el-form-item label="离职类型" prop="dimissionType"> |
| | | <el-radio-group v-model="gbdaForm.dimissionType"> |
| | | <el-radio :label="1">正常离职</el-radio> |
| | | <el-radio :label="2">自动离职</el-radio> |
| | | <el-radio :label="3">公司劝退</el-radio> |
| | |
| | | <el-radio :label="5">试用期内</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="关闭日期"> |
| | | <el-form-item label="关闭日期" prop="dimissionDate"> |
| | | <el-date-picker |
| | | v-model="gbdaForm.gbrq" |
| | | v-model="gbdaForm.dimissionDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="选择日期" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="备注说明"> |
| | | <el-input v-model="gbdaForm.bzsm" type="textarea" :rows="4" /> |
| | | <el-form-item label="备注说明" prop="remark"> |
| | | <el-input v-model="gbdaForm.remark" type="textarea" :rows="4" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="showGbda(1)">取 消</el-button> |
| | | <el-button type="primary" @click="showGbda(2)">确 定</el-button> |
| | | <el-button @click="showGbda(1,'')">取 消</el-button> |
| | | <el-button type="primary" @click="showGbda(2,'gbdaForm')">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="导出员工 请勾选需要导出的字段" :visible.sync="dialogShowDcyg" width="40%"> |
| | |
| | | version: '' |
| | | }, |
| | | ygdgForm: {}, |
| | | gbdaForm: {}, |
| | | gbdaForm: { |
| | | dgryIds: '', |
| | | dimissionType: '1', |
| | | dimissionDate: new Date(), |
| | | remark: '' |
| | | }, |
| | | depts: [], |
| | | fileList: [], |
| | | empBaseInfoRules: { |
| | |
| | | socialNumb: [{ max: 40, message: '长度不超过40个字符', trigger: 'blur' }], |
| | | family: [{ max: 128, message: '长度不超过128个字符', trigger: 'blur' }], |
| | | urgencyPhone: [{ max: 30, message: '长度不超过30个字符', trigger: 'blur' }] |
| | | }, |
| | | gbdaRules: { |
| | | dimissionType: [{ required: true, message: '请选择离职类型', trigger: 'change' }], |
| | | dimissionDate: [{ required: true, message: '请选择关闭日期', trigger: 'change' }], |
| | | remark: [{ max: 500, message: '长度不超过500个字符', trigger: 'blur' }] |
| | | }, |
| | | restaurants: [{ value: '北京市', code: '110000' }, |
| | | { value: '天津市', code: '120000' }, |
| | |
| | | break |
| | | } |
| | | }, |
| | | showGbda(operate) { |
| | | showGbda(operate, formName) { |
| | | switch (operate) { |
| | | case 0: |
| | | var selection = this.$refs.multipleTable.store.states.selection |
| | |
| | | empIds.push(data.empId) |
| | | names.push(data.empName) |
| | | } |
| | | const nowDate = new Date() |
| | | const year = nowDate.getFullYear() |
| | | const month = nowDate.getMonth() + 1 |
| | | const day = nowDate.getDate() |
| | | this.gbdaForm = { |
| | | dgryIds: empIds.join(','), |
| | | dgryNames: names.join(',') |
| | | dgryNames: names.join(','), |
| | | dimissionType: '1', |
| | | dimissionDate: year + '-' + month + '-' + day, |
| | | remark: '' |
| | | } |
| | | this.dialogShowGbda = true |
| | | } |
| | |
| | | this.dialogShowGbda = false |
| | | break |
| | | case 2: |
| | | this.$post('hr/empBaseInfo', { ...this.gbdaForm }).then(() => { |
| | | this.dialogShowGbda = false |
| | | this.$message({ |
| | | message: this.$t('tips.createSuccess'), |
| | | type: 'success' |
| | | }) |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.$post('hr/empBaseInfo/dimission', { ...this.gbdaForm }).then(() => { |
| | | this.dialogShowGbda = false |
| | | this.$message({ |
| | | message: this.$t('员工档案关闭成功'), |
| | | type: 'success' |
| | | }) |
| | | this.fetch({ ...this.queryParams, |
| | | ...this.sort }) |
| | | }) |
| | | } |
| | | }) |
| | | break |
| | | } |