融资需求核对完成

This commit is contained in:
aixianling
2022-02-25 10:07:29 +08:00
parent 829f03e68c
commit 164203adab
3 changed files with 49 additions and 31 deletions

View File

@@ -23,11 +23,8 @@ export default {
return !!this.$route.query.id ? NeedsDetail : NeedsList return !!this.$route.query.id ? NeedsDetail : NeedsList
} }
}, },
data() {
return {}
},
created() { created() {
this.dict.load("enterpriseName") this.dict.load("productRepaymentTimeline", "financialFundPurpose")
} }
} }
</script> </script>

View File

@@ -3,8 +3,8 @@
<ai-detail> <ai-detail>
<ai-title slot="title" title="融资详情" isShowBottomBorder isShowBack @onBackClick="$router.push({query:{}})"> <ai-title slot="title" title="融资详情" isShowBottomBorder isShowBack @onBackClick="$router.push({query:{}})">
<template #rightBtn> <template #rightBtn>
<el-button type="danger" @click="handleCancel">取消发布</el-button> <el-button v-if="isFinanceUser" type="primary" @click="handleGrab">抢单</el-button>
<el-button type="primary" @click="handleGrab">抢单</el-button> <el-button v-else type="danger" @click="handleCancel">取消发布</el-button>
</template> </template>
</ai-title> </ai-title>
<template #content> <template #content>
@@ -12,17 +12,23 @@
<ai-card title="融资需求"> <ai-card title="融资需求">
<template #content> <template #content>
<el-row type="flex" class="flexWrap"> <el-row type="flex" class="flexWrap">
<el-form-item label="意向金额">{{ detail.enterpriseName }}</el-form-item> <el-form-item label="意向金额">{{ detail.loanAmount }}</el-form-item>
<el-form-item label="期望使用期限">{{ detail.enterpriseName }}</el-form-item> <el-form-item label="期望使用期限">{{
<el-form-item label="资金用途">{{ detail.unifiedCode }}</el-form-item> dict.getLabel('productRepaymentTimeline', detail.hopeLifespan)
}}
</el-form-item>
<el-form-item label="资金用途">{{
dict.getLabel('financialFundPurpose', detail.fundPurpose)
}}
</el-form-item>
<el-form-item label="企业主体">{{ detail.enterpriseName }}</el-form-item> <el-form-item label="企业主体">{{ detail.enterpriseName }}</el-form-item>
<el-form-item label="联系人">{{ dict.getLabel('enterpriseType', detail.enterpriseType) }}</el-form-item> <el-form-item label="联系人">{{ detail.createUserName }}</el-form-item>
<el-form-item label="所在地区">{{ detail.address }}</el-form-item> <el-form-item label="所在地区">{{ detail.areaName }}</el-form-item>
<el-form-item label="联系方式">{{ detail.phone }}</el-form-item> <el-form-item label="联系方式">{{ detail.phone }}</el-form-item>
<el-form-item label="身份证号">{{ detail.idNumber }}</el-form-item> <el-form-item label="身份证号">{{ detail.idNumber }}</el-form-item>
<el-form-item label="发布时间">{{ detail.address }}</el-form-item> <el-form-item label="发布时间">{{ detail.createTime }}</el-form-item>
</el-row> </el-row>
<el-form-item label="备注">{{ detail.operationPeriod }}</el-form-item> <el-form-item label="备注">{{ detail.remark }}</el-form-item>
</template> </template>
</ai-card> </ai-card>
</el-form> </el-form>
@@ -32,6 +38,8 @@
</template> </template>
<script> <script>
import {mapState} from "vuex";
export default { export default {
name: "needsDetail", name: "needsDetail",
props: { props: {
@@ -39,20 +47,21 @@ export default {
dict: Object, dict: Object,
permissions: Function permissions: Function
}, },
computed: {
...mapState(['user']),
isFinanceUser() {
return this.user.financeUser?.type != null
}
},
data() { data() {
return { return {
dialog: false,
detail: {}, detail: {},
form: {},
rules: {
auditStatus: [{required: true, message: "请选择审批结果"}]
}
} }
}, },
methods: { methods: {
getDetail() { getDetail() {
let {id} = this.$route.query let {id} = this.$route.query
this.instance.post("/appportaluserenterprise/queryDetailById", null, { this.instance.post("/appfinancingdemand/queryDetailById", null, {
params: {id} params: {id}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
@@ -61,16 +70,29 @@ export default {
}) })
}, },
handleGrab() { handleGrab() {
this.instance.post("/appfinancingdemand/obtain", null, {
params: {id: this.detail.id}
}).then(res => {
if (res.code == 0) {
this.$message.success("抢单成功!")
this.$router.push({name: ""})
}
})
}, },
handleCancel() { handleCancel() {
this.$confirm("是否要取消本次融资需求发布?").then(() => { this.$confirm("是否要取消本次融资需求发布?").then(() => {
this.instance.post("/appfinancingdemand/userCancel", null, {
params: {id: this.detail.id}
}).then(res => {
if (res.code == 0) {
this.$message.success("需求取消成功")
this.getDetail()
}
})
}).catch(() => 0) }).catch(() => 0)
} }
}, },
created() { created() {
this.dict.load("auditStatus")
this.getDetail() this.getDetail()
} }
} }

View File

@@ -6,7 +6,7 @@
<template #content> <template #content>
<ai-search-bar> <ai-search-bar>
<template #right> <template #right>
<el-input size="small" placeholder="搜索企业主体" v-model="search.name" clearable <el-input size="small" placeholder="搜索企业主体" v-model="search.enterpriseName" clearable
@change="page.current=1,getTableData()"/> @change="page.current=1,getTableData()"/>
</template> </template>
</ai-search-bar> </ai-search-bar>
@@ -44,19 +44,19 @@ export default {
colConfigs: [ colConfigs: [
{label: "企业名称", prop: "enterpriseName"}, {label: "企业名称", prop: "enterpriseName"},
{label: "所在地区", prop: "areaName"}, {label: "所在地区", prop: "areaName"},
{label: "意向金额(万)", prop: "legalPersonName"}, {label: "意向金额(万)", prop: "loanAmount"},
{label: "申请时间", prop: "legalPersonName"}, {label: "申请时间", prop: "createTime"},
{label: "联系人", prop: "phone"}, {label: "联系人", prop: "createUserName"},
{label: "联系方式", prop: "phone"}, {label: "联系方式", prop: "phone"},
{label: "备注", prop: "loginAccount"}, {label: "备注", prop: "remark"},
{slot: "options"} {slot: "options"}
] ]
} }
}, },
methods: { methods: {
getTableData() { getTableData() {
this.instance.post("/appportaluserenterprise/list", null, { this.instance.post("/appfinancingdemand/list", null, {
params: {...this.page, ...this.search, status: 1} params: {...this.page, ...this.search}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
this.tableData = res.data?.records this.tableData = res.data?.records
@@ -69,9 +69,8 @@ export default {
} }
}, },
created() { created() {
this.dict.load("enterpriseName")
this.getTableData()
this.search.areaId = this.user.info.areaId this.search.areaId = this.user.info.areaId
this.getTableData()
} }
} }
</script> </script>