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; display: none;
} }
.hover{ .hover{
opacity: 0.7; opacity: 0.8;
} }
.ft18{ .ft18{

9
components/inputBox.vue

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

16
pages/add_visitor_form/add_visitor_form.vue

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

Loading…
Cancel
Save