|
...
|
...
|
@@ -7,6 +7,10 @@ Component({ |
|
|
|
type:String,
|
|
|
|
value:"",
|
|
|
|
},
|
|
|
|
reserveId:{
|
|
|
|
type:String,
|
|
|
|
value:"",
|
|
|
|
},
|
|
|
|
hasPubSub:{
|
|
|
|
type:Boolean,
|
|
|
|
value:false
|
|
...
|
...
|
@@ -20,10 +24,16 @@ Component({ |
|
|
|
var list = this.data.list;
|
|
|
|
if(this.data.hasPubSub){
|
|
|
|
let checkedTids=this.data.checkedTids.split(',');
|
|
|
|
list.forEach(function (v, i) {
|
|
|
|
list.forEach( (v, i)=>{
|
|
|
|
if (v.id == tebleid) {
|
|
|
|
console.log('click.board',v);
|
|
|
|
if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
|
|
|
|
if(this.data.reserveId){
|
|
|
|
if(v.reserve_id!=this.data.reserveId){
|
|
|
|
if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
|
|
|
|
}
|
|
|
|
if (v.isselect == true) {
|
|
|
|
var thisindex = tables.indexOf(tebleid);
|
|
|
|
tables.splice(thisindex, 1)
|
|
...
|
...
|
@@ -37,10 +47,16 @@ Component({ |
|
|
|
var pages = getCurrentPages();
|
|
|
|
var addnewPage=pages[pages.length - 2];
|
|
|
|
let checkedTids=this.data.checkedTids.split(',');
|
|
|
|
list.forEach(function (v, i) {
|
|
|
|
list.forEach( (v, i) =>{
|
|
|
|
if (v.id == tebleid) {
|
|
|
|
console.log('click.board',v);
|
|
|
|
if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
|
|
|
|
if(this.data.reserveId){
|
|
|
|
if(v.reserve_id!=this.data.reserveId) {
|
|
|
|
if (v.status_str && checkedTids._indexOf(v.id) < 0) return util.toast('不能预订该桌位', 'none');
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if (v.status_str && checkedTids._indexOf(v.id) < 0) return util.toast('不能预订该桌位', 'none');
|
|
|
|
}
|
|
|
|
if (v.isselect == true) {
|
|
|
|
var thisindex = tables.indexOf(tebleid);
|
|
|
|
tables.splice(thisindex, 1)
|
...
|
...
|
|