代客下单修改

当台桌为空闲时第一次选择就餐人数,当设置人数请求结束时再请求购物车数据
This commit is contained in:
YeMingfei666 2024-09-14 14:55:12 +08:00
parent f83fc9da7e
commit 4fd8d61756
3 changed files with 7 additions and 7 deletions

View File

@ -97,7 +97,6 @@ export default {
this.number = newval; this.number = newval;
}, },
number(newval) { number(newval) {
console.log(newval);
this.$emit("input", newval); this.$emit("input", newval);
}, },
}, },

View File

@ -53,13 +53,10 @@ export default {
}, },
watch: { watch: {
number(newval) { number(newval) {
console.log(newval)
console.log(this.max)
if (newval >this.max) { if (newval >this.max) {
this.number = this.max; this.number = this.max;
this.$message("最多只能选择"+this.max+"位就餐人数"); this.$message("最多只能选择"+this.max+"位就餐人数");
} }
console.log(newval);
// 使 // 使
const regex = /^[1-9]\d*$/; const regex = /^[1-9]\d*$/;
// //
@ -76,14 +73,13 @@ export default {
this.number = ""; this.number = "";
}, },
confirm() { confirm() {
console.log(this.number)
console.log(this.max)
if (this.number >this.max) { if (this.number >this.max) {
return this.$message("最多只能选择"+this.max+"位就餐人数"); return this.$message("最多只能选择"+this.max+"位就餐人数");
} }
if (!this.number) { if (!this.number) {
return this.$message("请选择就餐人数"); return this.$message("请选择就餐人数");
} }
console.log(this.number)
this.$emit("confirm", this.number); this.$emit("confirm", this.number);
this.close(); this.close();
}, },

View File

@ -2738,7 +2738,12 @@ export default {
// if(this.key!=='isPayOrder'){ // if(this.key!=='isPayOrder'){
// this.getCart(); // this.getCart();
// } // }
this.changePerpole() // this.changePerpole()
await $choseCount({
masterId: this.masterId,
tableId: this.table.tableId,
num: this.perpole,
})
this.getCart(); this.getCart();
this.getGoods(); this.getGoods();
this.getCategory(); this.getCategory();