Showing
7 changed files
with
31 additions
and
6 deletions
| @@ -18,6 +18,10 @@ Component({ | @@ -18,6 +18,10 @@ Component({ | ||
| 18 | board:{ | 18 | board:{ |
| 19 | type:Object, | 19 | type:Object, |
| 20 | value:{} | 20 | value:{} |
| 21 | + }, | ||
| 22 | + event:{ | ||
| 23 | + type:String, | ||
| 24 | + value:'', | ||
| 21 | } | 25 | } |
| 22 | }, | 26 | }, |
| 23 | 27 | ||
| @@ -34,7 +38,8 @@ Component({ | @@ -34,7 +38,8 @@ Component({ | ||
| 34 | itemList:[], | 38 | itemList:[], |
| 35 | methods: { | 39 | methods: { |
| 36 | boardClick(){ | 40 | boardClick(){ |
| 37 | - this.boardOpt() | 41 | + if(!this.data.event) return; |
| 42 | + this[this.data.event]() | ||
| 38 | }, | 43 | }, |
| 39 | //桌位操作 | 44 | //桌位操作 |
| 40 | boardOpt(){ | 45 | boardOpt(){ |
| @@ -122,5 +122,13 @@ Page({ | @@ -122,5 +122,13 @@ Page({ | ||
| 122 | this.setData({ | 122 | this.setData({ |
| 123 | actionSheetHidden:true | 123 | actionSheetHidden:true |
| 124 | }) | 124 | }) |
| 125 | + }, | ||
| 126 | + startDinner(e){ | ||
| 127 | + App.Reserve.SetReserveStatus({ | ||
| 128 | + rid:this.data.bookInfo.id, | ||
| 129 | + status:util.attr(e,'status'), | ||
| 130 | + }).then(()=>{ | ||
| 131 | + this.getDetail(this.data.bookInfo.id,true); | ||
| 132 | + }); | ||
| 125 | } | 133 | } |
| 126 | }) | 134 | }) |
| @@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
| 5 | "usingComponents": { | 5 | "usingComponents": { |
| 6 | "noticeCall":"/components/book/notice/notice", | 6 | "noticeCall":"/components/book/notice/notice", |
| 7 | "step":"/components/book/step/step", | 7 | "step":"/components/book/step/step", |
| 8 | + "board":"/components/book/board/board", | ||
| 8 | "nav":"/components/nav/nav" | 9 | "nav":"/components/nav/nav" |
| 9 | } | 10 | } |
| 10 | } | 11 | } |
| @@ -17,6 +17,9 @@ | @@ -17,6 +17,9 @@ | ||
| 17 | <view class="gray-deep-font font30r"></view> | 17 | <view class="gray-deep-font font30r"></view> |
| 18 | <view class="flex-re" style="width:80%;flex-wrap:wrap;"> | 18 | <view class="flex-re" style="width:80%;flex-wrap:wrap;"> |
| 19 | <block wx:for="{{tables}}"> | 19 | <block wx:for="{{tables}}"> |
| 20 | + <board width="160" height="160" board="{{item}}" | ||
| 21 | + style="margin-left:20rpx;zoom: 0.8"></board> | ||
| 22 | + <!-- | ||
| 20 | <view class="order-desk-info"> | 23 | <view class="order-desk-info"> |
| 21 | <view class="flex-vc order-desk-detail" style="height:{{item.tid==2 ? '90' : '120'}}rpx;"> | 24 | <view class="flex-vc order-desk-detail" style="height:{{item.tid==2 ? '90' : '120'}}rpx;"> |
| 22 | <view class="font28r black-font smooth font-more" style="width:100%;text-align:center;">{{item.name}}</view> | 25 | <view class="font28r black-font smooth font-more" style="width:100%;text-align:center;">{{item.name}}</view> |
| @@ -26,6 +29,7 @@ | @@ -26,6 +29,7 @@ | ||
| 26 | <view class="order-desk-type flex-cc white-font font20r">包间</view> | 29 | <view class="order-desk-type flex-cc white-font font20r">包间</view> |
| 27 | </block> | 30 | </block> |
| 28 | </view> | 31 | </view> |
| 32 | + --> | ||
| 29 | </block> | 33 | </block> |
| 30 | </view> | 34 | </view> |
| 31 | </view> | 35 | </view> |
| @@ -66,13 +70,17 @@ | @@ -66,13 +70,17 @@ | ||
| 66 | <view style="height: 250rpx;"></view> | 70 | <view style="height: 250rpx;"></view> |
| 67 | 71 | ||
| 68 | <!--通知预订人--> | 72 | <!--通知预订人--> |
| 69 | -<view class="notice-opt"> | 73 | +<view class="notice-opt" wx:if="{{bookInfo.status==1}}"> |
| 70 | <view class="notice-button white-font font34r flex-cc" bindtap="noticeCall">通知预订人</view> | 74 | <view class="notice-button white-font font34r flex-cc" bindtap="noticeCall">通知预订人</view> |
| 71 | <view class="notice-button-border font34r flex-lr"> | 75 | <view class="notice-button-border font34r flex-lr"> |
| 72 | <view bindtap="gotoModify">变更预定</view> | 76 | <view bindtap="gotoModify">变更预定</view> |
| 73 | <view bindtap="cancelReserve">取消预定</view> | 77 | <view bindtap="cancelReserve">取消预定</view> |
| 78 | + <view bindtap="startDinner" data-status="2">确认到店</view> | ||
| 74 | </view> | 79 | </view> |
| 75 | </view> | 80 | </view> |
| 81 | +<view class="notice-opt" wx:if="{{bookInfo.status==2}}"> | ||
| 82 | + <view class="notice-button white-font font34r flex-cc" bindtap="startDinner" data-status="3">顾客就餐完毕</view> | ||
| 83 | +</view> | ||
| 76 | <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall> | 84 | <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall> |
| 77 | <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll"> | 85 | <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll"> |
| 78 | <block wx:for-items="{{actionSheetItems}}"> | 86 | <block wx:for-items="{{actionSheetItems}}"> |
| @@ -132,14 +132,14 @@ Page({ | @@ -132,14 +132,14 @@ Page({ | ||
| 132 | ts.forEach(tid=>{ | 132 | ts.forEach(tid=>{ |
| 133 | tids[tid]={ | 133 | tids[tid]={ |
| 134 | rdate:r.rdate, | 134 | rdate:r.rdate, |
| 135 | - id:r.id | 135 | + id:r.id, |
| 136 | + status:r.status, | ||
| 136 | } | 137 | } |
| 137 | }) | 138 | }) |
| 138 | }) | 139 | }) |
| 139 | } | 140 | } |
| 140 | console.log('tids',tids); | 141 | console.log('tids',tids); |
| 141 | let regions=[]; | 142 | let regions=[]; |
| 142 | - let now=new Date()/1000; | ||
| 143 | this.regions.forEach(region=>{ | 143 | this.regions.forEach(region=>{ |
| 144 | if(region.list.length>0){ | 144 | if(region.list.length>0){ |
| 145 | region.list.forEach(tb=>{ | 145 | region.list.forEach(tb=>{ |
| @@ -147,7 +147,7 @@ Page({ | @@ -147,7 +147,7 @@ Page({ | ||
| 147 | tb.status_classname='enabled' | 147 | tb.status_classname='enabled' |
| 148 | if(tids[tb.id]){ | 148 | if(tids[tb.id]){ |
| 149 | console.log('tids',region.name,tb.name); | 149 | console.log('tids',region.name,tb.name); |
| 150 | - tb.status_str=now>tids[tb.id].rdate?'用餐中':'已预订'; | 150 | + tb.status_str=tids[tb.id].status==2?'用餐中':'已预订'; |
| 151 | tb.status_classname='highlight'; | 151 | tb.status_classname='highlight'; |
| 152 | tb.reserve_id=tids[tb.id].id; | 152 | tb.reserve_id=tids[tb.id].id; |
| 153 | } | 153 | } |
| @@ -37,6 +37,7 @@ | @@ -37,6 +37,7 @@ | ||
| 37 | <board width="160" height="160" board="{{item}}" | 37 | <board width="160" height="160" board="{{item}}" |
| 38 | style="margin: 20rpx 0 0 20rpx" | 38 | style="margin: 20rpx 0 0 20rpx" |
| 39 | bindboardEvent="boardEvent" | 39 | bindboardEvent="boardEvent" |
| 40 | + event="boardOpt" | ||
| 40 | wx:for="{{item.list}}" wx:key="item.key" ></board> | 41 | wx:for="{{item.list}}" wx:key="item.key" ></board> |
| 41 | </view> | 42 | </view> |
| 42 | </block> | 43 | </block> |
| @@ -60,7 +60,9 @@ export default { | @@ -60,7 +60,9 @@ export default { | ||
| 60 | }, | 60 | }, |
| 61 | 61 | ||
| 62 | // 修改当前预定状态 0:待确认,1:已定座,2:确认到店,3:用餐完成 | 62 | // 修改当前预定状态 0:待确认,1:已定座,2:确认到店,3:用餐完成 |
| 63 | - 'App.Reserve.SetReserveStatus':null, | 63 | + 'App.Reserve.SetReserveStatus':{ |
| 64 | + silence:false, | ||
| 65 | + }, | ||
| 64 | 66 | ||
| 65 | //修改当前桌子是否启用 0:未启用,1:启用 | 67 | //修改当前桌子是否启用 0:未启用,1:启用 |
| 66 | 'App.Reserve.SetSwitchStatus':{ | 68 | 'App.Reserve.SetSwitchStatus':{ |
-
Please register or login to post a comment