소스 검색

入职与实习登记点击次数调整

wangqiang 1 년 전
부모
커밋
3ca22f25d1
2개의 변경된 파일46개의 추가작업 그리고 19개의 파일을 삭제
  1. 24 11
      pages/human/enrollment/registration/EnrollmentRegistrationAddForm.vue
  2. 22 8
      pages/human/practice/register/RegistrationAddForm.vue

+ 24 - 11
pages/human/enrollment/registration/EnrollmentRegistrationAddForm.vue

@@ -18,7 +18,7 @@
 			    <jp-picker v-model="inputForm.sex" rangeKey="label" rangeValue="value" :range="$dictUtils.getDictList('sex')"></jp-picker>
 			</u-form-item> -->
 			<u-form-item label="身份证号码" borderBottom prop="idCard" :required="true">
-				<u--input placeholder='请填写身份证号码' v-model="inputForm.idCard" @blur="idCardOnly(inputForm.idCard)" ></u--input>
+				<u--input placeholder='请填写身份证号码' v-model="inputForm.idCard" @change="idCardOnly(inputForm.idCard)" ></u--input>
 			</u-form-item>
 			<u-form-item label="性别" borderBottom prop="sex">
 				<jp-picker v-model="inputForm.sex" rangeKey="label" :disabled="true" rangeValue="value" :range="[
@@ -80,7 +80,7 @@
 			</u-form-item>
 			
 			<u-form-item label="联系电话" borderBottom prop="mobilePhone" :required="true">
-			     <u--input placeholder='请填写联系电话' @blur="mobilePhoneOnly(inputForm.mobilePhone)" maxlength="11" v-model="inputForm.mobilePhone"></u--input>
+			     <u--input placeholder='请填写联系电话' @change="mobilePhoneOnly(inputForm.mobilePhone)" maxlength="11" v-model="inputForm.mobilePhone"></u--input>
 			</u-form-item>
 			
 			<u-form-item label="家庭住址" borderBottom prop="homeAddress" >
@@ -231,7 +231,6 @@
 	export default {
 		data () {
 			return {
-				submitting: false,
 				fileList: [],
 				fileList2: [],
 				title: '',
@@ -359,10 +358,7 @@
 			  }
 			},
 			saveForm () {
-
-				if (this.submitting) return;
-				this.submitting = true;
-
+					var flag = false
 					//定义表单规则
 					if (this.isNotEmpty(this.inputForm.socialSecurityNumber) && (this.isEmpty(this.inputForm.socialSecurityBankNumber) || isEmpty(this.inputForm.socialSecurityPictureFront))) {
 							this.loading = false
@@ -373,7 +369,6 @@
 								icon: "none",
 								duration:2000
 							})
-
 						}
 						if (this.isNotEmpty(this.inputForm.socialSecurityBankNumber) && (this.isEmpty(this.inputForm.socialSecurityNumber) || this.isEmpty(this.inputForm.socialSecurityPictureFront))) {
 							this.loading = false
@@ -402,6 +397,26 @@
 							this.inputForm.endTime = this.formatDate(this.inputForm.endTime);
 						}
 
+				enrollmentRegistrationService.findIdCardOnly(this.inputForm.idCard).then((data) => {
+					if (data !== 0) {
+						uni.showToast({
+							title: '身份证号码已存在,请重新确认',
+							icon: "none",
+							duration:2000
+						})
+					}
+				})
+				enrollmentRegistrationService.findMobilePhoneOnly(this.inputForm.mobilePhone).then((data) => {
+					if (data !== 0) {
+						uni.showToast({
+							title: '联系电话已存在,请重新填写',
+							icon: "none",
+							duration:2000
+						})
+						this.inputForm.mobilePhone = ''
+					}
+				})
+
 				this.$refs.inputForm.validate().then(res => {
 					uni.showLoading()
 					this.inputForm.type = '2'
@@ -412,11 +427,9 @@
 						//提交成功跳转页面
 						this.$router.push('/pages/human/enrollment/registration/saveOk'); // 替换 '/new-page' 为你想要跳转的页面路径
 					}).catch((e)=>{
-						this.submitting = false;
 					})
 				}).catch((e)=>{
-					this.submitting = false;
-				})	
+				})
 			},
 			formatDate(date) {
 				const year = date.getFullYear();

+ 22 - 8
pages/human/practice/register/RegistrationAddForm.vue

@@ -14,7 +14,7 @@
 			</u-form-item> -->
 			
 			<u-form-item label="身份证号码" borderBottom prop="idCard" :required="true">
-			     <u--input placeholder='请填写身份证号码'  v-model="inputForm.idCard" @blur="idCardOnly(inputForm.idCard)"></u--input>
+			     <u--input placeholder='请填写身份证号码'  v-model="inputForm.idCard" @change="idCardOnly(inputForm.idCard)"></u--input>
 			</u-form-item>
 			<u-form-item label="性别" borderBottom prop="sex" :required="true">
 				<jp-picker v-model="inputForm.sex" rangeKey="label" rangeValue="value" :range="[
@@ -54,7 +54,7 @@
 			     <u--input placeholder='请填写专业'  v-model="inputForm.speciality"></u--input>
 			</u-form-item>
 			<u-form-item label="联系电话" borderBottom prop="mobilePhone" :required="true">
-			     <u--input placeholder='请填写联系电话'  v-model="inputForm.mobilePhone" maxlength="11" @blur="mobilePhoneOnly(inputForm.mobilePhone)"></u--input>
+			     <u--input placeholder='请填写联系电话'  v-model="inputForm.mobilePhone" maxlength="11" @change="mobilePhoneOnly(inputForm.mobilePhone)"></u--input>
 			</u-form-item>
 			<u-form-item label="QQ号/微信号" borderBottom prop="qqNum" >
 			     <u--input placeholder='请填写QQ号/微信号'  v-model="inputForm.qqNum" :maxlength="20"></u--input>
@@ -162,7 +162,6 @@
 	export default {
 		data () {
 			return {
-				submitting: false,
 				loading: false,
 				inputForm: {
 					userId: '',
@@ -263,9 +262,26 @@
 			  }
 			},
 			saveForm () {
-				if (this.submitting) return;
-				this.submitting = true;
-
+				registerService.findIdCardOnly(this.inputForm.idCard).then((data) => {
+					if (data !== 0) {
+						uni.showToast({
+							title: '身份证号码已存在,请重新确认',
+							icon: "none",
+							duration:2000
+						})
+						this.inputForm.idCard = ''
+					}
+				})
+				enrollmentRegistrationService.findMobilePhoneOnly(this.inputForm.mobilePhone).then((data) => {
+					if (data !== 0) {
+						uni.showToast({
+							title: '联系电话已存在,请重新填写',
+							icon: "none",
+							duration:2000
+						})
+						this.inputForm.mobilePhone = ''
+					}
+				})
 					//定义表单规则
 				this.$refs.inputForm.validate().then(res => {
 					uni.showLoading()
@@ -281,10 +297,8 @@
 						//提交成功跳转页面
 						this.$router.push('/pages/human/enrollment/registration/saveOk'); // 替换 '/new-page' 为你想要跳转的页面路径
 					}).catch((e)=>{
-						this.submitting = false;
 					})
 				}).catch((e)=>{
-					this.submitting = false;
 				})
 			},
 			addRow() {