ソースを参照

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

wangqiang 1 年間 前
コミット
0ab98a0530

+ 7 - 2
pages/human/enrollment/registration/EnrollmentRegistrationAddForm.vue

@@ -231,6 +231,7 @@
 	export default {
 		data () {
 			return {
+				submitting: false,
 				fileList: [],
 				fileList2: [],
 				title: '',
@@ -358,6 +359,10 @@
 			  }
 			},
 			saveForm () {
+
+				if (this.submitting) return;
+				this.submitting = true;
+
 					//定义表单规则
 					if (this.isNotEmpty(this.inputForm.socialSecurityNumber) && (this.isEmpty(this.inputForm.socialSecurityBankNumber) || isEmpty(this.inputForm.socialSecurityPictureFront))) {
 							this.loading = false
@@ -407,10 +412,10 @@
 						//提交成功跳转页面
 						this.$router.push('/pages/human/enrollment/registration/saveOk'); // 替换 '/new-page' 为你想要跳转的页面路径
 					}).catch((e)=>{
-						
+						this.submitting = false;
 					})
 				}).catch((e)=>{
-					
+					this.submitting = false;
 				})	
 			},
 			formatDate(date) {

+ 6 - 2
pages/human/practice/register/RegistrationAddForm.vue

@@ -162,6 +162,7 @@
 	export default {
 		data () {
 			return {
+				submitting: false,
 				loading: false,
 				inputForm: {
 					userId: '',
@@ -262,6 +263,9 @@
 			  }
 			},
 			saveForm () {
+				if (this.submitting) return;
+				this.submitting = true;
+
 					//定义表单规则
 				this.$refs.inputForm.validate().then(res => {
 					uni.showLoading()
@@ -277,10 +281,10 @@
 						//提交成功跳转页面
 						this.$router.push('/pages/human/enrollment/registration/saveOk'); // 替换 '/new-page' 为你想要跳转的页面路径
 					}).catch((e)=>{
-
+						this.submitting = false;
 					})
 				}).catch((e)=>{
-
+					this.submitting = false;
 				})
 			},
 			addRow() {