Browse Source

就诊人信息

master
kuaileWu 1 year ago
parent
commit
ff234f6002
  1. 2
      App.vue
  2. 9
      components/inputBox.vue
  3. 16
      pages/add_visitor_form/add_visitor_form.vue

2
App.vue

@ -71,7 +71,7 @@
display: none;
}
.hover{
opacity: 0.7;
opacity: 0.8;
}
.ft18{

9
components/inputBox.vue

@ -53,20 +53,20 @@ export default {
var value = e.detail.value
var res = this.check(value);
if(!res){
this.$emit('blurEvent', '')
this.$emit('blurEvent', value, false)
return
}
this.$emit('blurEvent', value)
this.$emit('blurEvent', value, true)
},
handleInput(e){
if(!this.errormsg) return;
var value = e.detail.value
var res = this.check(value);
if(!res){
this.$emit('blurEvent', '')
this.$emit('blurEvent', value, false)
return
}
this.$emit('blurEvent', value)
this.$emit('blurEvent', value, true)
},
check(value){
var noEmptyVal = this.$trim.trim(value)
@ -124,7 +124,6 @@ export default {
opacity: 0;
}
}
.right{
flex-grow: 1;
color: #242833;

16
pages/add_visitor_form/add_visitor_form.vue

@ -23,29 +23,35 @@
return {
canSubmit:false,
name:'',
nameRule:false,
idcardExt:'',
phone:''
idcardExtRule:false,
phone:'',
phoneRule:false,
}
},
components:{
inputBox
},
methods: {
nameBlurEvent(value){
nameBlurEvent(value, res){
this.name = value
this.nameRule = res
this.checkSubmit()
},
idCardBlurEvent(value){
idCardBlurEvent(value, res){
this.idcardExt = value
this.idcardExtRule = res
this.checkSubmit()
},
phoneBlurEvent(value){
phoneBlurEvent(value, res){
this.phone = value
this.phoneRule = res
this.checkSubmit()
},
checkSubmit() {
this.canSubmit = false
if(!this.name || !this.idcardExt || !this.phone) return
if(!this.nameRule || !this.idcardExtRule || !this.phoneRule) return
this.canSubmit = true
},
submit(){

Loading…
Cancel
Save