feat(xumu): 添加远程耳标号查询功能
- 在 AppDeathManage 和 AppOutManage 组件中集成 AiEartagRemote 组件 - 实现耳标号远程查询和自动填充功能 -优化用户输入体验,提高数据准确性
This commit is contained in:
		
							
								
								
									
										40
									
								
								project/xumu/components/AiEartagRemote.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								project/xumu/components/AiEartagRemote.vue
									
									
									
									
									
										Normal 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> | ||||
		Reference in New Issue
	
	Block a user