From d795ca102c2043708472dbc53df742942f00aa44 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Mon, 6 May 2024 17:39:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=BB=8E=E4=B8=9A=E4=BA=BA?= =?UTF-8?q?=E5=91=98=20=E4=BA=BA=E5=91=98=E7=B1=BB=E5=9E=8B=E5=A4=9A?= =?UTF-8?q?=E9=80=89=20=20=E6=9C=89=E9=A9=BE=E9=A9=B6=E5=91=98=E7=9A=84?= =?UTF-8?q?=E9=A9=BE=E9=A9=B6=E4=BF=A1=E6=81=AF=E5=BF=85=E5=A1=AB=20=20?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=B1=BB=E5=9E=8B=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/register/apply.vue | 2 +- pages/login/register/baseInfo.vue | 24 ++++++- pages/login/register/certificate.vue | 101 ++++++++++++++------------- pages/login/register/index.vue | 2 +- 4 files changed, 75 insertions(+), 54 deletions(-) diff --git a/pages/login/register/apply.vue b/pages/login/register/apply.vue index 1366031..7a9db8f 100644 --- a/pages/login/register/apply.vue +++ b/pages/login/register/apply.vue @@ -22,7 +22,7 @@ 人员类型 - {{formData.PERSONNEL_TYPENAME?formData.PERSONNEL_TYPENAME:'请选择'}} + {{formData.PERSONNEL_TYPE.join()}} diff --git a/pages/login/register/baseInfo.vue b/pages/login/register/baseInfo.vue index 67d7936..fb4e3fa 100644 --- a/pages/login/register/baseInfo.vue +++ b/pages/login/register/baseInfo.vue @@ -19,13 +19,28 @@ + 人员类型 + + + 文化程度 @@ -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: '请选择人员类型', diff --git a/pages/login/register/certificate.vue b/pages/login/register/certificate.vue index 5d9cf79..056a727 100644 --- a/pages/login/register/certificate.vue +++ b/pages/login/register/certificate.vue @@ -22,7 +22,7 @@ 人员类型 - {{formData.PERSONNEL_TYPENAME?formData.PERSONNEL_TYPENAME:'请选择'}} + {{formData.PERSONNEL_TYPE.join()}} @@ -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({ diff --git a/pages/login/register/index.vue b/pages/login/register/index.vue index 766f3d5..cc9c666 100644 --- a/pages/login/register/index.vue +++ b/pages/login/register/index.vue @@ -89,7 +89,7 @@ SEXNAME: '', //人员类型 - PERSONNEL_TYPE: '', + PERSONNEL_TYPE: [], PERSONNEL_TYPENAME: '', // 政治面貌 POLITICAL_OUTLOOK: '',