feat(xumu): 新增理赔申请和贷款申请功能
- 添加理赔申请和贷款申请的路由、页面组件和相关逻辑 - 实现理赔申请和贷款申请的数据获取、表单提交和审核流程 - 优化耳标选择器组件,支持在不同场景下的使用 - 调整图片上传组件,增加只读模式和预览功能
This commit is contained in:
35
project/xumu/AppClaimApply/AppClaimApply.vue
Normal file
35
project/xumu/AppClaimApply/AppClaimApply.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<script>
|
||||
import add from "./add.vue";
|
||||
import list from "./list.vue";
|
||||
|
||||
export default {
|
||||
name: "AppClaimApply",
|
||||
label: "理赔申请",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
currentPage() {
|
||||
let {hash} = this.$route
|
||||
return ["#claim", "#add"].includes(hash) ? add : list
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety")
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="AppClaimApply">
|
||||
<component :is="currentPage" v-bind="$props"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AppClaimApply {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
145
project/xumu/AppClaimApply/add.vue
Normal file
145
project/xumu/AppClaimApply/add.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<script>
|
||||
import {mapState} from "vuex"
|
||||
import AiEartagPicker from "@project/xumu/components/AiEartagPicker.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: {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.isClaim ? `新增${appName}` : `${appName}详情`
|
||||
},
|
||||
isClaim: v => v.$route.hash == "#claim",
|
||||
formImages: v => [
|
||||
{label: "勘察报告书", prop: "surveyPicture", rules: {required: v.isClaim, message: '请上传 勘察报告书'}},
|
||||
{label: "无害化回执单", prop: "receiptPicture", rules: {required: v.isClaim, message: '请上传 无害化回执单'}},
|
||||
],
|
||||
columns: v => [
|
||||
{label: "序号", type: "index"},
|
||||
{label: "生物芯片耳标号", prop: "biochipEarNumber"},
|
||||
{label: "身长测量照片", prop: "heightPicture", upload: {instance: v.instance, readonly: !v.isClaim, valueIsUrl: !0, limit: 1}},
|
||||
{label: "电子耳标照片", prop: "earNumberPicture", upload: {instance: v.instance, readonly: !v.isClaim, valueIsUrl: !0, limit: 1}},
|
||||
{label: "防疫耳标照片", prop: "preventionPicture", upload: {instance: v.instance, readonly: !v.isClaim, valueIsUrl: !0, limit: 1}},
|
||||
{label: "无害化处理照片", prop: "harmlessPicture", upload: {instance: v.instance, readonly: !v.isClaim, valueIsUrl: !0, limit: 1}},
|
||||
{label: "报案号", prop: "reportNo", hide: v.isClaim},
|
||||
].filter(e => !e.hide),
|
||||
selectedEartags: v => v.detail.list?.length || 0,
|
||||
},
|
||||
methods: {
|
||||
back(params = {}) {
|
||||
this.$router.push(params)
|
||||
},
|
||||
getDetail() {
|
||||
const {id} = this.$route.query
|
||||
return id && this.instance.post("/api/insurance/claim/apply/getInfo", null, {params: {orderNo: 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/add", {...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="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="投保对象">
|
||||
<template #right v-if="isClaim">
|
||||
<ai-eartag-picker @select="v=>detail.detailList=v" :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}只,已理赔标的共 @v 只`" color="red" :value="selectedEartags"/>
|
||||
<ai-table :tableData="detail.detailList" :colConfigs="columns" :isShowPagination="!1" hideOptions/>
|
||||
</ai-card>
|
||||
<ai-card title="理赔材料" v-if="isClaim">
|
||||
<div class="font-12 mar-b8">只能上传JPG/PNG文件,且不超过2M,一次最多5张</div>
|
||||
<el-form-item v-for="(img,i) in formImages" :key="i" v-bind="img">
|
||||
<ai-uploader v-model="detail[img.prop]" :instance="instance" value-is-url :limit="5"/>
|
||||
</el-form-item>
|
||||
</ai-card>
|
||||
<ai-card title="理赔记录" v-else>
|
||||
<ai-table :tableData="detail.list" :colConfigs="records" :isShowPagination="!1" hideOptions/>
|
||||
</ai-card>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<template v-if="isClaim">
|
||||
<el-button type="primary" @click="submit(1)">提交</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>
|
||||
123
project/xumu/AppClaimApply/list.vue
Normal file
123
project/xumu/AppClaimApply/list.vue
Normal file
@@ -0,0 +1,123 @@
|
||||
<script>
|
||||
import {mapState} from "vuex"
|
||||
|
||||
const columns = [
|
||||
{label: "序号", type: "index"},
|
||||
{label: "投保单号", prop: "orderNo"},
|
||||
{label: "所属养殖户", prop: "applyName"},
|
||||
{label: "所属养殖场", prop: "farmName"},
|
||||
{label: "投保数量(头)", prop: "insureNumber", width: 120},
|
||||
{label: "投保状态", prop: "status", width: 160, dict: "insureStatus"},
|
||||
{label: "投保类型", prop: "insureType", dict: "insureType"},
|
||||
{label: "投保时间", prop: "createTime"},
|
||||
{label: "可理赔数量", prop: "unpaidClaimNumber", width: 120},
|
||||
{label: "说明", prop: "remarks"},
|
||||
]
|
||||
export default {
|
||||
name: "claimList",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
columns,
|
||||
tableData: [],
|
||||
page: {pageNum: 1, pageSize: 10, total: 0},
|
||||
search: {},
|
||||
dialog: false,
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
userinfo: v => v.user.info || {},
|
||||
pageTitle: v => v.$parent.menuName || v.$parent.$options.label
|
||||
},
|
||||
watch: {
|
||||
search: {
|
||||
deep: true,
|
||||
handler() {
|
||||
this.page.pageNum = 1
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
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.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ai-page class="claimList" :title="pageTitle">
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-input placeholder="投保订单号" v-model="search.orderNo"/>
|
||||
<ai-select placeholder="全部投保类型" v-model="search.insureType" dict="insureType"/>
|
||||
<ai-search label="投保日期">
|
||||
<el-date-picker v-model="search.beginDate" type="datetime" placeholder="开始日期" size="small"/>
|
||||
<el-date-picker v-model="search.endDate" type="datetime" placeholder="结束日期" size="small"/>
|
||||
</ai-search>
|
||||
<ai-input placeholder="养殖户" v-model="search.applyName"/>
|
||||
<ai-input placeholder="养殖场" v-model="search.farmName"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-download :instance="instance" url="/api/insurance/claim/apply/export" :params="{...search,...page}" :fileName="`${pageTitle}导出表-${Date.now()}`"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :colConfigs="columns" :dict="dict" @getList="getTableData"
|
||||
:total="page.total" :current.sync="page.pageNum" :size.sync="page.pageSize">
|
||||
<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)">
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-dialog v-model="dialog" title="理赔须知" @closed="form={}">
|
||||
<el-form size="small" label-position="top" :mode="form" ref="form">
|
||||
<el-form-item label="如遇一下情况进行赔付:">
|
||||
1、自然灾害:如暴雨、洪水、台风、冰雹、雷击、暴风雪等导致的肉牛死亡或伤残;<br/>
|
||||
2、疾病与疫病:包括但不限于口蹄疫、布鲁氏菌病、炭疽、牛结核病等对肉牛生命安全造成威胁的疾病;<br/>
|
||||
3、意外事故:如火灾、爆炸、触电、盗窃、走失等;<br/>
|
||||
4、强制扑杀:由于政府政策或疫情控制需要,对肉牛进行的强制扑杀。
|
||||
</el-form-item>
|
||||
<el-form-item class="flex center">
|
||||
<el-checkbox v-model="form.agree">本人阅读并知晓理赔须知,承认上传资料的真实性</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #foot>
|
||||
<el-button @click="$router.push({hash:'#claim',query:{id:form.id}})" type="primary" :disabled="!form.agree">符合要求,立即申请</el-button>
|
||||
<el-button @click="dialog=false">取消</el-button>
|
||||
</template>
|
||||
</ai-dialog>
|
||||
</ai-page>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.claimList {
|
||||
height: 100%;
|
||||
|
||||
.deleteBtn {
|
||||
color: $errorColor;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -126,7 +126,7 @@ export default {
|
||||
<ai-card title="投保对象">
|
||||
<template #right v-if="isAdd||isEdit">
|
||||
<ai-eartag-picker @select="v=>detail.detailList=v" :instance="instance"
|
||||
:action="`/insurance/apply/getEarNumberList?farmId=${detail.farmId}`">
|
||||
:action="`/api/insurance/apply/getEarNumberList?farmId=${detail.farmId}`">
|
||||
<el-button type="text">选择</el-button>
|
||||
</ai-eartag-picker>
|
||||
</template>
|
||||
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
<ai-card title="投保对象">
|
||||
<template #right v-if="isAdd">
|
||||
<ai-eartag-picker @select="v=>detail.detailList=v" :instance="instance"
|
||||
:action="`/insurance/apply/getEarNumberList?farmId=${detail.farmId}`">
|
||||
:action="`/api/insurance/apply/getEarNumberList?farmId=${detail.farmId}`">
|
||||
<el-button type="text">选择</el-button>
|
||||
</ai-eartag-picker>
|
||||
</template>
|
||||
|
||||
35
project/xumu/AppLoanApply/AppLoanApply.vue
Normal file
35
project/xumu/AppLoanApply/AppLoanApply.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<script>
|
||||
import add from "./add.vue";
|
||||
import list from "./list.vue";
|
||||
|
||||
export default {
|
||||
name: "AppLoanApply",
|
||||
label: "贷款申请",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
currentPage() {
|
||||
let {hash} = this.$route
|
||||
return hash == "#add" ? add : list
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load("auditStatus", "insureType", "insureStatus", "category", "variety")
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="AppLoanApply">
|
||||
<component :is="currentPage" v-bind="$props"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AppLoanApply {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
176
project/xumu/AppLoanApply/add.vue
Normal file
176
project/xumu/AppLoanApply/add.vue
Normal file
@@ -0,0 +1,176 @@
|
||||
<script>
|
||||
import {mapState} from "vuex"
|
||||
import AiEartagPicker from "@project/xumu/components/AiEartagPicker.vue";
|
||||
|
||||
const columns = [
|
||||
{label: "序号", type: "index"},
|
||||
{label: "生物芯片耳标号", prop: "biochipEarNumber"},
|
||||
{label: "类别", prop: "category", dict: "category"},
|
||||
{label: "品种", prop: "variety", dict: "variety"},
|
||||
]
|
||||
export default {
|
||||
name: "loanAdd",
|
||||
components: {AiEartagPicker},
|
||||
props: {
|
||||
instance: Function,
|
||||
permissions: Function,
|
||||
dict: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detail: {detailList: []},
|
||||
columns,
|
||||
companyList: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
userinfo: v => v.user.info || {},
|
||||
pageTitle: v => {
|
||||
const appName = v.$parent.menuName || v.$parent.$options.label
|
||||
return v.$route.query.id ? v.isEdit ? `编辑${appName}` : `${appName}详情` : `新增${appName}`
|
||||
},
|
||||
isAdd: v => !v.$route.query.id,
|
||||
isEdit: v => v.$route.query.edit == 1,
|
||||
formImages: v => [
|
||||
{label: "身份证(正面)", prop: "frontCard", rules: {required: v.isAdd||v.isEdit, message: '请上传 身份证(正面)'}},
|
||||
{label: "身份证(反面)", prop: "reverseCard", rules: {required: v.isAdd||v.isEdit, message: '请上传 身份证(反面)'}},
|
||||
{label: "营业执照", prop: "businessPic", rules: {required: v.isAdd||v.isEdit, message: '请上传 营业执照'}},
|
||||
{label: "畜禽经营许可证", prop: "breedPic", rules: {required: v.isAdd||v.isEdit, message: '请上传 畜禽经营许可证'}},
|
||||
{label: "动物防疫条件许可证", prop: "prevention", rules: {required: v.isAdd||v.isEdit, message: '请上传 动物防疫条件许可证'}},
|
||||
]
|
||||
},
|
||||
methods: {
|
||||
back(params = {}) {
|
||||
this.$router.push(params)
|
||||
},
|
||||
getDetail() {
|
||||
const {id} = this.$route.query
|
||||
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 || []
|
||||
let {farmPicture: picture = "{}"} = detail
|
||||
picture = JSON.parse(picture)
|
||||
return this.detail = {...detail, ...picture}
|
||||
}
|
||||
})
|
||||
},
|
||||
getCompanies() {
|
||||
this.instance.post("/api/insurance/apply/getCompany").then(res => {
|
||||
if (res?.data) {
|
||||
this.companyList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getProducts(id) {
|
||||
const item = this.companyList.find(e => e.id == id)
|
||||
return item?.children || []
|
||||
},
|
||||
submit(submitType) {
|
||||
this.$refs.detail.validate().then(() => {
|
||||
const farmPicture = {}
|
||||
this.formImages.forEach(e => {
|
||||
const {prop} = e
|
||||
const val = this.detail[prop]
|
||||
if (val) {
|
||||
farmPicture[prop] = val
|
||||
}
|
||||
})
|
||||
this.detail.farmPicture = JSON.stringify(farmPicture)
|
||||
this.instance.post("/api/insurance/apply/addOrEdit", {...this.detail, submitType}).then(res => {
|
||||
if (res?.code == '0') {
|
||||
this.$message.success("提交成功!")
|
||||
this.back()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCompanies()
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ai-page :title="pageTitle" class="loanAdd" 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" :rules="{required: isAdd||isEdit,message:'请选择 养殖场'}">
|
||||
<ai-select v-if="isAdd||isEdit" v-model="detail.farmId" :instance="instance" :action="`/api/siteUser/querySiteByUserId?userId=${userinfo.id}`" :prop="{label:'name'}"/>
|
||||
<b v-else v-text="detail.farmName"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="承保公司" prop="companyId" :rules="{required: isAdd||isEdit,message:'请选择 承保公司'}">
|
||||
<ai-select v-if="isAdd||isEdit" v-model="detail.companyId" :select-list="companyList" :prop="{label:'name'}"/>
|
||||
<b v-else v-text="detail.companyName"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保险产品" prop="productType" :rules="{required: isAdd||isEdit,message:'请选择 保险产品'}">
|
||||
<ai-select v-if="isAdd||isEdit" v-model="detail.productType" :select-list="getProducts(detail.companyId)" :prop="{label:'name',value:'productType'}"
|
||||
@select="v=>$set(detail,'insureType',v.children[0].insureType)"/>
|
||||
<b v-else v-text="detail.productType"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="投保类型">
|
||||
<ai-input :value="dict.getLabel('insureType',detail.insureType)" placeholder="根据保险产品自动带出" :edit="isAdd||isEdit" readonly/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人">
|
||||
<ai-input v-model="detail.contacts" :edit="isAdd||isEdit"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话">
|
||||
<ai-input v-model="detail.phone" :edit="isAdd||isEdit"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</ai-card>
|
||||
<ai-card title="投保对象">
|
||||
<template #right v-if="isAdd||isEdit">
|
||||
<ai-eartag-picker @select="v=>detail.detailList=v" :instance="instance"
|
||||
:action="`/api/insurance/apply/getEarNumberList?farmId=${detail.farmId}`">
|
||||
<el-button type="text">选择</el-button>
|
||||
</ai-eartag-picker>
|
||||
</template>
|
||||
<ai-table :tableData="detail.detailList" :colConfigs="columns" :isShowPagination="!1" hideOptions/>
|
||||
</ai-card>
|
||||
<ai-card title="证件信息">
|
||||
<div class="grid c-5 el-form--label-top">
|
||||
<el-form-item v-for="(img,i) in formImages" :key="i" v-bind="img">
|
||||
<ai-uploader v-if="isAdd||isEdit" v-model="detail[img.prop]" :instance="instance" :limit="1" value-is-url/>
|
||||
<el-image :src="detail[img.prop]" :preview-src-list="[detail[img.prop]]" v-else/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</ai-card>
|
||||
<ai-card title="审核信息" v-if="!(isAdd||isEdit)">
|
||||
<el-form-item label="审核状态">{{ dict.getLabel('auditStatus', detail.auditStatus) }}</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.orderNo }}</el-form-item>
|
||||
<el-form-item label="保单资料">
|
||||
<el-image :src="detail.picture" :preview-src-list="[detail.picture]"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="说明">{{ detail.remarks }}</el-form-item>
|
||||
</ai-card>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<template v-if="isAdd||isEdit">
|
||||
<el-button type="primary" @click="submit(1)">保存草稿</el-button>
|
||||
<el-button type="primary" @click="submit(2)">保存并提交</el-button>
|
||||
</template>
|
||||
<el-button @click="back">返回</el-button>
|
||||
</div>
|
||||
</ai-page>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.loanAdd {
|
||||
:deep(.el-form--label-top) {
|
||||
.el-form-item__label {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.el-form-item__content {
|
||||
margin-left: unset !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
119
project/xumu/AppLoanApply/list.vue
Normal file
119
project/xumu/AppLoanApply/list.vue
Normal file
@@ -0,0 +1,119 @@
|
||||
<script>
|
||||
import {mapState} from "vuex"
|
||||
|
||||
const columns = [
|
||||
{label: "序号", type: "index"},
|
||||
{label: "投保单号", prop: "orderNo"},
|
||||
{label: "所属养殖场", prop: "farmName"},
|
||||
{label: "投保类型", prop: "insureType", dict: "insureType"},
|
||||
{label: "承保公司", prop: "companyName"},
|
||||
{label: "投保时间", prop: "createTime"},
|
||||
{label: "投保状态", prop: "status", width: 160, dict: "insureStatus"},
|
||||
{label: "审核状态", prop: "auditStatus", width: 120, dict: "auditStatus"},
|
||||
{label: "申请人", prop: "applyName", width: 120},
|
||||
]
|
||||
export default {
|
||||
name: "loanList",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
columns,
|
||||
tableData: [],
|
||||
page: {pageNum: 1, pageSize: 10, total: 0},
|
||||
search: {},
|
||||
dialog: false,
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
userinfo: v => v.user.info || {},
|
||||
pageTitle: v => v.$parent.menuName || v.$parent.$options.label
|
||||
},
|
||||
watch: {
|
||||
search: {
|
||||
deep: true,
|
||||
handler() {
|
||||
this.page.pageNum = 1
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/api/insurance/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.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(id) {
|
||||
this.$confirm("确定删除该条数据?").then(() => {
|
||||
this.instance.post("/api/insurance/apply/del", null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ai-page class="loanList" :title="pageTitle">
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select placeholder="全部养殖场" v-model="search.farmId" :instance="instance" :action="`/api/siteUser/querySiteByUserId?userId=${userinfo.id}`" :prop="{label:'name'}"/>
|
||||
<ai-input placeholder="投保订单号" v-model="search.orderNo"/>
|
||||
<ai-select placeholder="全部投保类型" v-model="search.insureType" dict="insureType"/>
|
||||
<ai-select placeholder="全部投保状态" v-model="search.status" dict="insureStatus"/>
|
||||
<ai-select placeholder="全部审批状态" v-model="search.auditStatus" dict="auditStatus"/>
|
||||
<ai-search label="投保日期">
|
||||
<el-date-picker v-model="search.beginDate" type="datetime" placeholder="开始日期" size="small"/>
|
||||
<el-date-picker v-model="search.endDate" type="datetime" placeholder="结束日期" size="small"/>
|
||||
</ai-search>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="$router.push({hash:'#add'})">新增</el-button>
|
||||
<ai-download :instance="instance" url="/api/insurance/apply/export" :params="{...search,...page}" :fileName="`投保申请导出表-${Date.now()}`"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :colConfigs="columns" :dict="dict" @getList="getTableData"
|
||||
:total="page.total" :current.sync="page.pageNum" :size.sync="page.pageSize">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<div class="table-options">
|
||||
<template v-if="['00','03'].includes(row.permit)">
|
||||
<el-button type="text" @click="$router.push({hash:'#add',query:{id:row.id,edit:1}})">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
<el-button v-else type="text" @click="$router.push({hash:'#add',query:{id:row.id}})">查看</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</ai-page>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.loanList {
|
||||
height: 100%;
|
||||
|
||||
.deleteBtn {
|
||||
color: $errorColor;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -32,7 +32,8 @@ export default {
|
||||
if (this.penId) {
|
||||
url += `?penId=${this.penId}`
|
||||
}
|
||||
this.instance.post(url).then(res => {
|
||||
!/undefined/.test(url) && this.instance.post(url).then(res => {
|
||||
console.log(res)
|
||||
if (res?.data) {
|
||||
this.list = res.data
|
||||
}
|
||||
|
||||
@@ -11,8 +11,13 @@
|
||||
<slot name="footer"/>
|
||||
</template>
|
||||
<div v-else class="dialog-footer" slot="footer">
|
||||
<template v-if="$slots.foot">
|
||||
<slot name="foot"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button @click="onCancel">取消</el-button>
|
||||
<el-button @click="onConfirm" type="primary">确认</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</section>
|
||||
@@ -144,7 +149,7 @@ export default {
|
||||
}
|
||||
|
||||
.el-button {
|
||||
width: 92px !important;
|
||||
min-width: 92px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<section class="uploader">
|
||||
<template v-if="!readonly">
|
||||
<el-upload
|
||||
action
|
||||
multiple
|
||||
@@ -84,6 +85,8 @@
|
||||
<div class="images" v-viewer="{movable: true}" v-show="false">
|
||||
<img v-for="(item, index) in imgList" :src="item" :key="index" alt="">
|
||||
</div>
|
||||
</template>
|
||||
<el-image v-else v-for="(url,i) in imgList" :key="i" :src="url" :preview-src-list="[url]"/>
|
||||
</section>
|
||||
</template>
|
||||
<script>
|
||||
@@ -131,7 +134,8 @@ export default {
|
||||
},
|
||||
clearable: {default: true},
|
||||
valueIsUrl: Boolean,
|
||||
showLoading: Boolean
|
||||
showLoading: Boolean,
|
||||
readonly: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<section class="AiHighlight" :class="{bold,color}" v-html="html"/>
|
||||
<section class="AiHighlight" :class="{bold}" v-html="html"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -31,7 +31,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.AiHighlight ){
|
||||
.AiHighlight {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
@@ -41,11 +41,6 @@ export default {
|
||||
color: $primaryColor;
|
||||
}
|
||||
|
||||
&.color {
|
||||
.keyword {
|
||||
}
|
||||
}
|
||||
|
||||
&.bold {
|
||||
.keyword {
|
||||
font-weight: bold;
|
||||
|
||||
Reference in New Issue
Block a user