- 在 AppClaimApply 和 AppClaimAudit 组件中添加 productType 字典加载 - 在 add.vue 组件中使用 productType 字典获取保险产品类型标签
161 lines
5.9 KiB
Vue
161 lines
5.9 KiB
Vue
<script>
|
|
import {mapState} from "vuex"
|
|
import AiEartagPicker from "@project/xumu/components/AiEartagPicker.vue";
|
|
import AiSelect from "dui/packages/basic/AiSelect.vue";
|
|
|
|
const records = [
|
|
{label: "序号", type: "index"},
|
|
{label: "报案号", prop: "reportNo"},
|
|
{label: "审批状态", prop: "auditStatus", dict: "auditStatus"},
|
|
{label: "审批时间", prop: "auditTime"},
|
|
{label: "审批人", prop: "auditName"},
|
|
]
|
|
export default {
|
|
name: "claimAdd",
|
|
components: {AiSelect, AiEartagPicker},
|
|
props: {
|
|
instance: Function,
|
|
permissions: Function,
|
|
dict: Object
|
|
},
|
|
data() {
|
|
return {
|
|
detail: {detailList: []},
|
|
records
|
|
}
|
|
},
|
|
computed: {
|
|
...mapState(["user"]),
|
|
userinfo: v => v.user.info || {},
|
|
pageTitle: v => {
|
|
const appName = v.$parent.menuName || v.$parent.$options.label
|
|
return v.isAudit ? `${appName}审批` : `${appName}详情`
|
|
},
|
|
isAudit: v => v.$route.hash == "#audit",
|
|
formImages: v => [
|
|
{label: "勘察报告书", prop: "surveyPicture"},
|
|
{label: "无害化回执单", prop: "receiptPicture"},
|
|
],
|
|
columns: v => [
|
|
{label: "序号", type: "index"},
|
|
{label: "生物芯片耳标号", prop: "biochipEarNumber"},
|
|
{label: "身长测量照片", prop: "heightPicture", upload: {instance: v.instance, readonly: !0, valueIsUrl: !0, limit: 1}},
|
|
{label: "电子耳标照片", prop: "earNumberPicture", upload: {instance: v.instance, readonly: !0, valueIsUrl: !0, limit: 1}},
|
|
{label: "防疫耳标照片", prop: "preventionPicture", upload: {instance: v.instance, readonly: !0, valueIsUrl: !0, limit: 1}},
|
|
{label: "无害化处理照片", prop: "harmlessPicture", upload: {instance: v.instance, readonly: !0, valueIsUrl: !0, limit: 1}},
|
|
].filter(e => !e.hide),
|
|
},
|
|
methods: {
|
|
back(params = {}) {
|
|
this.$router.push(params)
|
|
},
|
|
getDetail() {
|
|
const {id} = this.$route.query
|
|
return id && this.instance.post("/api/insurance/claim/apply/getAuditInfo", null, {params: {id}}).then(res => {
|
|
if (res?.data) {
|
|
const detail = res.data
|
|
return this.detail = {...detail}
|
|
}
|
|
})
|
|
},
|
|
submit() {
|
|
this.$refs.detail.validate().then(() => {
|
|
this.instance.post("/api/insurance/claim/apply/audit", {...this.detail}).then(res => {
|
|
if (res?.code == '0') {
|
|
this.$message.success("提交成功!")
|
|
this.back()
|
|
}
|
|
})
|
|
})
|
|
}
|
|
},
|
|
created() {
|
|
this.getDetail()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<ai-page :title="pageTitle" class="claimAdd" showBack content-string="blank">
|
|
<el-form size="small" label-width="120px" :model="detail" ref="detail">
|
|
<ai-card title="基础信息">
|
|
<div class="grid">
|
|
<el-form-item label="养殖场" prop="farmId">
|
|
<b v-text="detail.farmName"/>
|
|
</el-form-item>
|
|
<el-form-item label="承保公司" prop="companyId">
|
|
<b v-text="detail.companyName"/>
|
|
</el-form-item>
|
|
<el-form-item label="投保类型">
|
|
<ai-input :value="dict.getLabel('insureType',detail.insureType)" :edit="!1"/>
|
|
</el-form-item>
|
|
<el-form-item label="保险产品" prop="productType">
|
|
<b v-text="dict.getLabel('productType',detail.productType)"/>
|
|
</el-form-item>
|
|
<el-form-item label="联系人">
|
|
<ai-input v-model="detail.contacts" :edit="!1"/>
|
|
</el-form-item>
|
|
<el-form-item label="联系电话">
|
|
<ai-input v-model="detail.phone" :edit="!1"/>
|
|
</el-form-item>
|
|
</div>
|
|
</ai-card>
|
|
<ai-card title="投保对象">
|
|
<ai-table :tableData="detail.detailList" :colConfigs="columns" :isShowPagination="!1" hideOptions/>
|
|
</ai-card>
|
|
<ai-card title="理赔材料">
|
|
<el-form-item v-for="(img,i) in formImages" :key="i" v-bind="img">
|
|
<ai-uploader v-model="detail[img.prop]" value-is-url readonly/>
|
|
</el-form-item>
|
|
</ai-card>
|
|
<ai-card title="审核信息">
|
|
<div class="grid">
|
|
<template v-if="isAudit">
|
|
<el-form-item label="审批状态" prop="auditStatus" :rules="{required:true,message:'请选择审批状态'}">
|
|
<ai-select v-model="detail.auditStatus" dict="auditStatus"/>
|
|
</el-form-item>
|
|
<el-form-item label="理赔资料" class="sc-3">
|
|
<ai-uploader v-model="detail.picture" value-is-url :instance="instance" :limit="1"/>
|
|
</el-form-item>
|
|
<el-form-item label="报案号" prop="reportNo" :rules="{required:true,message:'请输入 报案号'}">
|
|
<ai-input v-model="detail.reportNo"/>
|
|
</el-form-item>
|
|
<el-form-item label="说明">
|
|
<ai-input type="textarea" :rows="3" v-model="detail.remarks"/>
|
|
</el-form-item>
|
|
</template>
|
|
<template v-else>
|
|
<el-form-item label="审核状态">{{ dict.getLabel('auditStatus', detail.auditStatus) }}</el-form-item>
|
|
<el-form-item label="理赔资料" class="sc-3">
|
|
<el-image :src="detail.picture" :preview-src-list="[detail.picture]"/>
|
|
</el-form-item>
|
|
<el-form-item label="审核时间">{{ detail.auditTime }}</el-form-item>
|
|
<el-form-item label="审核人">{{ detail.auditName }}</el-form-item>
|
|
<el-form-item label="说明">{{ detail.remarks }}</el-form-item>
|
|
</template>
|
|
</div>
|
|
</ai-card>
|
|
</el-form>
|
|
<div slot="footer">
|
|
<template v-if="isAudit">
|
|
<el-button type="primary" @click="submit">提交</el-button>
|
|
</template>
|
|
<el-button @click="back">返回</el-button>
|
|
</div>
|
|
</ai-page>
|
|
</template>
|
|
|
|
<style scoped lang="scss">
|
|
.claimAdd {
|
|
:deep(.el-form--label-top) {
|
|
.el-form-item__label {
|
|
width: 100% !important;
|
|
}
|
|
|
|
.el-form-item__content {
|
|
margin-left: unset !important;
|
|
}
|
|
}
|
|
}
|
|
</style>
|