人员中台 - 去掉人员中台校验

hyx_2024-9-29_tongbu
water_xu 2024-09-12 16:17:46 +08:00
parent ae4f124223
commit d526d97f4e
1 changed files with 21 additions and 15 deletions

View File

@ -180,8 +180,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
<!-- <el-button v-show="!ISCHECK" type="primary" @click="goCheck"> </el-button> -->
<el-button v-show="ISCHECK" type="primary" @click="confirm"> </el-button>
<el-button v-show="!ISCHECK" type="primary" @click="goCheck"> </el-button>
</div>
</el-dialog>
</div>
@ -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 {