Commit 1f9256d27a975f185de3014915a0562a4409d69b

Authored by vking
1 parent 16156c6d

迁移到New接口,使用ddate_solt

@@ -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)
@@ -14,9 +14,9 @@ @@ -14,9 +14,9 @@
14 width:100%; 14 width:100%;
15 line-height:1.2; 15 line-height:1.2;
16 } 16 }
17 -.reserve-status-4,.reserve-status-3{ 17 +.reserve-status-4,.reserve-status-3,.reserve-status-6{
18 color:#999999; 18 color:#999999;
19 } 19 }
20 -.reserve-status-4 .green-font,.reserve-status-3 .green-font{ 20 +.reserve-status-4 .green-font,.reserve-status-3 .green-font,.reserve-status-6 .green-font{
21 color:#999999; 21 color:#999999;
22 } 22 }
@@ -12,6 +12,7 @@ Page({ @@ -12,6 +12,7 @@ Page({
12 sellerid:'', 12 sellerid:'',
13 options:null, 13 options:null,
14 onLoad: function (opt) { 14 onLoad: function (opt) {
  15 + //rdate=1574910000-1574924400&tid=0&pnum=6&checked_tids=&rid=44038&ddate_solt=2
15 console.log('onLoad', opt) 16 console.log('onLoad', opt)
16 wx.removeStorageSync('tableid') 17 wx.removeStorageSync('tableid')
17 this.options=opt; 18 this.options=opt;
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 <view style="height: {{height-80}}px;overflow-y: auto;padding-bottom: 160rpx;overflow-x: hidden;width: 100%;"> 12 <view style="height: {{height-80}}px;overflow-y: auto;padding-bottom: 160rpx;overflow-x: hidden;width: 100%;">
13 <block wx:for="{{desklist}}" wx:key="desklist.key"> 13 <block wx:for="{{desklist}}" wx:key="desklist.key">
14 <orderDesk list="{{item.list}}" checkedTids="{{opt.checked_tids}}" 14 <orderDesk list="{{item.list}}" checkedTids="{{opt.checked_tids}}"
  15 + reserveId="{{opt.rid}}"
15 bind:changedesk="changedesk" hasPubSub="{{hasPubSub}}" 16 bind:changedesk="changedesk" hasPubSub="{{hasPubSub}}"
16 wx:if="{{item.name==menu_active_id}}"></orderDesk> 17 wx:if="{{item.name==menu_active_id}}"></orderDesk>
17 </block> 18 </block>