From b8e5751f3001626237ce1a463b2cb4585f437674 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 27 Sep 2024 18:29:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=99=90=E5=88=B6=E6=97=A0tableid=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E5=8F=91=E9=80=81=E4=BF=AE=E6=94=B9=E5=B0=B1=E9=A4=90=E4=BA=BA?= =?UTF-8?q?=E6=95=B0=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/Instead/index.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index a33a1f6..6a8e2bd 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -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;