feat(x): 新增贷款审核和页面
- 实现贷款申请功能 - 添加贷款审核相关的组件、审批和查看功能 -umu集成养殖场、贷款银行和产品选择 - 支持耳标号扫描和选择 - 添加贷款合同号和资料上传功能- 实现审核状态和结果的展示
This commit is contained in:
108
project/xumu/AppLoanAudit/list.vue
Normal file
108
project/xumu/AppLoanAudit/list.vue
Normal file
@@ -0,0 +1,108 @@
|
||||
<script>
|
||||
import {mapState} from "vuex"
|
||||
|
||||
const columns = [
|
||||
{label: "序号", type: "index"},
|
||||
{label: "贷款合同号", prop: "contractNo"},
|
||||
{label: "所属养殖户", prop: "applyName"},
|
||||
{label: "所属养殖场", prop: "farmName"},
|
||||
{label: "贷款银行", prop: "bankName"},
|
||||
{label: "贷款产品", prop: "productType", dict: "loanProduct"},
|
||||
{label: "贷款时间", prop: "createTime", width: 160},
|
||||
{label: "贷款状态", prop: "status", dict: "loanStatus", width: 100},
|
||||
{label: "审批状态", prop: "auditStatus", dict: "auditStatus", width: 100},
|
||||
{label: "审批人", prop: "auditName"},
|
||||
]
|
||||
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/loan/apply/getAuditPage", {...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="loanList" :title="pageTitle">
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-input placeholder="贷款合同号" v-model="search.contractNo"/>
|
||||
<ai-select placeholder="全部贷款状态" v-model="search.status" dict="loanStatus"/>
|
||||
<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>
|
||||
<ai-input placeholder="养殖户" v-model="search.applyName"/>
|
||||
<ai-input placeholder="养殖场" v-model="search.farmName"/>
|
||||
</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/loan/apply/exportAudit" :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="['1'].includes(row.auditStatus)">
|
||||
<el-button type="text" @click="$router.push({hash:'#audit',query:{id: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>
|
||||
Reference in New Issue
Block a user