fix(xumu): 修复理赔申请页面的耳标选择和数据加载问题
- 优化耳标选择功能,将选中的耳标数据格式化后赋值给 detail.detailList - 初始化 detail 对象时添加 list 属性,确保数据结构一致性 - 优化数据加载逻辑,处理可能的空值情况 - 调整页面布局和样式,提高可读性
This commit is contained in:
@@ -19,7 +19,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detail: {detailList: []},
|
||||
detail: { detailList: [], list: [] },
|
||||
records
|
||||
}
|
||||
},
|
||||
@@ -55,6 +55,7 @@ export default {
|
||||
return id && this.instance.post("/api/insurance/claim/apply/getInfo", null, { params: { orderNo: id } }).then(res => {
|
||||
if (res?.data) {
|
||||
const detail = res.data
|
||||
detail.detailList = detail.detailList || []
|
||||
return this.detail = { ...detail }
|
||||
}
|
||||
})
|
||||
@@ -103,12 +104,13 @@ export default {
|
||||
</ai-card>
|
||||
<ai-card title="投保对象">
|
||||
<template #right v-if="isClaim">
|
||||
<ai-eartag-picker @select="v=>detail.detailList=v" :instance="instance"
|
||||
<ai-eartag-picker @select="v => detail.detailList = v.map(e=>({biochipEarNumber:e}))" :instance="instance"
|
||||
:action="`/api/insurance/claim/apply/getClaimEarNumberList?orderNo=${detail.orderNo}`">
|
||||
<el-button type="text">选择</el-button>
|
||||
</ai-eartag-picker>
|
||||
</template>
|
||||
<ai-highlight class="mar-b8 font-14" :content="`投保标的共${detail.insureNumber||0}只,已理赔标的共 @v 只`" color="red" :value="selectedEartags"/>
|
||||
<ai-highlight class="mar-b8 font-14" :content="`投保标的共${detail.insureNumber || 0}只,已理赔标的共 @v 只`" color="red"
|
||||
:value="selectedEartags" />
|
||||
<ai-table :tableData="detail.detailList" :colConfigs="columns" :isShowPagination="!1" hideOptions />
|
||||
</ai-card>
|
||||
<ai-card title="理赔材料" v-if="isClaim">
|
||||
|
||||
Reference in New Issue
Block a user