Commit 758c96ddf4d55e678e95089b897fa8d9fd1d62cc

Authored by wangfan
1 parent 1e85808b

录入调整

... ... @@ -18,6 +18,10 @@ Component({
board:{
type:Object,
value:{}
},
event:{
type:String,
value:'',
}
},
... ... @@ -34,7 +38,8 @@ Component({
itemList:[],
methods: {
boardClick(){
this.boardOpt()
if(!this.data.event) return;
this[this.data.event]()
},
//桌位操作
boardOpt(){
... ...
... ... @@ -122,5 +122,13 @@ Page({
this.setData({
actionSheetHidden:true
})
},
startDinner(e){
App.Reserve.SetReserveStatus({
rid:this.data.bookInfo.id,
status:util.attr(e,'status'),
}).then(()=>{
this.getDetail(this.data.bookInfo.id,true);
});
}
})
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@
"usingComponents": {
"noticeCall":"/components/book/notice/notice",
"step":"/components/book/step/step",
"board":"/components/book/board/board",
"nav":"/components/nav/nav"
}
}
\ No newline at end of file
... ...
... ... @@ -17,6 +17,9 @@
<view class="gray-deep-font font30r"></view>
<view class="flex-re" style="width:80%;flex-wrap:wrap;">
<block wx:for="{{tables}}">
<board width="160" height="160" board="{{item}}"
style="margin-left:20rpx;zoom: 0.8"></board>
<!--
<view class="order-desk-info">
<view class="flex-vc order-desk-detail" style="height:{{item.tid==2 ? '90' : '120'}}rpx;">
<view class="font28r black-font smooth font-more" style="width:100%;text-align:center;">{{item.name}}</view>
... ... @@ -26,6 +29,7 @@
<view class="order-desk-type flex-cc white-font font20r">包间</view>
</block>
</view>
-->
</block>
</view>
</view>
... ... @@ -66,13 +70,17 @@
<view style="height: 250rpx;"></view>
<!--通知预订人-->
<view class="notice-opt">
<view class="notice-opt" wx:if="{{bookInfo.status==1}}">
<view class="notice-button white-font font34r flex-cc" bindtap="noticeCall">通知预订人</view>
<view class="notice-button-border font34r flex-lr">
<view bindtap="gotoModify">变更预定</view>
<view bindtap="cancelReserve">取消预定</view>
<view bindtap="startDinner" data-status="2">确认到店</view>
</view>
</view>
<view class="notice-opt" wx:if="{{bookInfo.status==2}}">
<view class="notice-button white-font font34r flex-cc" bindtap="startDinner" data-status="3">顾客就餐完毕</view>
</view>
<noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall>
<action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll">
<block wx:for-items="{{actionSheetItems}}">
... ...
... ... @@ -132,14 +132,14 @@ Page({
ts.forEach(tid=>{
tids[tid]={
rdate:r.rdate,
id:r.id
id:r.id,
status:r.status,
}
})
})
}
console.log('tids',tids);
let regions=[];
let now=new Date()/1000;
this.regions.forEach(region=>{
if(region.list.length>0){
region.list.forEach(tb=>{
... ... @@ -147,7 +147,7 @@ Page({
tb.status_classname='enabled'
if(tids[tb.id]){
console.log('tids',region.name,tb.name);
tb.status_str=now>tids[tb.id].rdate?'用餐中':'已预订';
tb.status_str=tids[tb.id].status==2?'用餐中':'已预订';
tb.status_classname='highlight';
tb.reserve_id=tids[tb.id].id;
}
... ...
... ... @@ -37,6 +37,7 @@
<board width="160" height="160" board="{{item}}"
style="margin: 20rpx 0 0 20rpx"
bindboardEvent="boardEvent"
event="boardOpt"
wx:for="{{item.list}}" wx:key="item.key" ></board>
</view>
</block>
... ...
... ... @@ -60,7 +60,9 @@ export default {
},
// 修改当前预定状态 0:待确认,1:已定座,2:确认到店,3:用餐完成
'App.Reserve.SetReserveStatus':null,
'App.Reserve.SetReserveStatus':{
silence:false,
},
//修改当前桌子是否启用 0:未启用,1:启用
'App.Reserve.SetSwitchStatus':{
... ...