注册从业人员 人员类型多选 有驾驶员的驾驶信息必填 人员类型回显

dev
xiepeng 2024-05-06 17:39:59 +08:00
parent 57324bccdd
commit d795ca102c
4 changed files with 75 additions and 54 deletions

View File

@ -22,7 +22,7 @@
<view class="title">人员类型</view>
<picker @change="pickerChangeData($event,'PERSONNEL_TYPE')" disabled :value="dictData.PERSONNEL_TYPE.index" :range="dictData.PERSONNEL_TYPE.list" range-key="NAME">
<view class="picker" style="color: #cccccc">
{{formData.PERSONNEL_TYPENAME?formData.PERSONNEL_TYPENAME:'请选择'}}
{{formData.PERSONNEL_TYPE.join()}}
</view>
</picker>
</view>

View File

@ -19,13 +19,28 @@
<input v-model="formData.PHONE" disabled placeholder="请输入手机证号" maxlength="11" name="input" style="color: #cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title">人员类型</view>
<zqs-select
:multiple="true"
:list="dictData.PERSONNEL_TYPE.list"
:show-search="false"
v-model="formData.PERSONNEL_TYPE"
label-key="NAME"
value-key="NAME"
placeholder="请选择人员类型"
title="选择人员类型"
clearable
@change="changeSelect($event, 'PERSONNEL_TYPE')"
></zqs-select>
</view>
<!-- <view class="cu-form-group margin-top-xs">
<view class="title">人员类型</view>
<picker @change="pickerChangeData($event,'PERSONNEL_TYPE')" :value="dictData.PERSONNEL_TYPE.index" :range="dictData.PERSONNEL_TYPE.list" range-key="NAME">
<view class="picker">
{{formData.PERSONNEL_TYPENAME?formData.PERSONNEL_TYPENAME:'请选择'}}
</view>
</picker>
</view>
</view>-->
<view class="cu-form-group margin-top">
<view class="title">文化程度</view>
<picker @change="pickerChangeData($event,'DEGREE_OF_EDUCATION')" :value="dictData.DEGREE_OF_EDUCATION.index" :range="dictData.DEGREE_OF_EDUCATION.list" range-key="NAME">
@ -80,8 +95,10 @@
import {
formatDate,validateIdCard,validateMobile,getLevel
} from '../../../common/tool.js';
import ZqsSelect from "../../../components/zqs-select/zqs-select.vue";
export default {
name: "register_baseInfo",
components: {ZqsSelect},
props: {
formData: {
type: Object,
@ -142,6 +159,9 @@ import {
this.formData[name] = e.detail.value
this.$forceUpdate();//
},
changeSelect(e, name) {
this.$forceUpdate();//
},
pickerChangeData(e,name) {
//
if (name === 'PERSONNEL_TYPE') {
@ -172,7 +192,7 @@ import {
},
validateData() {
//
if (!this.formData.PERSONNEL_TYPE) {
if (this.formData.PERSONNEL_TYPE.length < 1) {
uni.showToast({
icon: 'none',
title: '请选择人员类型',

View File

@ -22,7 +22,7 @@
<view class="title">人员类型</view>
<picker @change="pickerChangeData($event,'PERSONNEL_TYPE')" disabled :value="dictData.PERSONNEL_TYPE.index" :range="dictData.PERSONNEL_TYPE.list" range-key="NAME">
<view class="picker" style="color: #cccccc">
{{formData.PERSONNEL_TYPENAME?formData.PERSONNEL_TYPENAME:'请选择'}}
{{formData.PERSONNEL_TYPE.join()}}
</view>
</picker>
</view>
@ -635,57 +635,58 @@ export default {
});
return false;
}
if (this.formData.PERSONNEL_TYPE.find((item) => item === '驾驶员')) {
//
if (this.fileData.driverLicense.length < 1) {
uni.showToast({
icon: 'none',
title: '请上传驾驶证照片',
duration: 2000
});
return false;
}
//
if (this.fileData.driverLicense.length < 1) {
uni.showToast({
icon: 'none',
title: '请上传驾驶证照片',
duration: 2000
});
return false;
if (!this.formData.DRIVER_LICENSE_NO) {
uni.showToast({
icon: 'none',
title: '请输入驾驶证号',
duration: 2000
});
return false;
}
if (this.formData.DRIVING_MODEL.length < 1) {
uni.showToast({
icon: 'none',
title: '请选择准驾车型',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_ISSUE_DATE) {
uni.showToast({
icon: 'none',
title: '请选择初次领证日期',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_VALIDITY_START || !this.formData.DRIVER_LICENSE_VALIDITY_END) {
uni.showToast({
icon: 'none',
title: '请选择驾驶证有效期时间',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_ORGAN) {
uni.showToast({
icon: 'none',
title: '请输入驾驶证的签发机关',
duration: 2000
});
return false;
}
}
if (!this.formData.DRIVER_LICENSE_NO) {
uni.showToast({
icon: 'none',
title: '请输入驾驶证号',
duration: 2000
});
return false;
}
if (this.formData.DRIVING_MODEL.length < 1) {
uni.showToast({
icon: 'none',
title: '请选择准驾车型',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_ISSUE_DATE) {
uni.showToast({
icon: 'none',
title: '请选择初次领证日期',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_VALIDITY_START || !this.formData.DRIVER_LICENSE_VALIDITY_END) {
uni.showToast({
icon: 'none',
title: '请选择驾驶证有效期时间',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_ORGAN) {
uni.showToast({
icon: 'none',
title: '请输入驾驶证的签发机关',
duration: 2000
});
return false;
}
//
if (this.fileData.qualificationCertificate.length < 1) {
uni.showToast({

View File

@ -89,7 +89,7 @@
SEXNAME: '',
//
PERSONNEL_TYPE: '',
PERSONNEL_TYPE: [],
PERSONNEL_TYPENAME: '',
//
POLITICAL_OUTLOOK: '',