|
@@ -7,6 +7,10 @@ Component({ |
|
@@ -7,6 +7,10 @@ Component({ |
|
7
|
type:String,
|
7
|
type:String,
|
|
8
|
value:"",
|
8
|
value:"",
|
|
9
|
},
|
9
|
},
|
|
|
|
10
|
+ reserveId:{
|
|
|
|
11
|
+ type:String,
|
|
|
|
12
|
+ value:"",
|
|
|
|
13
|
+ },
|
|
10
|
hasPubSub:{
|
14
|
hasPubSub:{
|
|
11
|
type:Boolean,
|
15
|
type:Boolean,
|
|
12
|
value:false
|
16
|
value:false
|
|
@@ -20,10 +24,16 @@ Component({ |
|
@@ -20,10 +24,16 @@ Component({ |
|
20
|
var list = this.data.list;
|
24
|
var list = this.data.list;
|
|
21
|
if(this.data.hasPubSub){
|
25
|
if(this.data.hasPubSub){
|
|
22
|
let checkedTids=this.data.checkedTids.split(',');
|
26
|
let checkedTids=this.data.checkedTids.split(',');
|
|
23
|
- list.forEach(function (v, i) {
|
27
|
+ list.forEach( (v, i)=>{
|
|
24
|
if (v.id == tebleid) {
|
28
|
if (v.id == tebleid) {
|
|
25
|
console.log('click.board',v);
|
29
|
console.log('click.board',v);
|
|
26
|
- if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
|
30
|
+ if(this.data.reserveId){
|
|
|
|
31
|
+ if(v.reserve_id!=this.data.reserveId){
|
|
|
|
32
|
+ if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
|
|
|
|
33
|
+ }
|
|
|
|
34
|
+ }else{
|
|
|
|
35
|
+ if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
|
|
|
|
36
|
+ }
|
|
27
|
if (v.isselect == true) {
|
37
|
if (v.isselect == true) {
|
|
28
|
var thisindex = tables.indexOf(tebleid);
|
38
|
var thisindex = tables.indexOf(tebleid);
|
|
29
|
tables.splice(thisindex, 1)
|
39
|
tables.splice(thisindex, 1)
|
|
@@ -37,10 +47,16 @@ Component({ |
|
@@ -37,10 +47,16 @@ Component({ |
|
37
|
var pages = getCurrentPages();
|
47
|
var pages = getCurrentPages();
|
|
38
|
var addnewPage=pages[pages.length - 2];
|
48
|
var addnewPage=pages[pages.length - 2];
|
|
39
|
let checkedTids=this.data.checkedTids.split(',');
|
49
|
let checkedTids=this.data.checkedTids.split(',');
|
|
40
|
- list.forEach(function (v, i) {
|
50
|
+ list.forEach( (v, i) =>{
|
|
41
|
if (v.id == tebleid) {
|
51
|
if (v.id == tebleid) {
|
|
42
|
console.log('click.board',v);
|
52
|
console.log('click.board',v);
|
|
43
|
- if(v.status_str && checkedTids._indexOf(v.id)<0) return util.toast('不能预订该桌位','none');
|
53
|
+ if(this.data.reserveId){
|
|
|
|
54
|
+ if(v.reserve_id!=this.data.reserveId) {
|
|
|
|
55
|
+ if (v.status_str && checkedTids._indexOf(v.id) < 0) return util.toast('不能预订该桌位', 'none');
|
|
|
|
56
|
+ }
|
|
|
|
57
|
+ }else{
|
|
|
|
58
|
+ if (v.status_str && checkedTids._indexOf(v.id) < 0) return util.toast('不能预订该桌位', 'none');
|
|
|
|
59
|
+ }
|
|
44
|
if (v.isselect == true) {
|
60
|
if (v.isselect == true) {
|
|
45
|
var thisindex = tables.indexOf(tebleid);
|
61
|
var thisindex = tables.indexOf(tebleid);
|
|
46
|
tables.splice(thisindex, 1)
|
62
|
tables.splice(thisindex, 1)
|