diff --git a/src/views/table/components/table-diancan.vue b/src/views/table/components/table-diancan.vue index 0a144d3..79b9feb 100644 --- a/src/views/table/components/table-diancan.vue +++ b/src/views/table/components/table-diancan.vue @@ -1669,6 +1669,7 @@ export default { vipUserId: userId != "null" ? userId : "", }); console.log(records); + this.order.list = []; this.order.masterId = masterId; this.order.list = records; this.prveOrder.show = false; @@ -1691,13 +1692,24 @@ export default { this.prveOrder.sel = sel - 1 <= 0 ? 0 : sel - 1; }, //打开挂起订单 - cacheOrderShow() { + async cacheOrderShow() { this.prveOrder.show = true; + const res=await this.getCacheOrder(true) + this.prveOrder.list = res; + if(this.prveOrder.list.length&&this.prveOrder.sel!==-1){ + const item=this.prveOrder.list[this.prveOrder.sel] + console.log(item) + if(item){ + this.prveOrder.selCart=item.carList + } + } }, //获取挂起订单 - async getCacheOrder() { + async getCacheOrder(isReturn=false) { + if(isReturn){ + return $getCacheOrder({ tableId: this.table.tableId }); + } const res = await $getCacheOrder({ tableId: this.table.tableId }); - console.log(res); this.prveOrder.list = res; }, //存单 @@ -1713,9 +1725,6 @@ export default { this.order.selIndex = -1; const masterIdRes = await this.getMasterId(); this.masterId = masterIdRes.masterId; - this.$nextTick(() => { - this.getCacheOrder(); - }); }, // 删除购物车商品 removeCart() { @@ -2634,6 +2643,7 @@ input[type="number"]::-webkit-outer-spin-button { margin-right: 6px; } .take_order_list { + padding: 14px 0; display: flex; justify-content: space-between; .tol_left_list { @@ -2817,6 +2827,9 @@ input[type="number"]::-webkit-outer-spin-button { margin: 0 10px 10px 0; cursor: pointer; } +.tag-group{ + +} ::v-deep .tag-group .el-tag { min-width: 80px;