|
@@ -282,13 +282,13 @@
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
- <el-button type="primary" @click="showCouponDialog = false">确认</el-button>
|
|
|
+ <el-button type="primary" @click="ticketConfirm">确认</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
|
v-model="scanDialogVisible"
|
|
|
- title="请使用扫码枪扫码支付"
|
|
|
+ title="请引导顾客扫码支付"
|
|
|
width="300px"
|
|
|
center
|
|
|
:show-close="false"
|
|
@@ -302,6 +302,7 @@
|
|
|
class="mx-auto mb-4"
|
|
|
style="width: 150px"
|
|
|
/>
|
|
|
+ <b style="font-size: 20px;">{{ orderData.payAmount }} 元</b>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
@@ -559,6 +560,17 @@ const queryPayStatusWithRetry = (data): Promise<boolean> => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const ticketConfirm = () => {
|
|
|
+ if (data.phone == '') {
|
|
|
+ params.couponId = null
|
|
|
+ params.couponAmount = '-'
|
|
|
+ params.userId = null
|
|
|
+ // 计算支付金额
|
|
|
+ orderData.payAmount = Number(orderData.sumPriceSum).toFixed(2)
|
|
|
+ }
|
|
|
+ showCouponDialog.value = false
|
|
|
+}
|
|
|
+
|
|
|
const checkout = () => {
|
|
|
refreshdishes()
|
|
|
//结账
|
|
@@ -567,12 +579,12 @@ const checkout = () => {
|
|
|
// feedback.notify('请点击商品开始点单吧!')
|
|
|
// return false
|
|
|
// }
|
|
|
- feedback.confirm('结账金额为' + orderData.payAmount + ',确定要结账吗?').then(() => {
|
|
|
- data.canScan = true
|
|
|
- scanDialogVisible.value = true
|
|
|
- // 添加键盘事件监听
|
|
|
- document.addEventListener('keydown', handleScanInput)
|
|
|
- })
|
|
|
+ // feedback.confirm('结账金额为' + orderData.payAmount + ',确定要结账吗?').then(() => {
|
|
|
+ data.canScan = true
|
|
|
+ scanDialogVisible.value = true
|
|
|
+ // 添加键盘事件监听
|
|
|
+ document.addEventListener('keydown', handleScanInput)
|
|
|
+ // })
|
|
|
}
|
|
|
// 添加优惠券点击处理方法
|
|
|
const handleCouponClick = (coupon: any) => {
|