This commit is contained in:
刘仕伟
2022-03-02 10:05:01 +08:00
7 changed files with 25 additions and 11 deletions

View File

@@ -81,7 +81,7 @@ export default {
form: {},
rules: {
auditStatus: [{required: true, message: "请选择审批结果"}],
auditDescription: [{validator: (r, v, cb) => this.form.auditStatus == 2 ? cb("请输入审批意见") : cb()}],
auditDescription: [{validator: (r, v, cb) => this.form.auditStatus == 2 && !v ? cb("请输入审批意见") : cb()}],
}
}
},

View File

@@ -7,7 +7,8 @@
</template>
</ai-title>
<template #content>
<el-form size="small" label-width="120px">
<el-alert show-icon v-if="!detail.id" type="error" title="该产品已下架" center/>
<el-form v-else size="small" label-width="120px">
<ai-card title="基本信息">
<template #content>
<el-row type="flex" class="flexWrap">
@@ -91,7 +92,7 @@ export default {
rules() {
return {
status: [{required: true, message: "请选择审批结果"}],
remark: [{validator: (r, v, cb) => this.form.status == 2 ? cb("请输入审批意见") : cb()}],
remark: [{validator: (r, v, cb) => this.form.status == 2 && !v ? cb("请输入审批意见") : cb()}],
}
}
},
@@ -112,12 +113,13 @@ export default {
this.detail = res.data
this.detail.guaranteeModeLabel = res.data.guaranteeMode?.split(",").map(g => this.dict.getLabel("productGuaranteeMode", g))?.toString()
this.detail.faceUserLabel = res.data.faceUser?.split(",").map(g => this.dict.getLabel("productFaceUser", g))?.toString()
} else {
this.$message.error("该产品已下架!")
}
})
},
submitAudit() {
this.$refs.AuditForm.validate(v => {
console.log(v)
if (v) {
let {id} = this.detail
this.instance.post("/appfinancialproduct/auditProduct", null, {

View File

@@ -94,6 +94,8 @@
</template>
<script>
import {mapState} from "vuex";
export default {
name: "loanDetail",
props: {
@@ -102,8 +104,9 @@ export default {
permissions: Function
},
computed: {
...mapState(['user']),
isFinanceAdmin() {
return !!this.user.financeUser?.userRole == 1
return this.user.financeUser?.userRole == 1
},
isAuthing() {
return this.detail.status == "0"

View File

@@ -1,7 +1,7 @@
<template>
<section class="needsDetail">
<ai-detail>
<ai-title slot="title" title="融资详情" isShowBottomBorder isShowBack @onBackClick="$router.push({query:{}})">
<ai-title slot="title" title="融资详情" isShowBottomBorder isShowBack @onBackClick="back">
<template #rightBtn>
<el-button v-if="isFinanceUser" type="primary" @click="handleGrab">抢单</el-button>
<el-button v-else type="danger" @click="handleCancel">取消发布</el-button>
@@ -86,10 +86,13 @@ export default {
}).then(res => {
if (res.code == 0) {
this.$message.success("需求取消成功")
this.getDetail()
this.back()
}
})
}).catch(() => 0)
},
back() {
this.$router.push({query: {}})
}
},
created() {