代客下单增加限制无tableid时不发送修改就餐人数请求
This commit is contained in:
parent
1acf00daab
commit
b8e5751f30
|
|
@ -1721,6 +1721,9 @@ export default {
|
||||||
},
|
},
|
||||||
//更改就餐人数
|
//更改就餐人数
|
||||||
async changePerpole() {
|
async changePerpole() {
|
||||||
|
if(!this.table.tableId){
|
||||||
|
return
|
||||||
|
}
|
||||||
const res = await $choseCount({
|
const res = await $choseCount({
|
||||||
masterId: this.masterId,
|
masterId: this.masterId,
|
||||||
tableId: this.table.tableId,
|
tableId: this.table.tableId,
|
||||||
|
|
@ -1734,7 +1737,7 @@ export default {
|
||||||
const res = await this.getMasterId();
|
const res = await this.getMasterId();
|
||||||
this.masterId = res.masterId;
|
this.masterId = res.masterId;
|
||||||
//空闲并且免餐位费设置默认就餐人数1
|
//空闲并且免餐位费设置默认就餐人数1
|
||||||
if (this.table.status == "idle" && !this.shopInfo.isTableFee) {
|
if (!this.perpole&&this.table.status == "idle" && !this.shopInfo.isTableFee) {
|
||||||
this.perpole = 1;
|
this.perpole = 1;
|
||||||
await this.changePerpole();
|
await this.changePerpole();
|
||||||
}
|
}
|
||||||
|
|
@ -1755,8 +1758,9 @@ export default {
|
||||||
const seatFee = await $choseCount({
|
const seatFee = await $choseCount({
|
||||||
masterId: this.masterId,
|
masterId: this.masterId,
|
||||||
tableId: this.table.tableId,
|
tableId: this.table.tableId,
|
||||||
num: this.perpole,
|
num: res.seatFee?res.seatFee.totalNumber: this.perpole,
|
||||||
});
|
});
|
||||||
|
console.log(seatFee);
|
||||||
this.order.seatFee = seatFee;
|
this.order.seatFee = seatFee;
|
||||||
this.perpole = seatFee.totalNumber;
|
this.perpole = seatFee.totalNumber;
|
||||||
}
|
}
|
||||||
|
|
@ -2860,6 +2864,7 @@ export default {
|
||||||
},
|
},
|
||||||
async getGoods() {
|
async getGoods() {
|
||||||
const res = await getGoodsLists(this.goods.query);
|
const res = await getGoodsLists(this.goods.query);
|
||||||
|
let $goodsMap={}
|
||||||
const goods = res.records.filter((v) => {
|
const goods = res.records.filter((v) => {
|
||||||
if (!v) {
|
if (!v) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -2868,8 +2873,12 @@ export default {
|
||||||
if (v.typeEnum !== "sku") {
|
if (v.typeEnum !== "sku") {
|
||||||
isShow = v.specList.length >= 1;
|
isShow = v.specList.length >= 1;
|
||||||
}
|
}
|
||||||
|
v.specList.map(spe=>{
|
||||||
|
$goodsMap[`${v.id}_${spe.id}`]=spe;
|
||||||
|
})
|
||||||
return isShow;
|
return isShow;
|
||||||
});
|
});
|
||||||
|
console.log($goodsMap)
|
||||||
this.goods.list = goods;
|
this.goods.list = goods;
|
||||||
this.goods.total = res.total;
|
this.goods.total = res.total;
|
||||||
this.$goodsData = goods;
|
this.$goodsData = goods;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue