bug: 修复查询提示
This commit is contained in:
parent
8e35143058
commit
cdf349aabb
@ -6,7 +6,7 @@
|
||||
<a-col :span="18">
|
||||
<a-input-search
|
||||
v-model:value="searchKey"
|
||||
:placeholder="`请输入物料名称`"
|
||||
:placeholder="`名称/编码/类型`"
|
||||
allow-clear
|
||||
enter-button
|
||||
@search="loadData()"
|
||||
@ -120,16 +120,15 @@
|
||||
|
||||
//表格列
|
||||
const columns = [
|
||||
{
|
||||
title: '物料序号',
|
||||
dataIndex: 'id',
|
||||
// className: 'notshow',
|
||||
},
|
||||
{
|
||||
title: '物料编码',
|
||||
dataIndex: 'code',
|
||||
},
|
||||
|
||||
{
|
||||
title: '物料ID',
|
||||
dataIndex: 'id',
|
||||
},
|
||||
|
||||
{
|
||||
title: '物料名称',
|
||||
dataIndex: 'name',
|
||||
@ -239,3 +238,9 @@
|
||||
materialIdRef.value = applyId
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.notshow {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
@ -24,11 +24,11 @@
|
||||
// 接收父组件传递的条形码数量
|
||||
materialId: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
default: 0,
|
||||
},
|
||||
})
|
||||
|
||||
const inputRef = ref(1)
|
||||
const inputRef = ref(0)
|
||||
|
||||
watch(inputRef, (newVal) => {
|
||||
fetchAndPrintBarcodes(newVal)
|
||||
@ -68,7 +68,7 @@
|
||||
`,
|
||||
onLoadingStart: () => console.log('开始加载'),
|
||||
onLoadingEnd: () => console.log('加载完成'),
|
||||
// onError: (err: Error) => console.error('打印出错:', err),
|
||||
onError: (err: unknown) => console.error('打印出错:', err),
|
||||
}
|
||||
|
||||
// 显示条形码容器以便打印
|
||||
@ -77,7 +77,6 @@
|
||||
// 调用 printJS 进行打印
|
||||
printJS(printOptions)
|
||||
}
|
||||
|
||||
// 定义一个函数来从后端获取条形码字符串并打印
|
||||
const fetchAndPrintBarcodes = (count: number) => {
|
||||
if (count <= 0) return
|
||||
|
Loading…
x
Reference in New Issue
Block a user