bug: 修复查询提示
All checks were successful
Release / lint (push) Successful in 28s
Release / Release (push) Successful in 1m19s

This commit is contained in:
my_ong 2024-12-18 16:57:14 +08:00
parent 8e35143058
commit cdf349aabb
2 changed files with 15 additions and 11 deletions

View File

@ -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>

View File

@ -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