|
...
|
...
|
@@ -111,6 +111,26 @@ Page({ |
|
|
|
let val;
|
|
|
|
if(e.type=='input'){
|
|
|
|
val=util.val(e);
|
|
|
|
if(e.currentTarget.dataset.key=='phone'){
|
|
|
|
var that=this;
|
|
|
|
if(e.detail.value!='' && e.detail.value.length>=3) {
|
|
|
|
App.Reserve.GetReserveUser({keywords:e.detail.value}).then(function(json){
|
|
|
|
if(json.ret==200 && json.data.length>0){
|
|
|
|
that.setData({
|
|
|
|
searchlist:json.data
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
that.setData({
|
|
|
|
searchlist:null
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
this.setData({
|
|
|
|
searchlist:null
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
val=util.attr(e,'value');
|
|
|
|
}
|
|
...
|
...
|
@@ -195,29 +215,10 @@ Page({ |
|
|
|
})
|
|
|
|
}catch (e){}
|
|
|
|
},
|
|
|
|
selectedValue:function(e){
|
|
|
|
var that=this;
|
|
|
|
if(e.detail.value!='' && e.detail.value.length>=3) {
|
|
|
|
App.Reserve.GetReserveUser({keywords:e.detail.value}).then(function(json){
|
|
|
|
if(json.ret==200 && json.data.length>0){
|
|
|
|
that.setData({
|
|
|
|
searchlist:json.data
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
that.setData({
|
|
|
|
searchlist:null
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
this.setData({
|
|
|
|
searchlist:null
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selectphone:function(e){
|
|
|
|
this.data.form.phone=e.detail.phone;
|
|
|
|
this.data.form.rname=e.detail.rname;
|
|
|
|
this.data.form.cusdem=e.detail.cusdem;
|
|
|
|
this.setData({
|
|
|
|
form:this.data.form,
|
|
|
|
searchlist:null
|
...
|
...
|
|