2 Commits

Author SHA1 Message Date
aixianling
356e6438e0 fix(xumu): 修复保险申请和治疗管理页面的数据加载问题- 在 AppInsuranceApply 组件中,将 detailList 的默认值改为 detailList || [],以确保数据正确加载
- 在 AppTreatmentManage 组件中,将 detailList 的
2025-01-09 15:48:02 +08:00
aixianling
5fe82a68ef fix(xumu): 修复耳标号查询功能
- 更新 API 请求参数,添加 pageSize 和 pageNum
- 修改数据处理逻辑,使用 records[0] 而不是直接使用 data
- 优化代码格式,删除多余的空格和换行
2025-01-09 15:41:39 +08:00
3 changed files with 6 additions and 6 deletions

View File

@@ -49,7 +49,7 @@ export default {
return id && this.instance.post("/api/insurance/apply/getInfo", null, {params: {id}}).then(res => {
if (res?.data) {
const detail = res.data
detail.detailList = detail.weightList || []
detail.detailList = detail.detailList || []
let {farmPicture: picture = "{}"} = detail
picture = JSON.parse(picture)
return this.detail = {...detail, ...picture}

View File

@@ -56,7 +56,7 @@ export default {
return id && this.instance.post("/api/breed/treatment/getInfo", null, {params: {biochipEarNumber: id}}).then(res => {
if (res?.data) {
const detail = res.data
detail.detailList = detail.immunityList || []
detail.detailList = detail.treatmentList || []
return this.detail = {...detail}
}
})

View File

@@ -14,9 +14,9 @@ export default {
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
return this.instance.post("/api/breed/earTag/page", null, {params: {biochipEarNumber, pageSize: 10, pageNum: 1}}).then(res => {
if (res?.data?.records) {
this.info = res.data.records[0]
this.$emit('enter', this.info)
}
})
@@ -27,7 +27,7 @@ export default {
<template>
<section class="AiEartagRemote">
<ai-input v-model="value" placeholder="请输入耳标号按回车查询,或扫描耳标号" @keyup.enter.native="getText(value)" />
<ai-input v-model="value" placeholder="请输入耳标号按回车查询,或扫描耳标号" @keyup.enter.native="getText(value)"/>
</section>
</template>