1.手机扫码下单打印标签
2.PC桌面端下单打印标签 3.无需打开叫号窗口扫码叫号取餐
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
<template>
|
||||
<el-dialog :title="props.title" width="600" v-model="dialogVisible" @open="opne">
|
||||
<!-- <el-input v-model="number" :placeholder="props.placeholder" readonly></el-input> -->
|
||||
<el-input ref="inputRef" v-model="number" :placeholder="props.placeholder" :readonly="loading" clearable
|
||||
@change="inputChange"></el-input>
|
||||
<div class="tips">注意:扫码请确保输入口获得焦点</div>
|
||||
<!-- <el-input ref="inputRef" v-model="number" :placeholder="props.placeholder" :readonly="loading" clearable
|
||||
@change="inputChange"></el-input> -->
|
||||
<div class="tips">注意:请扫描标签二维码</div>
|
||||
<!-- <div class="keybord_wrap">
|
||||
<div v-for="item in 9" :key="item">
|
||||
<el-button plain type="info" style="width: 100%;" @click="inputHandle(item)">{{ item }}</el-button>
|
||||
@@ -46,9 +46,9 @@
|
||||
<el-pagination v-model:current-page="tableData.page" v-model:page-size="tableData.pageSize" background
|
||||
layout="total, prev, pager, next" :total="tableData.total" @current-change="handleCurrentChange" />
|
||||
</div>
|
||||
<div class="footer">
|
||||
<!-- <div class="footer">
|
||||
<el-button type="primary" style="width: 100%;" :loading="loading" @click="confirmHandle">确认</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -59,12 +59,14 @@ import { ElMessage } from 'element-plus'
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { useUser } from "@/store/user.js";
|
||||
import { scanSendMessage, getsendMessage } from '@/api/order/index'
|
||||
import { useGlobal } from '@/store/global.js'
|
||||
const global = useGlobal()
|
||||
const store = useUser();
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: '叫号取餐'
|
||||
default: '叫号取餐记录'
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
@@ -96,13 +98,14 @@ function filterCode(t, c = '#') {
|
||||
function show() {
|
||||
dialogVisible.value = true
|
||||
getsendMessageAjax()
|
||||
setTimeout(() => {
|
||||
inputRef.value.focus();
|
||||
}, 500);
|
||||
// setTimeout(() => {
|
||||
// inputRef.value.focus();
|
||||
// }, 500);
|
||||
}
|
||||
|
||||
function opne() {
|
||||
number.value = ''
|
||||
global.updateData(true)
|
||||
}
|
||||
|
||||
// 输入
|
||||
@@ -177,7 +180,8 @@ const confirmHandle = _.throttle(async function () {
|
||||
}, 800, { leading: true, trailing: false })
|
||||
|
||||
defineExpose({
|
||||
show
|
||||
show,
|
||||
getsendMessageAjax
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -120,6 +120,10 @@ async function confirmOrder() {
|
||||
if (payLoading.value) return
|
||||
try {
|
||||
if (payList.value[payActive.value].payType == "scanCode") {
|
||||
if (money.value <= 0) {
|
||||
ElMessage.error("请输入大于0的金额");
|
||||
return;
|
||||
}
|
||||
scanModalRef.value.show();
|
||||
} else {
|
||||
if (money.value <= 0) {
|
||||
|
||||
@@ -73,9 +73,18 @@ const menus = ref([
|
||||
}
|
||||
])
|
||||
|
||||
// 更新叫号记录
|
||||
function updateCallNumber() {
|
||||
callNumberRef.value.getsendMessageAjax()
|
||||
}
|
||||
|
||||
function openCall() {
|
||||
callNumberRef.value.show()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
updateCallNumber
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -56,7 +56,9 @@ import { ref } from "vue";
|
||||
import icon from "@/assets/icon_scan.png";
|
||||
import { scanpay, queryOrder, quickPay, queryQuickPayStatus, accountPay, queryScanPay } from "@/api/pay";
|
||||
import { useUser } from "@/store/user.js";
|
||||
import { useGlobal } from '@/store/global.js'
|
||||
const store = useUser();
|
||||
const global = useGlobal()
|
||||
import {
|
||||
queryMembermember,
|
||||
createMembermember,
|
||||
@@ -167,6 +169,8 @@ function autoCheckOrder() {
|
||||
function clearAutoCheckOrder() {
|
||||
clearInterval(timer.value)
|
||||
timer.value = null
|
||||
// 开启叫号功能
|
||||
global.updateData(true)
|
||||
}
|
||||
|
||||
// 查询用户支付状态
|
||||
@@ -296,6 +300,8 @@ function close() {
|
||||
function reset() {
|
||||
loading.value = false;
|
||||
scanCode.value = "";
|
||||
// 关闭叫号功能
|
||||
global.updateData(false)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
||||
Reference in New Issue
Block a user