|
...
|
...
|
@@ -55,6 +55,9 @@ Page({ |
|
|
|
};
|
|
|
|
},
|
|
|
|
getcall:function(){
|
|
|
|
if(!this.detailData.hasOwner){
|
|
|
|
return util.toast('只有记录人可以拨打','none');
|
|
|
|
}
|
|
|
|
if(this.data.bookInfo.phone.length<3){
|
|
|
|
return util.toast('号码错误','none');
|
|
|
|
}
|
|
...
|
...
|
@@ -109,14 +112,26 @@ Page({ |
|
|
|
App.Reserve.SellerInfo(util.cache('enter_params'),true);
|
|
|
|
},
|
|
|
|
detailData:null,
|
|
|
|
getDetail(id,force=false){
|
|
|
|
App.Reserve.Detail({rid:id,openid:''},force).then(res=>{
|
|
|
|
res.data.rdateStr=util.unixtoTime(res.data.ddate,"MM月DD日 HH:II")
|
|
|
|
this.detailData=res.data;
|
|
|
|
this.setData({
|
|
|
|
tables:res.data.tables,
|
|
|
|
bookInfo:res.data,
|
|
|
|
})
|
|
|
|
async getDetail(id,force=false){
|
|
|
|
let res=await App.Reserve.Detail({rid:id,openid:''},force);
|
|
|
|
res.data.rdateStr=util.unixtoTime(res.data.ddate,"MM月DD日 HH:II")
|
|
|
|
res.data.phoneStr=res.data.phone;
|
|
|
|
let enter_params=util.cache('enter_params');
|
|
|
|
let sc=(await App.Reserve.SellerInfo(enter_params)).data
|
|
|
|
let note_openid=enter_params.seller_openid;
|
|
|
|
res.data.hasOwner=false;
|
|
|
|
if(note_openid==res.data.note_openid || sc.seller_user.role_name=='管理员'){
|
|
|
|
res.data.hasOwner=true;
|
|
|
|
}
|
|
|
|
if(res.data.hasOwner){
|
|
|
|
res.data.phoneStr=res.data.phoneStr.replace(/(\d{2})(.{5})(\d{3})/,function($0,$1,$2,$3){
|
|
|
|
return $1+'**'+$3;
|
|
|
|
})
|
|
|
|
}
|
|
|
|
this.detailData=res.data;
|
|
|
|
this.setData({
|
|
|
|
tables:res.data.tables,
|
|
|
|
bookInfo:res.data,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
gotoModify(){
|
...
|
...
|
|