refactor(xumu): 优化理赔申请列表展示逻辑

- 根据 remarks 字段判断是否可申请理赔,而非拼接 status 和 auditStatus
- 简化 permit 字段的使用,直接用于判断是否显示理赔按钮
This commit is contained in:
aixianling
2025-01-16 10:49:13 +08:00
parent 94b1788e8c
commit 4051b31101

View File

@@ -48,7 +48,7 @@ export default {
getTableData() {
this.instance.post("/api/insurance/claim/apply/page", {...this.page, ...this.search}).then(res => {
if (res?.data) {
this.tableData = res.data?.records.map(e => ({...e, permit: `${e.status}` + e.auditStatus}))
this.tableData = res.data?.records.map(e => ({...e, permit: e.remarks == "可申请理赔"}))
this.page.total = res.data.total
}
})
@@ -84,7 +84,7 @@ export default {
<el-table-column slot="options" label="操作" fixed="right" align="center">
<template slot-scope="{row}">
<div class="table-options">
<template v-if="['12'].includes(row.permit)">
<template v-if="row.permit">
<el-button type="text" @click="dialog=true,$set(form,'id',row.orderNo)">理赔</el-button>
</template>
<el-button v-else type="text" @click="$router.push({hash:'#add',query:{id:row.orderNo}})">查看</el-button>