- 将审核状态字典从 'auditStatus' 修改为 'insuranceAuditStatus'- 在 add.vue、AppInsuranceApply.vue 和 list.vue 文件中进行了相应更新
120 lines
4.1 KiB
Vue
120 lines
4.1 KiB
Vue
<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: "insuranceAuditStatus"},
|
|
{label: "申请人", prop: "applyName", width: 120},
|
|
]
|
|
export default {
|
|
name: "iaList",
|
|
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="iaList" :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 value-format="yyyy-MM-dd HH:mm:ss" v-model="search.beginDate" type="datetime" placeholder="开始日期" size="small"/>
|
|
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" 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">
|
|
.iaList {
|
|
height: 100%;
|
|
|
|
.deleteBtn {
|
|
color: $errorColor;
|
|
}
|
|
}
|
|
</style>
|