Commit 7a47a8df by tangjiale

修复bug

parent f65b4310
......@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @Date: 2022-06-02 15:02:39
* @LastEditors: tangjiale
* @LastEditTime: 2022-07-05 09:51:59
* @LastEditTime: 2022-07-05 14:28:19
-->
<template>
<div>
......@@ -98,7 +98,7 @@ export default {
queryDetail(id){
this.$refs['studentForm'] && this.$refs['studentForm'].resetFields()
this.$service.student.queryStudentDetail(id).then(res =>{
let {id,name,birthday,gender,fatherPhone,motherPhone,otherPhone,schIds,readSchName} = res
let {id='',name = '',birthday='',gender='',fatherPhone='',motherPhone='',otherPhone='',schIds='',readSchName=''} = res
let schId = (schIds.split(',')).map(v => Number(v))
this.param = {id,name,birthday,gender,fatherPhone,motherPhone,otherPhone,schIds:schId,readSchName}
})
......@@ -111,15 +111,15 @@ export default {
this.$message.error('至少输入一个手机号')
return
}
if(that.param.fatherPhone.length && !that.isTel(that.param.fatherPhone)){
if(that.param.fatherPhone && that.param.fatherPhone.length && !that.isTel(that.param.fatherPhone)){
this.$message.error('请输入正确手机号')
return
}
if(that.param.motherPhone.length && !that.isTel(that.param.motherPhone)){
if(that.param.motherPhone && that.param.motherPhone.length && !that.isTel(that.param.motherPhone)){
this.$message.error('请输入正确手机号')
return
}
if(that.param.otherPhone.length && !that.isTel(that.param.otherPhone)){
if(that.param.otherPhone && that.param.otherPhone.length && !that.isTel(that.param.otherPhone)){
this.$message.error('请输入正确手机号')
return
}
......@@ -134,7 +134,7 @@ export default {
that.$emit('update')
that.$refs['studentForm'] && that.$refs['studentForm'].resetFields()
that.change()
},1500)
},200)
})
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment