|
@@ -58,7 +58,11 @@
|
|
|
:rules="[
|
|
|
{required: true, message:'请输入身份证号码', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-input v-model="inputForm.idCard" @input="validID(null, inputForm.idCard)"></el-input>
|
|
|
+ <el-input v-model="inputForm.idCard"
|
|
|
+ onkeyup="value=value.replace(/[^\d]/g,'')"
|
|
|
+ oninput="if(value.length>18)value=value.slice(0,18)"
|
|
|
+ @input="validID(null, inputForm.idCard)">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -71,11 +75,13 @@
|
|
|
<el-col :span="10">
|
|
|
<el-form-item label="出生日期" prop="birthday">
|
|
|
<el-date-picker
|
|
|
+ :disabled="true"
|
|
|
v-model="inputForm.birthday"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
format="yyyy-MM-dd"
|
|
|
placeholder="选择出生日期"
|
|
|
+ style="width: 318px"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -89,7 +95,11 @@
|
|
|
|
|
|
<el-col :span="10">
|
|
|
<el-form-item label="移动电话" prop="mobilePhone">
|
|
|
- <el-input v-model="inputForm.mobilePhone" placeholder="请填写移动电话"></el-input>
|
|
|
+ <el-input v-model="inputForm.mobilePhone"
|
|
|
+ placeholder="请填写移动电话"
|
|
|
+ onkeyup="value=value.replace(/[^\d]/g,'')"
|
|
|
+ oninput="if(value.length>11)value=value.slice(0,11)">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -215,6 +225,7 @@
|
|
|
value-format="yyyy-MM-dd"
|
|
|
format="yyyy-MM-dd"
|
|
|
placeholder="选择出入职日期"
|
|
|
+ style="width: 318px"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -240,6 +251,7 @@
|
|
|
value-format="yyyy-MM-dd"
|
|
|
format="yyyy-MM-dd"
|
|
|
placeholder="选择试用期结束日期"
|
|
|
+ style="width: 318px"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -310,7 +322,7 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="头像" prop="headPortraitUrl">
|
|
|
+ <el-form-item label="头像" prop="headPortraitUrl">
|
|
|
<el-upload
|
|
|
class="avatar-uploader"
|
|
|
:action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=headPortraitUrl`"
|
|
@@ -366,7 +378,8 @@
|
|
|
<el-input v-model="scope.row.major" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="education" title="学历" :edit-render="{name: '$select'}">
|
|
|
+ <vxe-table-column field="education" title="学历"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_education')}">
|
|
|
<template v-slot:edit="scope" >
|
|
|
<vxe-select v-model="scope.row.education">
|
|
|
<vxe-option
|
|
@@ -378,7 +391,8 @@
|
|
|
</vxe-select>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="degree" title="学位" :edit-render="{}">
|
|
|
+ <vxe-table-column field="degree" title="学位"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_degree')}">
|
|
|
<template v-slot:edit="scope" >
|
|
|
<vxe-select v-model="scope.row.degree">
|
|
|
<vxe-option
|
|
@@ -390,7 +404,8 @@
|
|
|
</vxe-select>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="educationType" title="学历性质" :edit-render="{}">
|
|
|
+ <vxe-table-column field="educationType" title="学历性质"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_education_type')}">
|
|
|
<template v-slot:edit="scope" >
|
|
|
<vxe-select v-model="scope.row.educationType">
|
|
|
<vxe-option
|
|
@@ -467,9 +482,17 @@
|
|
|
:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
|
|
|
>
|
|
|
|
|
|
- <vxe-table-column field="name" title="合同类型" :edit-render="{}">
|
|
|
+ <vxe-table-column field="contractType" title="合同类型"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_contract_type')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
-
|
|
|
+ <vxe-select v-model="scope.row.contractType">
|
|
|
+ <vxe-option
|
|
|
+ v-for="item in $dictUtils.getDictList('sys_user_contract_type')"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label">
|
|
|
+ </vxe-option>
|
|
|
+ </vxe-select>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="contractNumber" title="合同编号" :edit-render="{}">
|
|
@@ -542,7 +565,8 @@
|
|
|
highlight-current-row
|
|
|
:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
|
|
|
>
|
|
|
- <vxe-table-column field="languages" title="语种" :edit-render="{}">
|
|
|
+ <vxe-table-column field="languages" title="语种"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_languages')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<vxe-select v-model="scope.row.languages">
|
|
|
<vxe-option
|
|
@@ -554,7 +578,8 @@
|
|
|
</vxe-select>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="level" title="熟练程度" :edit-render="{}">
|
|
|
+ <vxe-table-column field="level" title="熟练程度"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_proficiency')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<vxe-select v-model="scope.row.level">
|
|
|
<vxe-option
|
|
@@ -678,7 +703,8 @@
|
|
|
highlight-current-row
|
|
|
:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
|
|
|
>
|
|
|
- <vxe-table-column field="certificateName" title="证书名称" :edit-render="{}">
|
|
|
+ <vxe-table-column field="certificateName" title="证书名称"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_certificate_name')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<vxe-select v-model="scope.row.certificateName">
|
|
|
<vxe-option
|
|
@@ -710,7 +736,8 @@
|
|
|
<el-input v-model="scope.row.issuingAuthority" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="major" title="专业" :edit-render="{}">
|
|
|
+ <vxe-table-column field="major" title="专业"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_major')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<vxe-select v-model="scope.row.major">
|
|
|
<vxe-option
|
|
@@ -842,7 +869,8 @@
|
|
|
<el-input v-model="scope.row.idCard" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="sex" title="成员性别" :edit-render="{}">
|
|
|
+ <vxe-table-column field="sex" title="成员性别"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sex')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<vxe-select v-model="scope.row.sex">
|
|
|
<vxe-option
|
|
@@ -911,7 +939,8 @@
|
|
|
<vxe-input v-model="scope.row.trainEndDate" placeholder="培训终止日期" type="date"></vxe-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="trainLevel" title="培训类型" :edit-render="{}">
|
|
|
+ <vxe-table-column field="trainLevel" title="培训类型"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_training_type')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<vxe-select v-model="scope.row.trainLevel">
|
|
|
<vxe-option
|
|
@@ -1025,7 +1054,8 @@
|
|
|
highlight-current-row
|
|
|
:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
|
|
|
>
|
|
|
- <vxe-table-column field="rewardsType" title="奖惩类型" :edit-render="{}">
|
|
|
+ <vxe-table-column field="rewardsType" title="奖惩类型"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_rewards')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<vxe-select v-model="scope.row.rewardsType">
|
|
|
<vxe-option
|
|
@@ -1109,7 +1139,8 @@
|
|
|
<el-input v-model="scope.row.number" ></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="post" title="担任职务" :edit-render="{}">
|
|
|
+ <vxe-table-column field="post" title="担任职务"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_post')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
<vxe-select v-model="scope.row.post">
|
|
|
<vxe-option
|
|
@@ -1153,9 +1184,10 @@
|
|
|
highlight-current-row
|
|
|
:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
|
|
|
>
|
|
|
- <vxe-table-column field="projectName" title="项目名称" :edit-render="{}">
|
|
|
+ <vxe-table-column field="archivesName" title="项目名称"
|
|
|
+ :edit-render="{name: '$select', options: $dictUtils.getDictList('sys_user_archives')}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <vxe-select v-model="scope.row.projectName">
|
|
|
+ <vxe-select v-model="scope.row.archivesName">
|
|
|
<vxe-option
|
|
|
v-for="item in $dictUtils.getDictList('sys_user_archives')"
|
|
|
:key="item.value"
|
|
@@ -1423,9 +1455,9 @@
|
|
|
this.inputForm.signatureUrl = res.url
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
- handleAvatarSuccess3 (res, file, scope) {
|
|
|
- this.sysUserEducations[scope.$rowIndex].educationCertificateUrl = res.url
|
|
|
- this.$forceUpdate()
|
|
|
+ handleAvatarSuccess3 (res, file ,scope) {
|
|
|
+ this.sysUserEducations[scope.$rowIndex].educationCertificateUrl = res.url
|
|
|
+ this.$forceUpdate()
|
|
|
},
|
|
|
handleAvatarSuccess4 (res, file, scope) {
|
|
|
this.sysUserEducations[scope.$rowIndex].degreeCertificateUrl = res.url
|
|
@@ -1760,7 +1792,6 @@
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
|
-
|
|
|
this.inputForm.sysUserEducations = []
|
|
|
this.sysUserEducations.forEach((item) => {
|
|
|
this.inputForm.sysUserEducations.push(item)
|
|
@@ -2098,37 +2129,39 @@
|
|
|
},
|
|
|
|
|
|
// 身份证验证
|
|
|
- async validID (rule, value, callback) {
|
|
|
+ async validID(rule, value, callback)
|
|
|
+ {
|
|
|
// 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
|
|
|
let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
|
if (reg.test(value)) {
|
|
|
- await this.go(value.length)
|
|
|
- // callback()
|
|
|
+ await this.go(value.length);
|
|
|
+ callback()
|
|
|
} else {
|
|
|
- // callback(new Error('身份证号码不正确'))
|
|
|
+ callback(new Error('身份证号码不正确'))
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 实现自动生成生日/年龄
|
|
|
go (val) {
|
|
|
- let iden = this.inputForm.idCard
|
|
|
- let sex = null
|
|
|
- let birth = null
|
|
|
- let myDate = new Date()
|
|
|
- let month = myDate.getMonth() + 1
|
|
|
- let day = myDate.getDate()
|
|
|
- let age = 0
|
|
|
-
|
|
|
- if (val === 18) {
|
|
|
- age = myDate.getFullYear() - iden.substring(6, 10) - 1
|
|
|
- sex = iden.substring(16, 17)
|
|
|
- birth = iden.substring(6, 10) + '-' + iden.substring(10, 12) + '-' + iden.substring(12, 14)
|
|
|
+ let iden = this.inputForm.idCard;
|
|
|
+ let sex = null;
|
|
|
+ let birth = null;
|
|
|
+ let myDate = new Date();
|
|
|
+ let month = myDate.getMonth() + 1;
|
|
|
+ let day = myDate.getDate();
|
|
|
+ let age = 0;
|
|
|
+
|
|
|
+ if(val===18){
|
|
|
+ age = myDate.getFullYear() - iden.substring(6, 10) - 1;
|
|
|
+ sex = iden.substring(16,17);
|
|
|
+ birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
|
|
|
if ((iden.substring(10, 12) < month || iden.substring(10, 12) === month) && iden.substring(12, 14) <= day) age++
|
|
|
+
|
|
|
}
|
|
|
- if (val === 15) {
|
|
|
- age = myDate.getFullYear() - iden.substring(6, 8) - 1901
|
|
|
- sex = iden.substring(13, 14)
|
|
|
- birth = '19' + iden.substring(6, 8) + '-' + iden.substring(8, 10) + '-' + iden.substring(10, 12)
|
|
|
+ if(val===15){
|
|
|
+ age = myDate.getFullYear() - iden.substring(6, 8) - 1901;
|
|
|
+ sex = iden.substring(13,14);
|
|
|
+ birth = "19"+iden.substring(6,8)+"-"+iden.substring(8,10)+"-"+iden.substring(10,12);
|
|
|
if ((iden.substring(8, 10) < month || iden.substring(8, 10) === month) && iden.substring(10, 12) <= day) age++
|
|
|
}
|
|
|
this.inputForm.age = age
|