|
@@ -17,7 +17,7 @@
|
|
|
<th class="description-label">手机号</th>
|
|
|
<td class="description-content">
|
|
|
<el-form-item prop="mobileNo">
|
|
|
- <el-input size="mini" v-model="form.mobileNo" placeholder="请输入手机号"/>
|
|
|
+ <el-input size="mini" minlength="11" maxlength="11" v-model="form.mobileNo" placeholder="请输入手机号"/>
|
|
|
</el-form-item>
|
|
|
</td>
|
|
|
<th class="description-label">微信号</th>
|
|
@@ -80,12 +80,14 @@
|
|
|
</td>
|
|
|
<th class="description-label">声部</th>
|
|
|
<td class="description-content">
|
|
|
- <el-form-item prop="subjectId">
|
|
|
+ <el-form-item prop="subjectIdList">
|
|
|
<el-select
|
|
|
- v-model.trim="form.subjectId"
|
|
|
+ v-model.trim="form.subjectIdList"
|
|
|
clearable
|
|
|
filterable
|
|
|
+ multiple
|
|
|
size="mini"
|
|
|
+ collapse-tags
|
|
|
placeholder='请选择声部'
|
|
|
>
|
|
|
<el-option-group v-for="group in subjectList"
|
|
@@ -94,7 +96,7 @@
|
|
|
<el-option v-for="item in group.options"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ :value="String(item.value)">
|
|
|
</el-option>
|
|
|
</el-option-group>
|
|
|
</el-select>
|
|
@@ -102,18 +104,10 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="description-tr">
|
|
|
- <th class="description-label">是否经过评估</th>
|
|
|
+ <th class="description-label">评估结果</th>
|
|
|
<td class="description-content">
|
|
|
- <el-form-item prop="isInterviewed">
|
|
|
- <el-select size="mini" v-model.trim="form.isInterviewed"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- placeholder="请选择是否经过评估">
|
|
|
- <el-option label="是"
|
|
|
- :value="true"></el-option>
|
|
|
- <el-option label="否"
|
|
|
- :value="false"></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item prop="assessmentResult">
|
|
|
+ <el-input size="mini" v-model.trim="form.assessmentResult" placeholder="请输入评估结果"/>
|
|
|
</el-form-item>
|
|
|
</td>
|
|
|
<th class="description-label">信息来源</th>
|
|
@@ -122,6 +116,7 @@
|
|
|
<el-select v-model.trim="form.sourceFrom"
|
|
|
clearable
|
|
|
filterable
|
|
|
+ size="mini"
|
|
|
placeholder="请选择信息来源">
|
|
|
<el-option label="BOSS"
|
|
|
value="BOSS"></el-option>
|
|
@@ -198,37 +193,46 @@
|
|
|
<tr class="description-tr">
|
|
|
<th class="description-label">员工类型</th>
|
|
|
<td class="description-content">
|
|
|
- <el-form-item prop="jobNature">
|
|
|
- <el-select size="mini" v-model.trim="form.jobNature"
|
|
|
+ <el-form-item prop="isProbationPeriod">
|
|
|
+ <el-select size="mini" v-model.trim="form.isProbationPeriod"
|
|
|
clearable
|
|
|
filterable
|
|
|
placeholder="请选择员工类型">
|
|
|
- <el-option label="全职"
|
|
|
- value="FULL_TIME"></el-option>
|
|
|
- <el-option label="兼职"
|
|
|
- value="PART_TIME"></el-option>
|
|
|
- <el-option label="临时"
|
|
|
- value="TEMPORARY"></el-option>
|
|
|
+ <el-option label="正式"
|
|
|
+ :value="true"></el-option>
|
|
|
+ <el-option label="试用"
|
|
|
+ :value="false"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</td>
|
|
|
- <th class="description-label">员工状态</th>
|
|
|
+ <th class="description-label">人员状态</th>
|
|
|
<td class="description-content">
|
|
|
- <el-form-item prop="isProbationPeriod">
|
|
|
- <el-select size="mini" v-model.trim="form.isProbationPeriod"
|
|
|
+ <el-form-item prop="status">
|
|
|
+ <el-select size="mini" v-model.trim="form.status"
|
|
|
clearable
|
|
|
filterable
|
|
|
- placeholder="请选择员工状态">
|
|
|
- <el-option label="正式"
|
|
|
- :value="true"></el-option>
|
|
|
- <el-option label="试用"
|
|
|
- :value="false"></el-option>
|
|
|
+ placeholder="请选择人员状态">
|
|
|
+ <el-option label="未录用"
|
|
|
+ value="NOT_EMPLOYED"></el-option>
|
|
|
+ <el-option label="面试中"
|
|
|
+ value="INTERVIEWING"></el-option>
|
|
|
+ <el-option label="储备"
|
|
|
+ value="RESERVE"></el-option>
|
|
|
+ <el-option label="全职"
|
|
|
+ value="PART_TIME"></el-option>
|
|
|
+ <el-option label="兼职"
|
|
|
+ value="FULL_TIME"></el-option>
|
|
|
+ <el-option label="离职"
|
|
|
+ value="DIMISSION"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</td>
|
|
|
<th class="description-label">离职日期</th>
|
|
|
<td class="description-content">
|
|
|
- <el-form-item prop="resignationDate">
|
|
|
+ <el-form-item
|
|
|
+ prop="resignationDate"
|
|
|
+ :rules="{ required: form.status === 'DIMISSION', message: '请选择离职日期', trigger: 'blur' }"
|
|
|
+ >
|
|
|
<el-date-picker
|
|
|
type="date"
|
|
|
placeholder="选择离职日期"
|
|
@@ -298,7 +302,7 @@
|
|
|
<th class="description-label">紧急联系人电话</th>
|
|
|
<td class="description-content">
|
|
|
<el-form-item prop="emergencyContactPhone">
|
|
|
- <el-input size="mini" v-model.trim="form.emergencyContactPhone" placeholder="请输入紧急联系人电话"/>
|
|
|
+ <el-input size="mini" v-model.trim="form.emergencyContactPhone" minlength="11" maxlength="11" placeholder="请输入紧急联系人电话"/>
|
|
|
</el-form-item>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -340,16 +344,16 @@ export default {
|
|
|
gender: true,
|
|
|
idCard: '',
|
|
|
intentionCity: '',
|
|
|
- isInterviewed: true,
|
|
|
- isProbationPeriod: true,
|
|
|
- jobNature: '',
|
|
|
+ assessmentResult: '',
|
|
|
+ status: '',
|
|
|
+ isProbationPeriod: '',
|
|
|
liveCity: '',
|
|
|
mobileNo: '',
|
|
|
otherComment: '',
|
|
|
position: '',
|
|
|
realName: '',
|
|
|
resignationDate: '',
|
|
|
- subjectId: '',
|
|
|
+ subjectIdList: [],
|
|
|
wechatNo: '',
|
|
|
organId: '',
|
|
|
sourceFrom: '',
|
|
@@ -392,13 +396,10 @@ export default {
|
|
|
intentionCity: [
|
|
|
{ required: true, message: '请输入工作意向', trigger: 'blur' },
|
|
|
],
|
|
|
- isInterviewed: [
|
|
|
- { required: true, message: '请选择是否经过评估', trigger: 'blur' },
|
|
|
- ],
|
|
|
- isProbationPeriod: [
|
|
|
+ status: [
|
|
|
{ required: true, message: '请选择员工状态', trigger: 'blur' },
|
|
|
],
|
|
|
- jobNature: [
|
|
|
+ isProbationPeriod: [
|
|
|
{ required: true, message: '请选择员工类型', trigger: 'blur' },
|
|
|
],
|
|
|
liveCity: [
|
|
@@ -416,17 +417,14 @@ export default {
|
|
|
realName: [
|
|
|
{ required: true, message: '请输入姓名', trigger: 'blur' },
|
|
|
],
|
|
|
- resignationDate: [
|
|
|
- { required: true, message: '请选择离职日期', trigger: 'blur' },
|
|
|
- ],
|
|
|
- subjectId: [
|
|
|
+ subjectIdList: [
|
|
|
{ required: true, message: '请选择声部', trigger: 'blur' },
|
|
|
],
|
|
|
organId: [
|
|
|
{ required: true, message: '请选择分部', trigger: 'blur' },
|
|
|
],
|
|
|
- wechatNo: [
|
|
|
- { required: true, message: '请输入微信号', trigger: 'blur' },
|
|
|
+ assessmentResult: [
|
|
|
+ { required: true, message: '请输入评估结果', trigger: 'blur' },
|
|
|
],
|
|
|
}
|
|
|
}
|
|
@@ -442,17 +440,23 @@ export default {
|
|
|
methods: {
|
|
|
updateData() {
|
|
|
if (this.detail) {
|
|
|
- this.form = Object.assign({}, this.detail)
|
|
|
+ try {
|
|
|
+ this.detail.subjectIdList = this.detail.subjectIdList.split(',')
|
|
|
+ } catch (error) {}
|
|
|
+ this.form = Object.assign({
|
|
|
+ educations: [{level: '', school: '', year: ''}]
|
|
|
+ }, this.detail)
|
|
|
try {
|
|
|
this.form.educations = JSON.parse(this.detail.educationalBackground)
|
|
|
if (this.form.educations.length < 1) {
|
|
|
this.form.educations = [{level: '', school: '', year: ''}]
|
|
|
}
|
|
|
+ this.form = {...this.form}
|
|
|
} catch (error) {}
|
|
|
} else {
|
|
|
this.form.educations = [{level: '', school: '', year: ''}]
|
|
|
+ this.form = {...this.form}
|
|
|
}
|
|
|
- this.form = {...this.form}
|
|
|
},
|
|
|
addEducation() {
|
|
|
this.form.educations = [...this.form.educations, {level: '', school: '', year: ''}]
|
|
@@ -467,10 +471,10 @@ export default {
|
|
|
this.$refs['ruleForm'].validate(valid => {
|
|
|
if (valid) {
|
|
|
const { $message } = this
|
|
|
- const {educations, ...rest} = this.form
|
|
|
- this.form.educationalBackground = JSON.stringify(educations)
|
|
|
- if (this.detail) {
|
|
|
- employeeUpdate(Object.assign({id: this.detail.id}, rest))
|
|
|
+ this.form.educationalBackground = JSON.stringify(this.form.educations)
|
|
|
+ const {educations, subjectIdList, ...rest} = this.form
|
|
|
+ if (this.detail && this.detail.id) {
|
|
|
+ employeeUpdate(Object.assign({id: this.detail.id, subjectIdList: (subjectIdList || []).join(',')}, rest))
|
|
|
.then(res => {
|
|
|
if (res.code === 200) {
|
|
|
$message.success('修改成功')
|
|
@@ -479,7 +483,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
- employeeCreate(rest)
|
|
|
+ employeeCreate({subjectIdList: (subjectIdList || []).join(','), ...rest})
|
|
|
.then(res => {
|
|
|
if (res.code === 200) {
|
|
|
$message.success('创建成功')
|