Browse Source

修改/删除就诊人信息页面接口联调交互

master
kuaileWu 1 year ago
parent
commit
e310f28869
  1. 33
      pages/modify_visitor/modify_visitor.vue

33
pages/modify_visitor/modify_visitor.vue

@ -41,22 +41,7 @@
if(option.vid) this.vid = option.vid
},
onShow() {
if(this.vid){
var visitor_info = uni.getStorageSync('visitor_info_'+this.vid)
if(!visitor_info) {
this.$func.toPage('/pages/index/index')
return
}
visitor_info = JSON.parse(visitor_info)
this.name = visitor_info.real_name
this.idcardExt = visitor_info.id_no
this.phone = visitor_info.mobile
this.nameRule = true
this.idcardExtRule = true
this.phoneRule = true
this.checkSubmit()
}
if(this.vid) this.getVisitorInfo()
},
methods: {
add() {
@ -83,6 +68,22 @@
if(data == -1) return
this.$func.toPage('/pages/visitors/visitors?type='+this.type)
});
},
getVisitorInfo() {
this.$http.req('get_visitor_info', {id:this.vid}, 'GET', true).then(data=>{
if(data == -1) {
this.$func.toPage('/pages/index/index')
return
}
this.name = data.name
this.idcardExt = data.idcard_ext
this.phone = data.phone
this.nameRule = true
this.idcardExtRule = true
this.phoneRule = true
this.checkSubmit()
});
},
nameBlurEvent(value, res){
this.name = value

Loading…
Cancel
Save