diff --git a/src/views/system/group/user/index.vue b/src/views/system/group/user/index.vue index d7bd0ec..07f635a 100644 --- a/src/views/system/group/user/index.vue +++ b/src/views/system/group/user/index.vue @@ -180,8 +180,8 @@ @@ -260,7 +260,7 @@ export default { keyDepeName: '', keyJobLeven: '', // 9.11修改 原ISCHECK = false - ISCHECK: true, + ISCHECK: false, dialogFormEdit: false, editloading: false, dialogType: 'add', @@ -476,18 +476,19 @@ export default { }) }, goCheck() { - if (this.pd.USER_ID_CARD && this.pd.PHONE) { - const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/ - const phoneResult = phoneJudge.test(this.pd.PHONE) - const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ - const cardResult = cardJudge.test(this.pd.USER_ID_CARD) - if (phoneResult && cardResult) { + // if (this.pd.USER_ID_CARD && this.pd.PHONE) { + // const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/ + // const phoneResult = phoneJudge.test(this.pd.PHONE) + // const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/ + // const cardResult = cardJudge.test(this.pd.USER_ID_CARD) + // if (phoneResult && cardResult) { + if (true) { console.log('格式校验通过') requestFN( 'user/goCheck', { CARD_NO: this.pd.USER_ID_CARD, - USERNAME: this.pd.PHONE, + USERNAME: this.pd.USERNAME, USER_ID: this.pd.USER_ID || '' } ).then((data) => { @@ -495,7 +496,7 @@ export default { this.$message.success('验证通过') this.ISCHECK = true } else { - this.$message.error('验证失败,请确认身份证号与手机号是否正确') + this.$message.error('验证失败,请确认用户名不重复') this.ISCHECK = false } }).catch((e) => { @@ -505,9 +506,9 @@ export default { } else { this.ISCHECK = false } - } else { - this.ISCHECK = false - } + // } else { + // this.ISCHECK = false + // } }, getList() { this.listLoading = true @@ -600,7 +601,7 @@ export default { handleAdd() { this.dialogFormEdit = true // 9.11 修改 原:ISCHECK = false - this.ISCHECK = true + this.ISCHECK = false this.pd = {} this.dialogType = 'saveUser' this.pd.PASSWORD = 'Aa@123456789' @@ -626,6 +627,7 @@ export default { '/user/' + this.dialogType, this.pd ).then((data) => { + console.log(data.result) this.listLoading = false this.dialogFormEdit = false this.varList = [] @@ -633,6 +635,10 @@ export default { this.listQuery.page = 1 this.goPush(data.pd) }).catch((e) => { + this.$message({ + message: '用户名重复', + type: 'error' + }) this.listLoading = false }) } else {