From 06ffa9ee99717b4ba73b81352543e9ff9ac20cee Mon Sep 17 00:00:00 2001
From: wanglei <1336977847@qq.com>
Date: Thu, 10 Feb 2022 09:05:18 +0800
Subject: [PATCH] 27110 27122
---
.../AppConflictMediation.vue | 2 +-
src/saas/AppSpecialPeople/add.vue | 27 ++++++++++---------
2 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/saas/AppConflictMediation/AppConflictMediation.vue b/src/saas/AppConflictMediation/AppConflictMediation.vue
index c254c59e..2a9cbd2d 100644
--- a/src/saas/AppConflictMediation/AppConflictMediation.vue
+++ b/src/saas/AppConflictMediation/AppConflictMediation.vue
@@ -39,7 +39,7 @@ export default {
isGirdUser() {
this.isAdmin = false
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
- if (res.code == 0) {
+ if (res?.data) {
if (res.data.appGirdInfo.checkType != '0') {
this.isAdmin = true
}
diff --git a/src/saas/AppSpecialPeople/add.vue b/src/saas/AppSpecialPeople/add.vue
index 69c9dc52..7ce41448 100644
--- a/src/saas/AppSpecialPeople/add.vue
+++ b/src/saas/AppSpecialPeople/add.vue
@@ -61,14 +61,14 @@
-
*所属网格
+
所属网格
{{
@@ -412,7 +412,9 @@ export default {
changeIdNumber() {
- if (this.form.idNumber.length == 18) {
+ if (this.form.idNumber.length != 18) {
+ return this.$u.toast('请输入正确的身份证号码')
+ } else {
var people = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber)
this.form.birth = people.birthday
this.form.gender = people.gender
@@ -425,9 +427,8 @@ export default {
},
changePhone() {
- let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
- if (!regTel.test(this.form.phone)) {
- return this.$u.toast('请输入正确的手机号')
+ if (this.form.phone.length != 11) {
+ return this.$u.toast('请输入正确的联系电话')
}
},
confirmGirdSelect(e) {
@@ -457,18 +458,20 @@ export default {
if (!this.form.idNumber) {
return this.$u.toast('请输入身份证号')
}
+ if (
+ !/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)
+ ) {
+ return this.$u.toast("请输入正确的身份证账号");
+ }
if (!this.form.phone) {
return this.$u.toast('请输入联系电话')
}
+ if (!/^1[0-9]{10,10}$/.test(this.form.phone)) {
+ return this.$u.toast("请输入正确的联系电话");
+ }
if (!this.form.areaName) {
return this.$u.toast('请选择区域')
}
- if (!this.form.address) {
- return this.$u.toast('请输入详细地址')
- }
- if (!this.form.girdName) {
- return this.$u.toast('请选择网格')
- }
var urlList = ['app/appspecialdisabled/addOrUpdate', 'app/appspecialmental/addOrUpdate', 'app/appspecialadjustment/addOrUpdate',
'app/appspecialdrug/addOrUpdate','app/appspecialprison/addOrUpdate']