Commit e4d279b9320e01f04b91ec16ca135e8c411dea5c

Authored by vking
1 parent 59d37a22

商户在线预订展示调整

... ... @@ -32,6 +32,10 @@ Component({
type:String,
value:'',
},
roomDemand:{
type:Boolean,
value:false
},
},
/**
... ...
... ... @@ -4,7 +4,14 @@
bindtap="boardClick">
<view class="info">
<view class="name">{{board.name}}</view>
<view class="pnum" style="{{board.reserve_name?'color:#199095;':''}}">
<block wx:if="{{roomDemand}}">
<view class="pnum" wx:if="{{board.max>0}}">最多可坐{{board.max}}人</view>
<view class="low" wx:if="{{board.low>0}}">
<view>最低消费</view>
<view>{{board.low}}元</view>
</view>
</block>
<view class="pnum" wx:else="" style="{{board.reserve_name?'color:#199095;':''}}">
{{board.reserve_name?board.reserve_name:(board.table_pnum+((board.most_pnum*1>board.table_pnum*1)?'-'+board.most_pnum:'')+'人')}}
</view>
</view>
... ...
... ... @@ -39,7 +39,6 @@
}
.board .info{
text-align: center;
width: 80%;
margin: -10rpx 10% 0;
color: #353535;
}
... ... @@ -55,6 +54,14 @@
overflow: hidden;
max-height: 50rpx;
line-height: 26rpx;
white-space:nowrap;
}
.board .low{
font-size: 20rpx;
overflow: hidden;
line-height: 28rpx;
white-space:nowrap;
color: #199095;
}
.board.highlight .status,.board.disabled-highlight .status{
... ... @@ -81,4 +88,7 @@
}
.board.noBottom .pnum{
margin-top: 20rpx;
}
.board.noBottom .low{
margin-top: 0rpx;
}
\ No newline at end of file
... ...
var util = require('../../../utils/util.js')
var uri = require('../../../utils/uri.js')
import App from '../../../utils/api';
import RS from '../../../utils/reserveStatus'
const {regeneratorRuntime} = global
import TP from '../../../utils/tpls';
... ... @@ -152,11 +153,11 @@ Page({
if (res.data.status == 4 && res.data.cancel) {
res.data.cancel.cdateStr = util.unixtoTime(res.data.cancel.cdate, "YYYY.MM.DD HH:II")
}
this.detailData = res.data;
this.detailData = RS.reserve(res.data);
this.setData({
tables: res.data.tables,
bookInfo: res.data,
bookInfo: this.detailData,
})
},
gotoModify() {
... ...
... ... @@ -5,23 +5,36 @@
<view class="gray-deep-font font30r">到店时间</view>
<view class="black-font font34r">{{bookInfo.rdateStr}}</view>
</view>
<view class="flex-lr order-detail">
<view class="flex-lr order-detail" wx:if="{{bookInfo.type==1}}">
<view class="gray-deep-font font30r">包间需求</view>
<view class="black-font font34r">{{bookInfo.room_demand.length}}个</view>
</view>
<view class="flex-lr order-detail" wx:else="">
<view class="gray-deep-font font30r">用餐人数</view>
<view class="black-font font34r">{{bookInfo.pnum_str||bookInfo.pnum}}人</view>
</view>
<view class="reserve-status-tip" wx:if="{{bookInfo.status!=null}}">
<image src="http://qn.colorcun.com/custom/lite-yd/image/reserve-status-{{bookInfo.status}}.png"></image>
</view>
<view class="flex-lr order-desk">
<view class="flex-re" style="width:100%;flex-wrap:wrap;">
<block wx:for="{{bookInfo.room_demand}}" wx:key="tables.key">
<board width="160" height="180" board="{{item}}"
roomDemand
className="noBottom"
style="margin-left:20rpx; margin-bottom: 20rpx;"></board>
</block>
</view>
</view>
<view class="flex-lr order-detail">
<view class="gray-deep-font font30r">预订座位</view>
<view class="black-font font34r">{{tables.length}}个</view>
</view>
<view class="flex-lr order-desk">
<view class="gray-deep-font font30r"></view>
<view class="flex-re" style="width:100%;flex-wrap:wrap;">
<block wx:for="{{tables}}" wx:key="tables.key">
<board width="160" height="180" board="{{item}}" className="noBottom"
style="margin-left:20rpx;zoom: 0.8; margin-bottom: 20rpx;"></board>
style="margin-left:20rpx; margin-bottom: 20rpx;"></board>
</block>
</view>
</view>
... ... @@ -81,7 +94,7 @@
<view style="height: 250rpx;"></view>
<!--通知预订人-->
<view class="notice-opt" wx:if="{{bookInfo.status==1}}">
<view class="notice-opt" wx:if="{{bookInfo.hasRunning}}">
<view class="notice-button-border font34r flex-lr">
<view>
<formids bindclick="noticeCall">通知客户</formids>
... ...
... ... @@ -131,4 +131,7 @@ view{
.reserve-status-tip image{
width: 100%;
height: 100%;
}
.gray-deep-font{
min-width: 140rpx;
}
\ No newline at end of file
... ...
... ... @@ -352,7 +352,7 @@
"id": 39,
"name": "pages/reserve/detail 在线订座 ",
"pathName": "pages/reserve/detail",
"query": "id=1&fromid=&activeTab=reserve",
"query": "id=80&fromid=&activeTab=reserve",
"scene": null
},
{
... ... @@ -494,6 +494,13 @@
"pathName": "pack-book/pages/book/roomtype/roomtype",
"query": "seller_id=154",
"scene": null
},
{
"id": 60,
"name": "pack-book/pages/book/b_detail",
"pathName": "pack-book/pages/book/b_detail",
"query": "id=30711",
"scene": null
}
]
}
... ...
... ... @@ -41,6 +41,7 @@ export default {
let ns = new Date() / 1000
let flag=true;
if(detail.status==0 || detail.status==6 || detail.status==4) return false//未进行状态
if(detail.status==3) return false //用餐完成(离店)
if(ns > detail.edate) return false//超时
return flag
}
... ...