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

View File

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