|
@@ -468,11 +468,12 @@ const handleScanInput = (event: KeyboardEvent) => {
|
|
|
|
|
|
console.log("event.key", event.key)
|
|
console.log("event.key", event.key)
|
|
if (event.key === 'Enter') {
|
|
if (event.key === 'Enter') {
|
|
- document.removeEventListener('keydown', handleScanInput)
|
|
|
|
if (!data.canScan) {
|
|
if (!data.canScan) {
|
|
feedback.notifyWarning('正在处理支付,请勿重复扫码')
|
|
feedback.notifyWarning('正在处理支付,请勿重复扫码')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ data.canScan = false
|
|
|
|
+ document.removeEventListener('keydown', handleScanInput)
|
|
const code = scanCode.value
|
|
const code = scanCode.value
|
|
console.log('扫码内容:', code)
|
|
console.log('扫码内容:', code)
|
|
payingDialogVisible.value = true // 显示支付中对话框
|
|
payingDialogVisible.value = true // 显示支付中对话框
|
|
@@ -788,7 +789,7 @@ const clickSortButton = (name: any) => {
|
|
const toEmpty = () => {
|
|
const toEmpty = () => {
|
|
if (data.selectGoods.length != 0) {
|
|
if (data.selectGoods.length != 0) {
|
|
orderLoading.value = true
|
|
orderLoading.value = true
|
|
- toEmptyy({ id: params.number }).finally(() => {
|
|
|
|
|
|
+ toEmptyy({ id: params.number }).then(() => {
|
|
//清空未出单的餐品-保留出单餐品
|
|
//清空未出单的餐品-保留出单餐品
|
|
data.selectGoods = []
|
|
data.selectGoods = []
|
|
orderData.sumPriceSum = data.selectGoods.reduce(
|
|
orderData.sumPriceSum = data.selectGoods.reduce(
|
|
@@ -818,7 +819,8 @@ const toEmpty = () => {
|
|
orderData.sumPriceSum -
|
|
orderData.sumPriceSum -
|
|
(params.couponAmount === '-' ? 0 : Number(params.couponAmount))
|
|
(params.couponAmount === '-' ? 0 : Number(params.couponAmount))
|
|
).toFixed(2)
|
|
).toFixed(2)
|
|
- orderLoading.value = false
|
|
|
|
|
|
+ }).finally(()=>{
|
|
|
|
+ orderLoading.value = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|