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

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

View File

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