Commit bfe4d824 authored by DPFly's avatar DPFly

增加茶饮点餐码

parent a2703327
......@@ -2,7 +2,7 @@
<view class="scan-order-tips" @touchmove.native.stop="noop">
<view class="content">
<view class="close" @click.native.stop="close"></view>
<view class="title">您可能正在{{tableNo}}点餐,是否继续?</view>
<view class="title">您可能正在{{ tableNo }}点餐,是否继续?</view>
<view class="button-group">
<view class="btn cancel" @click.native.stop="close"></view>
<view class="btn confirm" @click.native.stop="confirm"></view>
......@@ -12,103 +12,102 @@
</template>
<script>
export default {
props: {
tableNo: {
type: String,
default: ''
}
export default {
props: {
tableNo: {
type: String,
default: '',
},
},
data() {
return {}
},
methods: {
close() {
this.$emit('close')
},
data() {
return {}
},
methods: {
close() {
this.$emit('close')
},
//点击前往查看
confirm() {
this.$emit('confirm')
},
noop() {}
}
}
//点击前往查看
confirm() {
this.$emit('confirm')
},
noop() {},
},
}
</script>
<style scoped lang="scss">
@import '@/styles/reset.components.scss';
@import '@/styles/util.scss';
@import '@/styles/reset.components.scss';
@import '@/styles/util.scss';
.component-scan-order-tips {
.scan-order-tips {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1001;
.content {
width: 650rpx;
background-color: rgba(0, 0, 0, 0.7);
border-radius: 10rpx;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1001;
.content {
width: 650rpx;
background-color: rgba(0, 0, 0, 0.7);
border-radius: 10rpx;
top: 50%;
left: 50rpx;
transform: translateY(-50%);
box-sizing: border-box;
padding: 60rpx 0;
.close {
background-image: url(https://img-shop.qmimg.cn/s16/images/2019/07/11/06ba913878cecbe0.png);
background-size: 22rpx 22rpx;
background-repeat: no-repeat;
background-position: center center;
position: absolute;
top: 50%;
left: 50rpx;
transform:translateY(-50%);
box-sizing: border-box;
padding: 60rpx 0;
.close {
background-image: url(https://img-shop.qmimg.cn/s16/images/2019/07/11/06ba913878cecbe0.png);
background-size: 22rpx 22rpx;
background-repeat: no-repeat;
background-position: center center;
position: absolute;
right: 0;
top: 0;
width: 55rpx;
height: 55rpx;
}
.title{
padding: 0 60rpx;
right: 0;
top: 0;
width: 55rpx;
height: 55rpx;
}
.title {
padding: 0 60rpx;
font-size: 34rpx;
color: #fff;
text-align: center;
margin-bottom: 50rpx;
}
.button-group {
display: flex;
justify-content: space-between;
padding: 0 110rpx;
.btn {
width: 200rpx;
height: 76rpx;
position: relative;
text-align: center;
font-size: 34rpx;
line-height: 76rpx;
color: #fff;
text-align: center;
margin-bottom: 50rpx;
}
.button-group {
display: flex;
justify-content: space-between;
padding: 0 110rpx;
.btn{
width: 200rpx;
height: 76rpx;
position: relative;
text-align: center;
font-size: 34rpx;
line-height: 76rpx;
color: #fff;
&.cancel{
&::after{
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
width: 400rpx;
height: 152rpx;
transform-origin: left top;
transform: scale(0.5);
border: 1rpx solid #e5e5e5;
border-radius: 12rpx;
}
}
&.confirm{
background-color: rgba(255, 255, 255, 0.3);
border-radius: 6rpx;
&.cancel {
&::after {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
width: 400rpx;
height: 152rpx;
transform-origin: left top;
transform: scale(0.5);
border: 1rpx solid #e5e5e5;
border-radius: 12rpx;
}
}
&.confirm {
background-color: rgba(255, 255, 255, 0.3);
border-radius: 6rpx;
}
}
}
}
}
</style>
......@@ -2,10 +2,13 @@
<view>
<view v-if="isLoadEnd" :class="[orderInfo.seller_receive_status != 2 ? 'pb-120' : '']">
<view class="list-wrapper">
<view class="order-top list list-cir">
<view
class="order-top list list-cir"
v-if="orderInfo.code_type !== 2 || orderInfo.table_members"
>
<view class="table">
<view class="label">扫码点餐/桌号:</view>
<view class="nob">
<view class="label">扫码点餐{{ orderInfo.code_type !== 2 ? '/桌号:' : '' }}</view>
<view class="nob" v-if="orderInfo.code_type !== 2">
<scroll-view
class="table-no"
scroll-x="true"
......
......@@ -2,7 +2,7 @@
<view>
<block v-if="isLoadEnd && !isError">
<!-- 扫码点餐 -->
<block v-if="isScanOrder">
<block v-if="isScanOrder && codeType !== 2">
<view class="scan-order-wrapper">
<view class="list">
<view class="list-left">扫码点餐/桌号</view>
......@@ -651,6 +651,8 @@ export default {
haveDiscount: 0, // 已优惠金额
isScanOrder: false, // 是否是扫码点餐
ramadhin: '', // 扫码点餐桌号
// 扫码类型,1-扫码点餐、先吃后付,2-茶饮点餐码
codeType: 1,
isAuthUserInfo: false, // 用户信息是否授权
typeCate: 0, // 餐饮购买方式:1-堂食 2-外卖,默认1
takeoutInfo: {}, // 餐饮外卖设置
......@@ -706,6 +708,7 @@ export default {
// 扫码点餐user_type传8
this.isScanOrder = true
this.ramadhin = decodeURIComponent(this._scanOrderParams.table_no)
this.codeType = Number(decodeURIComponent(this._scanOrderParams.code_type))
this.useType = 8
}
// 扫码点餐且加餐
......
This diff is collapsed.
......@@ -96,7 +96,7 @@
class="item"
:class="[item.id === firstCategoryActiveId ? 'active' : '']"
@click="selectFirstCategory"
v-for="(item, index) in firstCategoryList"
v-for="item in firstCategoryList"
:key="item.id"
:data-id="item.id"
:data-child="item._child"
......@@ -628,7 +628,7 @@
v-if="isShowScanOrderTips"
@close="closeScanTips"
@confirm="confirmScanTips"
:tableNo="tableNo"
:tableNo="codeType === 2 ? '扫码' : tableNo"
></scan-order-tips>
</view>
</template>
......@@ -699,6 +699,8 @@ export default {
tableNo: '', // 桌码
orderId: null, // 进行中的先吃后付订单ID
guestsType: 1, // 1-普通堂食 2-扫码点餐 3-扫码点餐(先吃后付)
// 扫码类型,1 - 扫码点餐、先吃后付,2 - 茶饮点餐码
codeType: 1,
}
},
onLoad(options) {
......@@ -792,6 +794,7 @@ export default {
} else if (options.table_no) {
// 从其他页面扫码点餐进来的
options.table_no = decodeURIComponent(options.table_no)
this.codeType = Number(decodeURIComponent(options.code_type))
if (options.add_meal) {
this.addMeal = true
delete options.add_meal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment