增加无台桌下单切换台桌

This commit is contained in:
2024-10-25 14:50:52 +08:00
parent c473f30a37
commit 709036c050
3 changed files with 97 additions and 33 deletions

View File

@@ -118,6 +118,7 @@ export default {
number: "0",
show: false,
timer: null,
payPar:{}
};
},
watch: {
@@ -136,18 +137,10 @@ export default {
this.$refs.refInputCode.focus();
});
} else {
this.getPayUrl()
this.tips = "请用户使用微信/支付宝扫描付款码";
this.startGetOrderInfo();
this.$nextTick(() => {
QRCode.toCanvas(
this.$refs.canvas,
this.paymentQrcode,{width: 160,
height: 160,},
function (error) {
console.log(error);
}
);
});
}
},
number(newval) {
@@ -193,14 +186,28 @@ export default {
this.close();
this.$emit("confirm", this.form.code);
},
getPayUrl(){
$getOrderPayUrl(this.payPar).then((res) => {
console.log(res);
this.paymentQrcode = res;
this.$nextTick(() => {
QRCode.toCanvas(
this.$refs.canvas,
this.paymentQrcode,{width: 160,
height: 160,},
function (error) {
console.log(error);
}
);
});
});
},
open(data) {
this.show = true;
this.form.money = Number(this.price).toFixed(2);
this.payPar=data
if (this.openSwitch) {
$getOrderPayUrl({ orderId: this.order.id||data.id,payAmount:this.form.money||data.settlementAmount }).then((res) => {
console.log(res);
this.paymentQrcode = res;
});
// this.getPayUrl();
}
this.$nextTick(() => {
this.$refs.refInputCode.focus();