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