优化打印标签逻辑

This commit is contained in:
gyq
2024-06-22 09:15:27 +08:00
parent 0b2b4b44d0
commit 44495c3ee7
9 changed files with 136 additions and 62 deletions

View File

@@ -2,7 +2,7 @@
<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" clearable
<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">
@@ -119,7 +119,7 @@ function delHandle() {
const inputChange = _.debounce(function (e) {
// console.log(e);
confirmHandle();
}, 500);
}, 100);
// 页码改变
function handleCurrentChange() {
@@ -151,6 +151,7 @@ const confirmHandle = _.throttle(async function () {
try {
if (!number.value) return
loading.value = true
const res = await scanSendMessage({
outNumber: number.value,
shopId: store.userInfo.shopId,
@@ -167,6 +168,7 @@ const confirmHandle = _.throttle(async function () {
} catch (error) {
getsendMessageAjax()
loading.value = false
number.value = ''
console.log(error);
setTimeout(() => {
inputRef.value.focus();