|
...
|
...
|
@@ -61,17 +61,35 @@ Page({ |
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getTableName(tables){
|
|
|
|
let bao=[],san=[];
|
|
|
|
tables.forEach(t=>{
|
|
|
|
if(t.tid==2){
|
|
|
|
bao.push(t.name);
|
|
|
|
}else{
|
|
|
|
san.push(t.name);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
let str='';
|
|
|
|
if(bao.length>0){
|
|
|
|
str='包厢('+bao.join('、')+')';
|
|
|
|
}
|
|
|
|
if(san.length>0){
|
|
|
|
str+=san.join('、');
|
|
|
|
}
|
|
|
|
str=str.substr(0,20);
|
|
|
|
if(str.indexOf('(')>-1 && str.indexOf(')')<0){
|
|
|
|
str=str.substr(0,19)+')';
|
|
|
|
}
|
|
|
|
return str;
|
|
|
|
},
|
|
|
|
smsData:{},
|
|
|
|
getTplMsg(){
|
|
|
|
let region_room_name=this.bookInfo.tables[0].rname+' '+this.bookInfo.tables[0].name;
|
|
|
|
if(this.bookInfo.tables.length>1){
|
|
|
|
region_room_name+='等'+this.bookInfo.tables.length+'桌'
|
|
|
|
}
|
|
|
|
let smsData={
|
|
|
|
guest:this.bookInfo.rname.substr(0,1)+(this.bookInfo.sex==1?'先生':'女士'),
|
|
|
|
seller_name:this.bookInfo.seller.sellername.substr(0,20),
|
|
|
|
date:this.bookInfo.rdateStr,
|
|
|
|
region_room_name:region_room_name.substr(0,20),
|
|
|
|
region_room_name:this.getTableName(this.bookInfo.tables),
|
|
|
|
reserve_pnum:(this.bookInfo.pnum || this.bookInfo.pnum_str)+'人',
|
|
|
|
seller_addr:(this.bookInfo.seller.real_address || this.bookInfo.seller.map_address).substr(0,20),
|
|
|
|
seller_phone:this.bookInfo.seller.phone.substr(0,20),
|
...
|
...
|
|