Prechádzať zdrojové kódy

[修改][老药师]:注册必填校验

yxp 2 rokov pred
rodič
commit
292a090fe7
1 zmenil súbory, kde vykonal 12 pridanie a 1 odobranie
  1. 12 1
      pages/login.vue

+ 12 - 1
pages/login.vue

@@ -152,7 +152,17 @@
 			},
 			submitReg() {
 				//注册数据提交
-				
+				if (this.chooseUser.deptName === ""||this.chooseUser.deptName ==null) {
+					this.$modal.msgError("请输入客户名")
+				} else if (this.chooseUser.phone === ""||this.chooseUser.phone ==null) {
+					this.$modal.msgError("请输入手机号")
+				} else if (this.chooseUser.leader === ""||this.chooseUser.leader ==null) {
+					this.$modal.msgError("请输入负责人")
+				} else if(this.chooseUser.password === ""||this.chooseUser.password ==null) {
+					this.$modal.msgError("请输入登录密码")
+				}else if(this.fileList[0]===''||this.fileList[0]==null){
+					this.$modal.msgError("请输上传订单图片")
+				}else{
 				uploadRegister({
 					formdata: this.chooseUser,
 					name: 'register',
@@ -164,6 +174,7 @@
 					});
 					this.show = false
 				})
+				}
 			},
 			deletePic(event) {
 				this.fileList = []