修复台桌列表页面餐位费与代客下单不一致问题

This commit is contained in:
YeMingfei666 2024-09-14 13:37:24 +08:00
parent 7dbaf46d52
commit f83fc9da7e
2 changed files with 35 additions and 14 deletions

View File

@ -32,7 +32,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="台桌标识">
<el-form-item label="台桌标识" >
<div class="u-flex">
<div class="u-flex" style="width: 57px;">
<el-input
@ -140,6 +140,7 @@ export default {
form: {
id: "",
areaId: "",
sign:'',
start:1,
end:10,
capacity: 0,
@ -157,6 +158,13 @@ export default {
trigger: "blur",
},
],
sign: [
{
required: true,
message: "请输入台桌标识",
trigger: "blur",
},
],
},
areaList: [],
};

View File

@ -1374,15 +1374,15 @@ export default {
},
},
watch: {
perpole(newval) {
if (newval&&this.table.tableId) {
$choseCount({
masterId: this.masterId,
tableId: this.table.tableId,
num: newval,
}).then(res=>{
this.order.seatFee=res
})
perpole(newval,oldval) {
if (!oldval&&newval&&this.table.tableId) {
// $choseCount({
// masterId: this.masterId,
// tableId: this.table.tableId,
// num: newval,
// }).then(res=>{
// this.order.seatFee=res
// })
}
},
table(oldval, newval) {
@ -1535,6 +1535,16 @@ export default {
// this.refToggle("refDiscount", true);
},
methods: {
//
changePerpole(){
$choseCount({
masterId: this.masterId,
tableId: this.table.tableId,
num: this.perpole,
}).then(res=>{
this.order.seatFee=res
})
},
//
async onTableChange() {
const res = await this.getMasterId();
@ -1597,6 +1607,8 @@ export default {
},
chooseDinersNumberConfirm(e) {
this.perpole = e;
this.changePerpole()
},
//
scanPayConfirm(code) {
@ -2726,6 +2738,7 @@ export default {
// if(this.key!=='isPayOrder'){
// this.getCart();
// }
this.changePerpole()
this.getCart();
this.getGoods();
this.getCategory();