并桌转桌
This commit is contained in:
@@ -435,7 +435,7 @@
|
||||
{{ returnWaingAllText }}
|
||||
</div>
|
||||
<div class="btn no-wrap u-font-12" @click="clicktransfertoPinpin()"
|
||||
v-if="table.name && useTypes.sel == 'dine-in'">
|
||||
v-if="table.name && useTypes.sel == 'dine-in' && payAfter">
|
||||
转桌/并桌
|
||||
</div>
|
||||
<!-- -->
|
||||
@@ -1027,7 +1027,7 @@
|
||||
<!-- 可选套餐 -->
|
||||
<dialogpackage ref="refdialogpackage" @dialogpackageconfirm="dialogpackageconfirm"></dialogpackage>
|
||||
<!-- 并桌/转桌 -->
|
||||
<transfertoPinpin ref="refransfertoPinpin" @transfertoPinpin="xiadanClick"></transfertoPinpin>
|
||||
<transfertoPinpin ref="refransfertoPinpin" @transfertoPinpin="reset"></transfertoPinpin>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -2891,16 +2891,25 @@ export default {
|
||||
// });
|
||||
// },
|
||||
clicktransfertoPinpin() {
|
||||
if (this.order.list.length < 0) {
|
||||
// 使用 reduce 方法统计指定值出现的次数
|
||||
const count = this.tableList.reduce((acc, cur) => {
|
||||
if (cur.status == 'using') {
|
||||
return acc + 1;
|
||||
}
|
||||
return acc;
|
||||
}, 0);
|
||||
console.log(count)
|
||||
if (count >= 2) {
|
||||
// console.log(this.order, this.masterId, this.table.tableId, this.tableList)
|
||||
// 订单信息,取餐码,用餐类型,桌台号id,台桌列表
|
||||
this.$refs.refransfertoPinpin.open(this.order, this.masterId, this.table.tableId, this.tableList);
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请先选择商品!',
|
||||
message: '暂无可转台桌!',
|
||||
type: 'warning'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
console.log(this.order, this.masterId, this.table.tableId, this.tableList)
|
||||
// 订单信息,取餐码,用餐类型,台桌列表,桌台号id
|
||||
this.$refs.refransfertoPinpin.open(this.order, this.masterId, this.table.tableId, this.tableList);
|
||||
},
|
||||
//右侧控制按钮点击事件
|
||||
async orderBtnsClick(key) {
|
||||
@@ -3491,6 +3500,7 @@ export default {
|
||||
this.order.orderId = "";
|
||||
this.perpole = "";
|
||||
this.useTypes.sel = "dine-in";
|
||||
this.getTable()
|
||||
},
|
||||
//设置购物车数据
|
||||
setCart(res) {
|
||||
|
||||
Reference in New Issue
Block a user