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

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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button> <el-button @click="dialogFormEdit = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button> <el-button v-show="ISCHECK" 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="goCheck"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -260,7 +260,7 @@ export default {
keyDepeName: '', keyDepeName: '',
keyJobLeven: '', keyJobLeven: '',
// 9.11 ISCHECK = false // 9.11 ISCHECK = false
ISCHECK: true, ISCHECK: false,
dialogFormEdit: false, dialogFormEdit: false,
editloading: false, editloading: false,
dialogType: 'add', dialogType: 'add',
@ -476,18 +476,19 @@ export default {
}) })
}, },
goCheck() { goCheck() {
if (this.pd.USER_ID_CARD && this.pd.PHONE) { // 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 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 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 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) // const cardResult = cardJudge.test(this.pd.USER_ID_CARD)
if (phoneResult && cardResult) { // if (phoneResult && cardResult) {
if (true) {
console.log('格式校验通过') console.log('格式校验通过')
requestFN( requestFN(
'user/goCheck', 'user/goCheck',
{ {
CARD_NO: this.pd.USER_ID_CARD, CARD_NO: this.pd.USER_ID_CARD,
USERNAME: this.pd.PHONE, USERNAME: this.pd.USERNAME,
USER_ID: this.pd.USER_ID || '' USER_ID: this.pd.USER_ID || ''
} }
).then((data) => { ).then((data) => {
@ -495,7 +496,7 @@ export default {
this.$message.success('验证通过') this.$message.success('验证通过')
this.ISCHECK = true this.ISCHECK = true
} else { } else {
this.$message.error('验证失败,请确认身份证号与手机号是否正确') this.$message.error('验证失败,请确认用户名不重复')
this.ISCHECK = false this.ISCHECK = false
} }
}).catch((e) => { }).catch((e) => {
@ -505,9 +506,9 @@ export default {
} else { } else {
this.ISCHECK = false this.ISCHECK = false
} }
} else { // } else {
this.ISCHECK = false // this.ISCHECK = false
} // }
}, },
getList() { getList() {
this.listLoading = true this.listLoading = true
@ -600,7 +601,7 @@ export default {
handleAdd() { handleAdd() {
this.dialogFormEdit = true this.dialogFormEdit = true
// 9.11 :ISCHECK = false // 9.11 :ISCHECK = false
this.ISCHECK = true this.ISCHECK = false
this.pd = {} this.pd = {}
this.dialogType = 'saveUser' this.dialogType = 'saveUser'
this.pd.PASSWORD = 'Aa@123456789' this.pd.PASSWORD = 'Aa@123456789'
@ -626,6 +627,7 @@ export default {
'/user/' + this.dialogType, '/user/' + this.dialogType,
this.pd this.pd
).then((data) => { ).then((data) => {
console.log(data.result)
this.listLoading = false this.listLoading = false
this.dialogFormEdit = false this.dialogFormEdit = false
this.varList = [] this.varList = []
@ -633,6 +635,10 @@ export default {
this.listQuery.page = 1 this.listQuery.page = 1
this.goPush(data.pd) this.goPush(data.pd)
}).catch((e) => { }).catch((e) => {
this.$message({
message: '用户名重复',
type: 'error'
})
this.listLoading = false this.listLoading = false
}) })
} else { } else {