代客下单修改
当台桌为空闲时第一次选择就餐人数,当设置人数请求结束时再请求购物车数据
This commit is contained in:
@@ -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);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user