BUG 29018

This commit is contained in:
aixianling
2022-04-11 10:57:21 +08:00
parent 4d16c8c2cc
commit 8502f94796
6 changed files with 74 additions and 99 deletions

View File

@@ -1,28 +1,12 @@
<template>
<section class="AppFinancingNeeds">
<ai-list v-if="showList">
<template slot="title">
<ai-title slot="title" title="融资需求" :isShowBottomBorder="false" :isShowArea="currIndex == 1 && showList" v-model="areaId" :instance="instance" @change="changeArea"/>
</template>
<template slot="tabs">
<el-tabs class="tabs-page" v-model="currIndex">
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label" :name="String(i)">
<component :is="tab.comp" v-if="currIndex==i" :ref="currIndex" :instance="instance" :dict="dict"
:permissions="permissions" :listType="tab.value" @goPage="goPage" :areaId="areaId"/>
</el-tab-pane>
</el-tabs>
</template>
</ai-list>
<component v-if="!showList" :is="currentPage" :instance="instance" :dict="dict"
:permissions="permissions" :row="detail" @goBack="goBack"></component>
<component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
</section>
</template>
<script>
import {mapState} from "vuex";
import NeedsDetail from "./needsDetail";
import NeedsList from "./needsList";
import NeedsStatistics from "./needsStatistics";
export default {
name: "AppFinancingNeeds",
@@ -38,54 +22,15 @@ export default {
need: this
}
},
data() {
return {
currIndex: '0',
showList: true,
currentPage: "",
detail: {},
areaId: ''
}
},
computed: {
...mapState(['user']),
tabs() {
return [
{
label: "融资需求", name: "NeedsList", value: "0", comp: NeedsList, detail: NeedsDetail,
permission: ""
},
{
label: "融资统计", name: "NeedsStatistics", value: "1", comp: NeedsStatistics,
permission: ""
}
]
},
currentTab() {
return this.tabs[this.currIndex] || {}
currentComponent() {
return !!this.$route.query.id ? NeedsDetail : NeedsList
}
},
created() {
console.log(this.user)
this.dict.load("productRepaymentTimeline", "financialFundPurpose","financingDemandApplyType", "enterpriseType", "dishonestPersonSituation", "administrativeSanctionType")
this.areaId = this.user.info.areaId || ''
this.dict.load("productRepaymentTimeline", "financialFundPurpose", "financingDemandApplyType", "enterpriseType", "dishonestPersonSituation", "administrativeSanctionType",
"financingDemandApplyType")
},
methods: {
goPage(obj) {
this.currentPage = this.tabs[Number(this.currIndex)][obj.key];
obj.row && (this.detail = obj.row)
this.showList = false;
},
goBack() {
this.showList = true;
this.$nextTick(() => {
this.$refs[this.currIndex][0].getTableData();
})
},
changeArea() {
this.$refs[this.currIndex][0].getTableData();
}
}
}
</script>

View File

@@ -64,7 +64,6 @@ export default {
instance: Function,
dict: Object,
permissions: Function,
row: Object,
},
computed: {
...mapState(['user']),
@@ -81,7 +80,7 @@ export default {
},
methods: {
getDetail() {
let {id} = this.row
let {id} = this.$route.query
this.instance.post("/appfinancingdemand/queryDetailById", null, {
params: {id}
}).then(res => {
@@ -113,7 +112,7 @@ export default {
}).catch(() => 0)
},
back() {
this.$emit('goBack')
this.$router.push({})
}
},
created() {

View File

@@ -1,10 +1,15 @@
<template>
<section class="needsList">
<ai-list>
<ai-title slot="title" title="融资需求" isShowBottomBorder/>
<template #content>
<ai-search-bar>
<template #left>
<ai-select placeholder="融资主体类型" v-model="search.applyType" @change="page.current=1,getTableData()"
:selectList="dict.getDict('financingDemandApplyType')"/>
</template>
<template #right>
<el-input size="small" placeholder="搜索企业名称" v-model="search.enterpriseName" clearable
<el-input size="small" placeholder="搜索联系人、企业名称" v-model="search.enterpriseName" clearable
@change="page.current=1,getTableData()"/>
</template>
</ai-search-bar>
@@ -12,7 +17,7 @@
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="options" label="操作" fixed="right" align="center">
<template slot-scope="{row}">
<el-button type="text" @click="goTo('detail',row)">详情</el-button>
<el-button type="text" @click="showDetail(row.id)">详情</el-button>
</template>
</el-table-column>
</ai-table>
@@ -40,12 +45,12 @@ export default {
page: {current: 1, size: 10, total: 0},
tableData: [],
colConfigs: [
{label: "联系人", prop: "name"},
{label: "联系方式", prop: "phone"},
{label: "企业名称", prop: "enterpriseName"},
{label: "所在地区", prop: "areaName"},
{label: "意向金额(万)", prop: "loanAmount"},
{label: "申请时间", prop: "createTime"},
{label: "联系人", prop: "name"},
{label: "联系方式", prop: "phone"},
{label: "备注", prop: "remark"},
{slot: "options"}
]
@@ -62,8 +67,8 @@ export default {
}
})
},
goTo(key = '', row) {
this.$emit('goPage', {key, row});
showDetail(id) {
this.$router.push({query: {id}})
},
},
created() {

View File

@@ -24,7 +24,8 @@ export default {
}
},
created() {
this.dict.load("financingDemandStatus", "productRepaymentTimeline", "financialFundPurpose")
this.dict.load("financingDemandStatus", "productRepaymentTimeline", "financialFundPurpose",
"financialOrganizationType", "financialLoanApplyStatus","financingDemandApplyType")
}
}
</script>

View File

@@ -1,19 +1,26 @@
<template>
<section class="grabList">
<ai-list>
<ai-title slot="title" title="抢单记录" isShowBottomBorder/>
<ai-list isTabs>
<ai-title slot="title" title="抢单记录"/>
<template #tabs>
<el-tabs>
<el-tab-pane label="融资申请">
<ai-card hideTitle class="mar-t16">
<template #content>
<ai-search-bar>
<ai-search-bar class="mar-t8">
<template #left>
<ai-select placeholder="订单状态" v-model="search.status" @change="page.current=1,getTableData()"
:selectList="dict.getDict('financingDemandStatus')"/>
<ai-select placeholder="融资主体类型" v-model="search.applyType" @change="page.current=1,getTableData()"
:selectList="dict.getDict('financingDemandApplyType')"/>
<ai-search label="申请时间">
<el-date-picker size="small" v-model="search.applyTime" type="daterange" @change="handleFilterApplyTime"
<el-date-picker size="small" v-model="search.applyTime" type="daterange"
@change="handleFilterApplyTime"
:default-time="['00:00:00','23:59:59']" value-format="yyyy-MM-dd HH:mm:ss"/>
</ai-search>
</template>
<template #right>
<el-input size="small" placeholder="搜索企业名称、贷款经理、贷款银行" v-model="search.enterpriseName" clearable
<el-input size="small" placeholder="搜索企业、贷款经理、贷款银行、联系人" v-model="search.enterpriseName" clearable
@change="page.current=1,getTableData()"/>
</template>
</ai-search-bar>
@@ -26,15 +33,24 @@
</el-table-column>
</ai-table>
</template>
</ai-card>
</el-tab-pane>
<el-tab-pane label="融资统计" lazy>
<needs-statistics :instance="instance" :dict="dict" :permissions="permissions"/>
</el-tab-pane>
</el-tabs>
</template>
</ai-list>
</section>
</template>
<script>
import {mapState} from "vuex";
import NeedsStatistics from "./needsStatistics";
export default {
name: "grabList",
components: {NeedsStatistics},
props: {
instance: Function,
dict: Object,
@@ -49,11 +65,11 @@ export default {
page: {current: 1, size: 10, total: 0},
tableData: [],
colConfigs: [
{label: "联系人", prop: "name"},
{label: "联系方式", prop: "phone"},
{label: "企业名称", prop: "enterpriseName"},
{label: "意向金额(万)", prop: "loanAmount"},
{label: "申请时间", prop: "createTime"},
{label: "联系人", prop: "name"},
{label: "联系方式", prop: "phone"},
{label: "贷款经理", prop: "auditUserName"},
{label: "贷款银行", prop: "organizationName"},
{label: "放款金额(万)", prop: "auditAmount"},
@@ -93,5 +109,14 @@ export default {
<style lang="scss" scoped>
.grabList {
height: 100%;
.mar-t16 {
margin-top: 16px;
}
.mar-t8 {
margin-top: 8px;
}
}
</style>