feat(xumu): 添加远程耳标号查询功能

- 在 AppDeathManage 和 AppOutManage 组件中集成 AiEartagRemote 组件
- 实现耳标号远程查询和自动填充功能
-优化用户输入体验,提高数据准确性
This commit is contained in:
aixianling
2025-01-09 15:09:28 +08:00
parent ce64bfd54d
commit f0a32ad868
3 changed files with 90 additions and 39 deletions

View File

@@ -0,0 +1,40 @@
<script>
export default {
name: "AiEartagRemote",
props: {
instance: Function
},
data() {
return {
value: "",
info: {}
}
},
methods: {
getText(biochipEarNumber) {
this.info = {}
return this.instance.post("/api/breed/earTag/page", null, { params: { biochipEarNumber } }).then(res => {
if (res?.data) {
this.info = res.data
this.$emit('enter', this.info)
}
})
}
}
}
</script>
<template>
<section class="AiEartagRemote">
<ai-input v-model="value" placeholder="请输入耳标号按回车查询,或扫描耳标号" @keyup.enter.native="getText(value)" />
</section>
</template>
<style scoped lang="scss">
.AiEartagRemote {
gap: 8px;
width: 100%;
}
</style>