代客下单增加限制无tableid时不发送修改就餐人数请求

This commit is contained in:
YeMingfei666 2024-09-27 18:29:56 +08:00
parent 1acf00daab
commit b8e5751f30
1 changed files with 11 additions and 2 deletions

View File

@ -1721,6 +1721,9 @@ export default {
},
//
async changePerpole() {
if(!this.table.tableId){
return
}
const res = await $choseCount({
masterId: this.masterId,
tableId: this.table.tableId,
@ -1734,7 +1737,7 @@ export default {
const res = await this.getMasterId();
this.masterId = res.masterId;
//1
if (this.table.status == "idle" && !this.shopInfo.isTableFee) {
if (!this.perpole&&this.table.status == "idle" && !this.shopInfo.isTableFee) {
this.perpole = 1;
await this.changePerpole();
}
@ -1755,8 +1758,9 @@ export default {
const seatFee = await $choseCount({
masterId: this.masterId,
tableId: this.table.tableId,
num: this.perpole,
num: res.seatFee?res.seatFee.totalNumber: this.perpole,
});
console.log(seatFee);
this.order.seatFee = seatFee;
this.perpole = seatFee.totalNumber;
}
@ -2860,6 +2864,7 @@ export default {
},
async getGoods() {
const res = await getGoodsLists(this.goods.query);
let $goodsMap={}
const goods = res.records.filter((v) => {
if (!v) {
return false;
@ -2868,8 +2873,12 @@ export default {
if (v.typeEnum !== "sku") {
isShow = v.specList.length >= 1;
}
v.specList.map(spe=>{
$goodsMap[`${v.id}_${spe.id}`]=spe;
})
return isShow;
});
console.log($goodsMap)
this.goods.list = goods;
this.goods.total = res.total;
this.$goodsData = goods;