parent
f83fc9da7e
commit
4fd8d61756
|
|
@ -97,7 +97,6 @@ export default {
|
|||
this.number = newval;
|
||||
},
|
||||
number(newval) {
|
||||
console.log(newval);
|
||||
this.$emit("input", newval);
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -53,13 +53,10 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
number(newval) {
|
||||
console.log(newval)
|
||||
console.log(this.max)
|
||||
if (newval >this.max) {
|
||||
this.number = this.max;
|
||||
this.$message("最多只能选择"+this.max+"位就餐人数");
|
||||
}
|
||||
console.log(newval);
|
||||
// 使用正则表达式匹配正整数
|
||||
const regex = /^[1-9]\d*$/;
|
||||
// 如果输入的值不是正整数,则将其设置为上一个有效值
|
||||
|
|
@ -76,14 +73,13 @@ export default {
|
|||
this.number = "";
|
||||
},
|
||||
confirm() {
|
||||
console.log(this.number)
|
||||
console.log(this.max)
|
||||
if (this.number >this.max) {
|
||||
return this.$message("最多只能选择"+this.max+"位就餐人数");
|
||||
}
|
||||
if (!this.number) {
|
||||
return this.$message("请选择就餐人数");
|
||||
}
|
||||
console.log(this.number)
|
||||
this.$emit("confirm", this.number);
|
||||
this.close();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2738,7 +2738,12 @@ export default {
|
|||
// if(this.key!=='isPayOrder'){
|
||||
// this.getCart();
|
||||
// }
|
||||
this.changePerpole()
|
||||
// this.changePerpole()
|
||||
await $choseCount({
|
||||
masterId: this.masterId,
|
||||
tableId: this.table.tableId,
|
||||
num: this.perpole,
|
||||
})
|
||||
this.getCart();
|
||||
this.getGoods();
|
||||
this.getCategory();
|
||||
|
|
|
|||
Loading…
Reference in New Issue