This commit is contained in:
刘仕伟
2022-02-28 10:01:29 +08:00
36 changed files with 1371 additions and 239 deletions

View File

@@ -1,58 +0,0 @@
<template>
<section class="AppDataPublicity">
<ai-list>
<ai-title slot="title" title="数据公示" isShowBottomBorder/>
<template #content>
<ai-search-bar>
<template #left>
<el-button type="primary" icon="iconfont iconAdd">添加</el-button>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :colConfigs="colConfigs" @getList="getTableData"
:total="page.total" :current.sync="page.current" :size.sync="page.size">
<el-table-column slot="options" label="操作" fixed="right" align="center">
<template slot-scope="{row}">
<el-button type="text">编辑</el-button>
<el-button type="text">删除</el-button>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</section>
</template>
<script>
export default {
name: "AppDataPublicity",
label: "数据公示",
data() {
return {
tableData: [],
colConfigs: [
{label: "注册企业(家)", prop: ""},
{label: "对接成功企业(家)", prop: ""},
{label: "对接成功笔数(家)", prop: ""},
{label: "发布需求金额(家)", prop: ""},
{label: "对接成功金额(家)", prop: ""},
{label: "操作人", prop: ""},
{slot: "options"}
],
page: {current: 1, size: 10, total: 0}
}
},
methods: {
getTableData() {
}
},
created() {
this.getTableData()
}
}
</script>
<style lang="scss" scoped>
.AppDataPublicity {
}
</style>

View File

@@ -0,0 +1,98 @@
<template>
<div class="AppNewsCenter">
<component
:is="currentPage"
:detail="detail"
:instance="instance"
:dict="dict"
:permissions="permissions"
:areaId="areaId"
@goBack="goBack"
@goPage="goPage"
/>
</div>
</template>
<script>
import {mapState} from 'vuex'
import {addArticle, addVideo, newsDetail, newsList, videoDetail} from './components'
export default {
name: 'AppNewsCenter',
label: '新闻中心',
props: {
instance: Function,
dict: Object,
permissions: Function
},
components: {
newsList,
addVideo,
addArticle,
newsDetail,
videoDetail
},
data() {
return {
areaId: '',
currIndex: '0',
detail: {}
}
},
computed: {
...mapState(['user']),
tabs() {
return [
{
label: '内容管理',
name: 'newsList',
comp: newsList,
addVideo: addVideo,
addArticle: addArticle,
newsDetail: newsDetail,
videoDetail: videoDetail
},
]
},
showList() {
return !this.$route.hash
},
hideLevel() {
return this.user.info.areaList?.length - 1
},
currentPage() {
return this.$route.hash?.substring(1) || newsList
}
},
methods: {
changeAreaId() {
this.$nextTick(() => {
this.$refs[this.currIndex][0].getList()
})
},
goBack() {
this.$router.push({})
},
goPage(obj) {
let hash = "#" + obj.key
if (obj.row) {
let {id} = obj.row
this.$router.push({query: {id}, hash})
} else {
this.$router.push({hash})
}
}
},
created() {
this.areaId = this.user.info.areaId
this.dict.load("appNewsType", "appNewsStatus")
}
}
</script>
<style lang="scss" scoped>
.AppNewsCenter {
width: 100%;
height: 100%;
}
</style>

View File

@@ -0,0 +1,154 @@
<template>
<ai-detail class="add-article">
<template slot="title">
<ai-title :title="isEdit?'编辑文章':'发布文章'" :isShowBack="true" :isShowBottomBorder="true"
@onBackClick="$emit('goBack')"></ai-title>
</template>
<template slot="content">
<ai-card title="发布文章">
<template #content>
<el-form ref="ruleForm" :model="articInfo" :rules="rules" label-width="120px" label-position="right">
<el-form-item prop="title" label="标题:">
<el-input v-model="articInfo.title" size="small" placeholder="请输入…" maxlength="30"
show-word-limit></el-input>
</el-form-item>
<el-form-item prop="policyType" label="类型:">
<ai-select
v-model="articInfo.policyType"
placeholder="选择新闻类型"
:selectList="dict.getDict('newsCenterPolicyType')">
</ai-select>
</el-form-item>
<!-- <el-form-item label="发布地区:" prop="areaId">-->
<!-- <ai-area-get v-model="articInfo.areaId" :instance="instance" :root="areaId"/>-->
<!-- </el-form-item>-->
<el-form-item prop="content" label="正文:">
<ai-editor v-model="articInfo.content" :instance="instance"/>
</el-form-item>
<el-form-item prop="coverFile" label="封面:">
<ai-uploader :instance="instance" v-model="articInfo.coverFile" :limit="1" :isShowTip="true"
@change="$refs['ruleForm'].clearValidate('coverFile')" :cropOps="cropOps" is-crop>
<template slot="tips">最多上传1张图片,单个文件最大10MB支持jpgjpegpng<br/>格式图片比例1.61</template>
</ai-uploader>
</el-form-item>
</el-form>
</template>
</ai-card>
</template>
<template slot="footer">
<el-button class="footer_btn" @click="$emit('goBack')">取消</el-button>
<el-button type="primary" class="footer_btn" @click="handleSubmit('1')" v-if="!isEdit">发布</el-button>
<el-button class="footer_btn" @click="handleSubmit('0')">保存</el-button>
</template>
</ai-detail>
</template>
<script>
export default {
name: "addArticle",
props: {
instance: Function,
dict: Object,
permissions: Function,
areaId: String,
detail: Object,
},
data() {
return {
articInfo: {
areaId: '',
title: "",
content: "",
policyType: '',
coverFile: [],
},
rules: {
title: {required: true, message: '请输入标题', trigger: 'blur'},
areaId: {required: true, message: '请选择 发布地区', trigger: 'blur'},
policyType: {required: true, message: '请选择类型', trigger: 'change'},
content: {required: true, message: '请填写内容', trigger: 'blur'},
coverFile: {required: true, message: '请上传封面', trigger: 'blur'},
},
cropOps: {
fixedNumber: [1.8, 1],
fixed: true
}
}
},
computed: {
isEdit() {
return !!this.$route.query.id;
}
},
methods: {
/**
* 发布、保存新闻
* @param status
*/
handleSubmit(status) {
this.$refs["ruleForm"].validate(valid => {
if (valid) {
this.addOrUpdate(status);
}
})
},
/**
* 新增、修改
* */
addOrUpdate(status) {
const msg = +status ? '发布成功' : this.isEdit ? '编辑成功' : '保存成功';
this.instance.post(`/app/appnewscenterinfo/addOrUpdate`, {
...this.articInfo,
coverFile: {
id: this.articInfo.coverFile[0].id
},
type: 0,
id: this.$route.query.id,
status: status
}).then(res => {
if (res.code == 0) {
this.$message.success(msg);
this.$emit("goBack");
}
})
},
/**
* 根据id查询详情
*/
getDetail() {
let {id} = this.$route.query
id && this.instance.post(`/app/appnewscenterinfo/queryDetailById`, null, {
params: {id}
}).then(res => {
if (res?.data) {
this.articInfo = res.data
this.articInfo.areaId = res.data.areaId
this.articInfo.title = res.data.title;
this.articInfo.content = res.data.content;
this.articInfo.policyType = res.data.policyType
this.articInfo.coverFile = [{...res.data.coverFile, url: res.data.coverFile.accessUrl}];
}
})
}
},
created() {
if (this.isEdit) {
this.getDetail();
}
}
}
</script>
<style lang="scss" scoped>
.add-article {
height: 100%;
overflow: auto;
background: #F3F6F9;
.footer_btn {
width: 106px;
}
}
</style>

View File

@@ -0,0 +1,262 @@
<template>
<ai-detail class="add-video">
<template slot="title">
<ai-title :title="isEdit?'编辑视频':'发布视频'" :isShowBack="true" :isShowBottomBorder="true"
@onBackClick="$emit('goBack')"></ai-title>
</template>
<template slot="content">
<ai-card title="发布视频">
<template #content>
<el-form ref="ruleForm" :model="newsInfo" :rules="rules" label-width="120px" label-position="right">
<el-form-item prop="title" label="标题:">
<el-input v-model="newsInfo.title" size="small" placeholder="请输入…" maxlength="30"
show-word-limit></el-input>
</el-form-item>
<el-form-item prop="policyType" label="类型:">
<ai-select
v-model="newsInfo.policyType"
placeholder="选择新闻类型"
:selectList="$dict.getDict('newsCenterPolicyType')">
</ai-select>
</el-form-item>
<!-- <el-form-item label="发布地区:" prop="areaId">-->
<!-- <ai-area-get v-model="newsInfo.areaId" :instance="instance" :root="areaId"/>-->
<!-- </el-form-item>-->
<el-form-item prop="videoFile" label="视频:">
<el-upload :show-file-list="false" ref="upload1"
action :http-request="submitUpload" :accept="accept" :limit="1">
<div class="video" v-if="!newsInfo.videoFile.length">
<div class="icon">
<ai-icon type="svg" icon="iconVideo"/>
<span>上传视频</span>
</div>
<span class="tips">支持mp4格式单个文件最大100MB</span>
</div>
</el-upload>
<video class="video-com" style="width:100%; height:100%; object-fit: fill;" muted
:src="newsInfo.videoFile[0].url" controls="controls" v-if="newsInfo.videoFile.length"></video>
<el-upload :show-file-list="false" ref="upload2" action :http-request="submitUpload" :accept="accept"
:limit="1" v-if="newsInfo.videoFile.length">
<el-button style="margin-top: 10px;">重新选择</el-button>
</el-upload>
</el-form-item>
<el-form-item prop="coverFile" label="封面:">
<ai-uploader :instance="instance" v-model="newsInfo.coverFile" :limit="1"
@change="$refs['ruleForm'].clearValidate('coverFile')" :cropOps="cropOps" is-crop>
<template slot="tips">图片比例1.81</template>
</ai-uploader>
</el-form-item>
</el-form>
</template>
</ai-card>
</template>
<template slot="footer">
<el-button class="footer_btn" @click="$emit('goBack')">取消</el-button>
<el-button type="primary" class="footer_btn" @click="handleSubmit('1')" v-if="!isEdit">发布</el-button>
<el-button class="footer_btn" @click="handleSubmit('0')">保存</el-button>
</template>
</ai-detail>
</template>
<script>
import mp4box from 'mp4box'
export default {
name: "addVideo",
props: {
instance: Function,
dict: Object,
permissions: Function,
areaId: String,
detail: Object,
},
data() {
return {
newsInfo: {
areaId: '',
title: "",
policyType: '',
videoFile: [],
coverFile: []
},
accept: ".mp4",
rules: {
title: {required: true, message: '请输入标题', trigger: 'blur'},
areaId: {required: true, message: '请选择 发布地区', trigger: 'blur'},
policyType: {required: true, message: '请选择类型', trigger: 'change'},
videoFile: {required: true, message: '请上传视频', trigger: 'blur'},
coverFile: {required: true, message: '请上传封面', trigger: 'blur'},
},
cropOps: {
width: "320px",
height: "180px"
},
}
},
computed: {
isEdit() {
return !!this.$route.query.id;
}
},
methods: {
handleSubmit(status) {
this.$refs["ruleForm"].validate(valid => {
if (valid) {
this.addOrUpdate(status);
}
})
},
/**
* 上传视频
*/
submitUpload(file) {
this.$refs['upload1']?.clearFiles();
this.$refs['upload2']?.clearFiles();
this.$refs['ruleForm']?.clearValidate('videoFile');
const fileType = file.file.name.split(".")[1];
const size = file.file.size / 1024 / 1024 > 100;
let mp4boxfile = mp4box.createFile();
const reader = new FileReader();
reader.readAsArrayBuffer(file.file);
reader.onload = (e) => {
const arrayBuffer = e.target.result;
arrayBuffer.fileStart = 0;
mp4boxfile.appendBuffer(arrayBuffer);
};
mp4boxfile.onReady = (info) => {
let codec = info.mime.match(/codecs="(\S*),/)[1]
if (codec.indexOf('avc') === -1) {
return this.$message.error("视频编码格式不支持")
}
if (size) {
return this.$message.error("视频大小不能超过100M");
}
if (fileType && this.accept.indexOf(fileType.toLocaleLowerCase()) > -1) {
let formData = new FormData()
formData.append('file', file.file);
this.instance.post(`/admin/file/add-unlimited`, formData).then(res => {
if (res && res.data) {
let videoList = res.data[0].split(";");
this.newsInfo.videoFile.splice(0, 1, {
id: videoList[1],
url: videoList[0]
})
}
})
} else {
return this.$message.error("视频格式错误");
}
};
},
addOrUpdate(status) {
const msg = +status ? '发布成功' : this.isEdit ? '编辑成功' : '保存成功';
this.instance.post(`/app/appnews/addOrUpdate`, {
title: this.newsInfo.title,
videoFile: {
id: this.newsInfo.videoFile[0].id
},
coverFile: {
id: this.newsInfo.coverFile[0].id
},
policyType: this.newsInfo.policyType,
areaId: this.areaId,
type: 1,
id: this.detail.id,
status: this.isEdit ? this.detail.status : status
}).then(res => {
if (res.code == 0) {
this.$message.success(msg);
this.$emit("goBack");
}
})
},
getDetail() {
let {id} = this.$route.query
this.instance.post(`/app/appnews/getById`, null, {
params: {id}
}).then(res => {
if (res?.data) {
this.newsInfo.areaId = res.data.areaId
this.newsInfo.title = res.data.title;
this.newsInfo.policyType = res.data.policyType
this.newsInfo.videoFile = [{...res.data.videoFile, url: res.data.videoFile.accessUrl}];
this.newsInfo.coverFile = [{...res.data.coverFile, url: res.data.coverFile.accessUrl}];
}
})
}
},
created() {
if (this.isEdit) {
this.getDetail();
}
}
}
</script>
<style lang="scss" scoped>
.add-video {
height: 100%;
overflow: auto;
.video {
width: 640px;
height: 360px;
border-radius: 4px;
border: 1px dashed #D0D4DC;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.icon {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
span:nth-child(2) {
display: inline-block;
font-size: 16px;
color: #333333;
line-height: 30px;
}
.iconfont {
display: inline-block;
font-size: 40px;
color: #2266FF;
}
}
.tips {
display: inline-block;
font-size: 12px;
color: #999999;
line-height: 26px;
}
}
.video-com {
width: 640px;
height: 360px;
background: rgba(0, 0, 0, 0.5);
border-radius: 2px;
border: 1px solid #D0D4DC;
margin-top: -40px;
}
::v-deep .AiIcon {
width: 38px;
height: 38px;
}
.footer_btn {
width: 106px;
}
}
</style>

View File

@@ -0,0 +1,5 @@
export {default as newsList} from "./newsList";
export {default as addVideo} from "./addVideo";
export {default as addArticle} from "./addArticle";
export {default as newsDetail} from "./newsDetail";
export {default as videoDetail} from "./videoDetail";

View File

@@ -0,0 +1,143 @@
<template>
<ai-detail class="news-detail">
<template slot="title">
<ai-title title="新闻文章详情" isShowBack isShowBottomBorder @onBackClick="$emit('goBack')"></ai-title>
</template>
<template slot="content">
<ai-card titlePosition="center">
<template #title>
<h2>{{ detail.title }}</h2>
<p class="subTitle">类型{{ dict.getLabel('newsCenterPolicyType', +detail.policyType) }}</p>
</template>
<template slot="right">
<el-button type="text" size="small" icon="iconfont iconEdit" @click="handleEdit">修改</el-button>
</template>
<template #content>
<ai-article :value="detail.content"></ai-article>
</template>
</ai-card>
<ai-card title="封面信息">
<template #content>
<div class="content">
<div class="img">
<span>封面</span>
<img v-if="detail.coverFile" :src="detail.coverFile.url" alt="" v-viewer>
</div>
</div>
</template>
</ai-card>
</template>
</ai-detail>
</template>
<script>
import Viewer from 'v-viewer';
import Vue from 'vue';
Vue.use(Viewer);
export default {
name: "newsDetail",
props: {
instance: Function,
dict: Object,
},
data() {
return {
detail: {},
}
},
methods: {
/**
* 修改
* */
handleEdit() {
this.$emit("goPage", {key: "addArticle", row: this.detail});
},
/**
* 根据id查询详情
*/
getDetail() {
let {id} = this.$route.query
id && this.instance.post(`/app/appnews/getById`, null, {
params: {id}
}).then(res => {
if (res?.data) {
this.detail = res.data;
}
})
}
},
created() {
this.getDetail();
}
}
</script>
<style lang="scss" scoped>
.news-detail {
height: 100%;
overflow: auto;
::v-deep .ai-detail__content {
background: #F3F6F9 !important;
}
.content {
height: 100%;
width: 100%;
position: relative;
label {
display: flex;
align-items: center;
justify-content: center;
border-bottom: 1px solid #eee;
margin-bottom: 24px;
p {
font-size: 16px;
color: #333333;
line-height: 21px;
box-sizing: border-box;
padding-bottom: 24px;
text-align: center;
}
.iconfont {
font-size: 14px;
color: #5088FF;
line-height: 16px;
text-align: right;
position: absolute;
right: 16px;
top: 16px;
}
}
.title {
font-size: 16px;
color: #333333;
line-height: 21px;
border-bottom: 1px solid #eee;
padding-bottom: 24px;
margin-bottom: 17px;
}
.img {
display: flex;
span {
font-size: 14px;
color: #999999;
line-height: 19px;
}
img {
width: 319px;
height: 179px;
border-radius: 1px;
}
}
}
}
</style>

View File

@@ -0,0 +1,221 @@
<template>
<ai-list class="news-list">
<ai-title slot="title" title="新闻中心" isShowBottomBorder/>
<template slot="content">
<ai-search-bar>
<template slot="left">
<el-dropdown @visible-change="v=>isClick=v" @command="addNews"
v-if="permissions('app_appnews_edit')">
<el-button type="primary" icon="iconfont iconAdd" size="small">发布新闻
<i class="el-icon--right" :class="dropIcon"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="video">发布视频</el-dropdown-item>
<el-dropdown-item command="article">发布文章</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<template slot="right">
<el-input
v-model="searchObj.title"
size="small"
placeholder="搜索标题"
clearable
@change="page.current = 1, getList()"
suffix-icon="iconfont iconSearch"/>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
stripe
:current.sync="page.current"
:size.sync="page.size"
:dict="dict"
@getList="getList">
<el-table-column slot="title" label="标题" width="280" align="left" show-overflow-tooltip>
<template slot-scope="{ row }">
<span style="color: #2266FF;margin-right:40px;" v-if="row.isTop == 1">[置顶]</span>
<span>{{ row.title }}</span>
</template>
</el-table-column>
<el-table-column slot="options" label="操作" fixed="right" width="260" align="center">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" title="取消发布" v-if="+row.status" @click="changeStatus(row)">取消发布</el-button>
<el-button type="text" v-else title="发布" @click="changeStatus(row)">发布</el-button>
<el-button type="text" @click="handleEdit(row)" v-if="permissions('app_appnews_edit')">编辑
</el-button>
<el-button type="text" @click="handleDelete(row)" v-if="permissions('app_appnews_del')">删除
</el-button>
<el-button type="text" @click="handleCopyShare(row)">小程序链接</el-button>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</template>
<script>
import moment from "dayjs"
export default {
name: "newsList",
props: {
instance: Function,
dict: Object,
permissions: Function,
areaId: String
},
data() {
return {
tableData: [],
total: 0,
isClick: false,
page: {
current: 1,
size: 10
},
searchObj: {
title: '',
type: ''
},
}
},
computed: {
colConfigs() {
return [
{slot: 'title', label: '标题', width: 280},
{
prop: 'viewCount', label: '浏览/播放量', align: "center", width: 100,
render: (h, {row}) => {
return h('span', null, row.viewCount >= 10000 ? ((row.viewCount / 10000).toFixed(2) + '万') : row.viewCount)
}
},
{prop: 'createUserName', label: '发布人'},
{prop: 'createTime', label: '发布时间'},
{
prop: 'status', label: '发布状态', align: 'center',
render: (h, {row}) => {
return h('span', {
style: {
color: row.status ? this.dict.getColor('appNewsStatus', row.status) : 'auto'
}
}, this.dict.getLabel('appNewsStatus', row.status))
}
},
{slot: 'options', label: '操作'}
]
},
dropIcon() {
return this.isClick ? 'el-icon-arrow-up' : 'el-icon-arrow-down'
},
},
methods: {
/**
* 编辑
* */
handleEdit(row) {
if (+row.type) {
this.$emit("goPage", {key: "addVideo", row});
} else {
this.$emit("goPage", {key: "addArticle", row});
}
},
/**
* 修改新闻中心状态-发布、取消发布
* */
changeStatus(row) {
const msg = +row.status ? "是否取消发布" : "是否发布";
this.$confirm(msg).then(() => this.changeInfo(row));
},
/**
* 删除新闻
* */
handleDelete({id}) {
this.$confirm("是否要删除").then(() => this.deleteInfo(id));
},
resetSearch() {
this.searchObj.title = "";
this.searchObj.type = "";
this.getList();
},
/**
* 添加新闻、视频
* */
addNews(command) {
switch (command) {
case "video":
this.$emit('goPage', {key: "addVideo"});
break;
case "article":
this.$emit('goPage', {key: "addArticle"});
break;
}
},
/**
* 修改发布状态
* */
changeInfo({id, status}) {
const msg = +status ? "取消发布成功" : "发布成功";
status = +status ? 0 : 1;
this.instance.post(`/app/appnews/setStatus?id=${id}&status=${status}`).then(() => {
this.$message.success(msg);
this.getList();
})
},
/**
* 删除新闻
* @param id
*/
deleteInfo(id) {
this.instance.post(`/app/appnews/delete?ids=${id}`).then(() => {
this.$message.success("删除成功");
this.getList();
})
},
getList() {
this.instance.post(`/app/appnews/list`, null, {
params: {
...this.page,
...this.searchObj,
areaId: this.areaId
}
}).then(res => {
if (res?.data) {
this.tableData = res.data.records.map(e => {
return {
...e,
createTime: +e.status ? moment(e.createTime).format("YYYY-MM-DD HH:mm") : ''
}
});
this.total = res.data.total;
}
})
},
handleCopyShare(row) {
navigator.clipboard.writeText(`/pages/newsList/detail?id=${row.id}`)
this.$message.success("小程序链接已复制!")
}
},
created() {
this.getList()
},
}
</script>
<style lang="scss" scoped>
.news-list {
height: 100%;
overflow: auto;
background: #f3f6f9;
::v-deep.has-gutter th:nth-child(1) div {
margin-left: 40px;
}
}
</style>

View File

@@ -0,0 +1,90 @@
<template>
<ai-detail class="video-detail">
<template slot="title">
<ai-title title="视频新闻详情" isShowBack isShowBottomBorder @onBackClick="$emit('goBack')"/>
</template>
<template slot="content">
<ai-card title="视频信息">
<template slot="right">
<el-button type="text" icon="iconfont iconEdit" @click="handleEdit">修改</el-button>
</template>
<template #content>
<ai-wrapper
:columnsNumber="1">
<ai-info-item label="标题:" :value="detail.title"></ai-info-item>
<ai-info-item label="类型:"
:value="dict.getLabel('newsCenterPolicyType', + detail.policyType)"></ai-info-item>
<ai-info-item label="视频:" isLine>
<video :src="detail.videoFile && detail.videoFile.url"
style="width: 100%; height:100%; object-fit: fill;" muted controls="controls"></video>
</ai-info-item>
<ai-info-item label="封面:" isLine v-viewer>
<img :src="detail.videoFile && detail.coverFile.url" alt="">
</ai-info-item>
</ai-wrapper>
</template>
</ai-card>
</template>
</ai-detail>
</template>
<script>
import Viewer from 'v-viewer';
export default {
name: "videoDetail",
components: {Viewer},
props: {
instance: Function,
dict: Object,
},
data() {
return {
detail: {}
}
},
methods: {
handleEdit() {
this.$emit("goPage", {key: "addVideo", row: this.detail});
},
/**
* 根据id查询详情
*/
getDetail() {
let {id} = this.$route.query
this.instance.post(`/app/appnews/getById`, null, {
params: {id}
}).then(res => {
if (res?.data) {
this.detail = res.data;
}
})
}
},
created() {
this.getDetail();
}
}
</script>
<style lang="scss" scoped>
.video-detail {
height: 100%;
overflow: hidden;
video {
width: 640px;
height: 360px;
background: rgba(0, 0, 0, 0.5);
border-radius: 2px;
border: 1px solid #D0D4DC;
}
img {
width: 319px;
height: 179px;
border-radius: 1px;
}
}
</style>

View File

@@ -1,89 +1,35 @@
<template>
<section class="AppPortalAccount">
<ai-list>
<ai-title slot="title" title="用户账号" isShowBottomBorder/>
<template #content>
<ai-search-bar>
<template #left>
<ai-select v-model="search.enterpriseStatus" :selectList="dict.getDict('enterpriseStatus')"
placeholder="认证状态"/>
<ai-select v-model="search.status" :selectList="dict.getDict('portalUserStatus')" placeholder="账号状态"/>
</template>
<template #right>
<el-input size="small" placeholder="搜索姓名、手机号" v-model="search.name" clearable
@change="page.current=1,getTableData()"/>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="options" label="操作" fixed="right" align="center">
<template slot-scope="{row}">
<el-button v-if="row.status==0" type="text" @click="handleEnable(row)">启用</el-button>
<el-button v-else-if="row.status==1" type="text" @click="handleEnable(row)">禁用</el-button>
<el-button type="text">详情</el-button>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
<component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
</section>
</template>
<script>
import PaList from "./paList";
import PaDetail from "./paDetail";
export default {
name: "AppPortalAccount",
components: {PaDetail, PaList},
label: "用户账号(经营主体)",
props: {
instance: Function,
dict: Object,
permissions: Function
},
data() {
return {
search: {name: "",},
page: {current: 1, size: 10, total: 0},
tableData: [],
colConfigs: [
{label: "用户账号", prop: "phone"},
{label: "企业注册数量", prop: ""},
{label: "认证状态", prop: ""},
{label: "注册时间", prop: ""},
{label: "账号状态", prop: ""},
{slot: "options"}
]
}
},
methods: {
getTableData() {
this.instance.post("/appportaluser/list", null, {
params: {...this.page, ...this.search}
}).then(res => {
if (res?.data) {
this.tableData = res.data?.records
this.page.total = res.data.total
}
})
},
handleEnable(row) {
let status = (++row.status) % 2
this.$confirm(`是否要${this.dict.getLabel('status', status)}账号?`).then(() => {
this.instance.post("/appportaluser/addOrUpdate", {...row, status}).then(res => {
if (res?.code == 0) {
this.$message.success(this.dict.getLabel('status', status) + "成功!")
this.getTableData()
}
})
}).catch(() => 0)
computed: {
currentComponent() {
return !!this.$route.query.id ? PaDetail : PaList
}
},
created() {
this.dict.load("portalUserStatus", "enterpriseStatus")
this.getTableData()
this.dict.load("portalUserStatus", "enterpriseStatus", "userEnterpriseStatus","enterpriseType")
}
}
</script>
<style lang="scss" scoped>
.AppPortalAccount {
height: 100%;
}
</style>

View File

@@ -0,0 +1,74 @@
<template>
<section class="paDetail">
<ai-detail>
<ai-title slot="title" title="用户详情" isShowBottomBorder isShowBack @onBackClick="$router.push({query:{}})"/>
<template #content>
<el-form size="small" label-width="160px">
<ai-card title="基本信息">
<template #content>
<el-form-item label="用户账号">{{ detail.phone }}</el-form-item>
<el-form-item label="注册时间">{{ detail.createTime }}</el-form-item>
</template>
</ai-card>
<ai-card title="企业信息">
<template #content>
<ai-table :tableData="detail.userEnterpriseList" :colConfigs="colConfigs" :dict="dict"
:isShowPagination="false">
<el-table-column slot="options" label="操作" align="center">
<template slot-scope="{row}">
<el-button type="text"
@click="$router.push({name:'973f0339e5904d99bc8afe86b8cf4e9c',query:{id:row.id}})">详情
</el-button>
</template>
</el-table-column>
</ai-table>
</template>
</ai-card>
</el-form>
</template>
</ai-detail>
</section>
</template>
<script>
export default {
name: "paDetail",
props: {
instance: Function,
dict: Object,
permissions: Function
},
data() {
return {
detail: {},
colConfigs: [
{label: "企业名称", prop: "enterpriseName"},
{label: "企业类型", prop: "enterpriseType", dict: "enterpriseType", align: "center"},
{label: "状态", prop: "status", dict: "enterpriseStatus", align: "center"},
{slot: "options"},
]
}
},
methods: {
getDetail() {
let {id} = this.$route.query
this.instance.post("/appportaluser/queryDetailByPortalUserId", null, {
params: {id}
}).then(res => {
if (res?.data) {
this.detail = res.data
}
})
},
},
created() {
this.getDetail()
}
}
</script>
<style lang="scss" scoped>
.paDetail {
height: 100%;
}
</style>

View File

@@ -0,0 +1,92 @@
<template>
<section class="paList">
<ai-list>
<ai-title slot="title" title="用户账号" isShowBottomBorder/>
<template #content>
<ai-search-bar>
<template #left>
<ai-select v-model="search.userEnterpriseStatus" :selectList="dict.getDict('userEnterpriseStatus')"
placeholder="认证状态" @change="page.current=1,getTableData()"/>
<ai-select v-model="search.status" :selectList="dict.getDict('portalUserStatus')" placeholder="账号状态"
@change="page.current=1,getTableData()"/>
</template>
<template #right>
<el-input size="small" placeholder="搜索用户账号" v-model="search.phone" clearable
@change="page.current=1,getTableData()"/>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="options" label="操作" fixed="right" align="center">
<template slot-scope="{row}">
<el-button v-if="row.status==0" type="text" @click="handleEnable(row)">启用</el-button>
<el-button v-else-if="row.status==1" type="text" @click="handleEnable(row)">禁用</el-button>
<el-button type="text" @click="showDetail(row.id)">详情</el-button>
</template>
</el-table-column>
</ai-table>
</template>
</ai-list>
</section>
</template>
<script>
export default {
name: "paList",
props: {
instance: Function,
dict: Object,
permissions: Function
},
data() {
return {
search: {name: "",},
page: {current: 1, size: 10, total: 0},
tableData: [],
colConfigs: [
{label: "用户账号", prop: "phone"},
{label: "企业注册数量", prop: "enterpriseNumber", align: "center"},
{label: "认证状态", prop: "userEnterpriseStatus", dict: "userEnterpriseStatus", align: "center"},
{label: "注册时间", prop: "createTime"},
{label: "账号状态", prop: "status", dict: "portalUserStatus", align: "center"},
{slot: "options"}
]
}
},
methods: {
getTableData() {
this.instance.post("/appportaluser/listPortalUser", null, {
params: {...this.page, ...this.search}
}).then(res => {
if (res?.data) {
this.tableData = res.data?.records
this.page.total = res.data.total
}
})
},
handleEnable(row) {
let status = (Number(row.status) + 1) % 2
this.$confirm(`是否要${this.dict.getLabel('portalUserStatus', status)}账号?`).then(() => {
this.instance.post("/appportaluser/addOrUpdate", {...row, status}).then(res => {
if (res?.code == 0) {
this.$message.success(this.dict.getLabel('portalUserStatus', status) + "成功!")
this.getTableData()
}
})
}).catch(() => 0)
},
showDetail(id) {
this.$router.push({query: {id}})
}
},
created() {
this.getTableData()
}
}
</script>
<style lang="scss" scoped>
.paList {
height: 100%;
}
</style>

View File

@@ -34,5 +34,6 @@ export default {
<style lang="scss" scoped>
.AppPortalUser {
height: 100%;
}
</style>

View File

@@ -76,7 +76,6 @@ export default {
},
},
created() {
this.dict.load("auditStatus")
this.getDetail()
}
}

View File

@@ -34,5 +34,6 @@ export default {
<style lang="scss" scoped>
.AppPortalUserManager {
height: 100%;
}
</style>

View File

@@ -63,7 +63,7 @@ export default {
methods: {
getTableData() {
this.instance.post("/appportaluserenterprise/list", null, {
params: {...this.page, ...this.search}
params: {...this.page, ...this.search, enterpriseStatus: 0}
}).then(res => {
if (res?.data) {
this.tableData = res.data?.records

View File

@@ -33,5 +33,6 @@ export default {
<style lang="scss" scoped>
.AppFinanceProduct {
height: 100%;
}
</style>

View File

@@ -84,7 +84,7 @@ export default {
return this.detail.status == "0"
},
isAdmin() {
return this.user.financeUser.type == 1
return this.user?.financeUser?.userRole == 1
}
},
data() {

View File

@@ -1,5 +1,5 @@
<template>
<section class="AppLoadAudit">
<section class="AppLoanAudit">
<component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
</section>
</template>
@@ -10,7 +10,7 @@ import LoanDetail from "./loanDetail";
import LoanList from "./loanList";
export default {
name: "AppLoadAudit",
name: "AppLoanAudit",
components: {LoanList, LoanDetail},
label: "贷款审核",
props: {
@@ -24,12 +24,13 @@ export default {
}
},
created() {
this.dict.load("productRepaymentTimeline","financialFundPurpose")
this.dict.load("productRepaymentTimeline", "financialFundPurpose", "enterpriseAuditStatus", "financialLoanApplyStatus")
}
}
</script>
<style lang="scss" scoped>
.AppLoadAudit {
.AppLoanAudit {
height: 100%;
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<section class="loanDetail">
<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>
<el-button v-if="isAuthing" type="primary" @click="dialog=true">审核</el-button>
</template>
@@ -11,15 +11,27 @@
<ai-card title="贷款申请">
<template #content>
<el-row type="flex" class="flexWrap">
<el-form-item label="产品名称">{{ detail.productName }}
<el-link @click="$router.push({name:'',query:{id:detail.productId}})"> 产品详情</el-link>
<el-form-item label="产品名称">
<el-row type="flex">
{{ detail.productName }}
<el-link type="primary"
@click="$router.push({name:'27338cb83e77461dbd44356a6760df84',query:{id:detail.productId}})">
产品详情
</el-link>
</el-row>
</el-form-item>
<el-form-item label="贷款银行">{{ detail.organizationName }}</el-form-item>
<el-form-item label="贷款金额">{{ detail.loanAmount }}</el-form-item>
<el-form-item label="期望使用期限">{{ dict.getLabel('productRepaymentTimeline', detail.hopeLifespan) }}
</el-form-item>
<el-form-item label="企业主体">{{ detail.enterpriseName }}
<el-link @click="$router.push({name:'',query:{id:detail.enterpriseId}})">企业详情</el-link>
<el-form-item label="企业主体">
<el-row type="flex">
{{ detail.enterpriseName }}
<el-link type="primary"
@click="$router.push({name:'973f0339e5904d99bc8afe86b8cf4e9c',query:{id:detail.enterpriseId}})">
企业详情
</el-link>
</el-row>
</el-form-item>
<el-form-item label="资金用途">{{ dict.getLabel('financialFundPurpose', detail.fundPurpose) }}
</el-form-item>
@@ -55,11 +67,11 @@
<ai-dialog :visible.sync="dialog" title="审批" @closed="form={}" @onConfirm="submitAudit" width="560px">
<el-form :model="form" :rules="rules" ref="AuditForm" size="small" label-width="120px">
<el-form-item label="审批结果" prop="auditStatus">
<ai-select v-model="form.auditStatus" :selectList="dict.getDict('auditStatus')"/>
<ai-select v-model="form.auditStatus" :selectList="dict.getDict('enterpriseAuditStatus')"/>
</el-form-item>
<template>
<el-form-item label="放款金额(万)" prop="auditDescription">
<el-input v-model="form.auditDescription" placeholder="请输入"/>
<template v-if="form.auditStatus==1">
<el-form-item label="放款金额(万)" prop="amount">
<el-input v-model="form.amount" placeholder="请输入"/>
</el-form-item>
<el-form-item label="使用期限" prop="auditLifespan">
<ai-select v-model="form.auditLifespan" placeholder="请选择"
@@ -69,8 +81,8 @@
<el-date-picker v-model="form.loanDate" placeholder="请选择" clearable/>
</el-form-item>
</template>
<el-form-item label="审批意见" prop="auditDescription">
<el-input type="textarea" v-model="form.auditDescription" placeholder="请输入"/>
<el-form-item v-else-if="form.auditStatus==0" label="审批意见" prop="remark">
<el-input type="textarea" v-model="form.remark" placeholder="请输入"/>
</el-form-item>
</el-form>
</ai-dialog>
@@ -96,7 +108,13 @@ export default {
detail: {},
form: {},
rules: {
auditStatus: [{required: true, message: "请选择审批结果"}]
auditStatus: [{required: true, message: "请选择 审批结果"}],
amount: [
{required: true, message: "请输入 放款金额"},
{pattern: /\d+/, message: "请输入 正确的放款金额"},
],
auditLifespan: [{required: true, message: "请选择 使用期限"}],
loanDate: [{required: true, message: "请选择 放款日期"}],
}
}
},
@@ -115,7 +133,7 @@ export default {
this.$refs.AuditForm.validate(v => {
if (v) {
let {id} = this.detail
this.instance.post("/appfinancialloanapply/auditEnterprise", null, {
this.instance.post("/appfinancialloanapply/auditLoanApply", null, {
params: {id, ...this.form}
}).then(res => {
if (res?.code == 0) {
@@ -144,7 +162,15 @@ export default {
.el-form-item {
width: 50%;
.el-link {
margin-left: 16px;
}
}
}
.el-date-editor {
width: 100%;
}
}
</style>

View File

@@ -5,15 +5,14 @@
<template #content>
<ai-search-bar>
<template #left>
<ai-select v-model="search.status" :selectList="dict.getDict('status')" placeholder="审批状态"
<ai-select v-model="search.status" :selectList="dict.getDict('financialLoanApplyStatus')" placeholder="审批状态"
@change="page.current=1,getTableData()"/>
<ai-search label="申请时间">
<el-date-picker size="small" v-model="search.applyTime" type="daterange"
@change="page.current=1,getTableData()"/>
<el-date-picker size="small" v-model="search.applyTime" type="daterange" @change="handleFilterApplyTime"/>
</ai-search>
</template>
<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()"/>
</template>
</ai-search-bar>
@@ -50,13 +49,13 @@ export default {
tableData: [],
colConfigs: [
{label: "产品名称", prop: "productName"},
{label: "企业名称", prop: "enterpriseName"},
{label: "企业主体", prop: "enterpriseName"},
{label: "贷款金额(万)", prop: "loanAmount"},
{label: "申请时间", prop: "createTime"},
{label: "联系人", prop: "name"},
{label: "联系方式", prop: "phone"},
{label: "贷款银行", prop: "organizationName"},
{label: "状态", prop: "status"},
{label: "状态", prop: "status", align: "center", dict: "financialLoanApplyStatus"},
{slot: "options"}
]
}
@@ -74,6 +73,12 @@ export default {
},
showDetail(id) {
this.$router.push({query: {id}})
},
handleFilterApplyTime() {
this.page.current = 1
this.search.applyStartDate = this.search.applyTime?.[0]
this.search.applyEndDate = this.search.applyTime?.[1]
this.getTableData()
}
},
created() {

View File

@@ -23,16 +23,14 @@ export default {
return !!this.$route.query.id ? NeedsDetail : NeedsList
}
},
data() {
return {}
},
created() {
this.dict.load("enterpriseName")
this.dict.load("productRepaymentTimeline", "financialFundPurpose")
}
}
</script>
<style lang="scss" scoped>
.AppFinancingNeeds {
height: 100%;
}
</style>

View File

@@ -3,8 +3,8 @@
<ai-detail>
<ai-title slot="title" title="融资详情" isShowBottomBorder isShowBack @onBackClick="$router.push({query:{}})">
<template #rightBtn>
<el-button type="danger" @click="handleCancel">取消发布</el-button>
<el-button type="primary" @click="handleGrab">抢单</el-button>
<el-button v-if="isFinanceUser" type="primary" @click="handleGrab">抢单</el-button>
<el-button v-else type="danger" @click="handleCancel">取消发布</el-button>
</template>
</ai-title>
<template #content>
@@ -12,17 +12,23 @@
<ai-card title="融资需求">
<template #content>
<el-row type="flex" class="flexWrap">
<el-form-item label="意向金额">{{ detail.enterpriseName }}</el-form-item>
<el-form-item label="期望使用期限">{{ detail.enterpriseName }}</el-form-item>
<el-form-item label="资金用途">{{ detail.unifiedCode }}</el-form-item>
<el-form-item label="意向金额">{{ detail.loanAmount }}</el-form-item>
<el-form-item label="期望使用期限">{{
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="联系人">{{ dict.getLabel('enterpriseType', detail.enterpriseType) }}</el-form-item>
<el-form-item label="所在地区">{{ detail.address }}</el-form-item>
<el-form-item label="联系人">{{ detail.createUserName }}</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.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-form-item label="备注">{{ detail.operationPeriod }}</el-form-item>
<el-form-item label="备注">{{ detail.remark }}</el-form-item>
</template>
</ai-card>
</el-form>
@@ -32,6 +38,8 @@
</template>
<script>
import {mapState} from "vuex";
export default {
name: "needsDetail",
props: {
@@ -39,20 +47,21 @@ export default {
dict: Object,
permissions: Function
},
computed: {
...mapState(['user']),
isFinanceUser() {
return !!this.user.financeUser?.id
}
},
data() {
return {
dialog: false,
detail: {},
form: {},
rules: {
auditStatus: [{required: true, message: "请选择审批结果"}]
}
}
},
methods: {
getDetail() {
let {id} = this.$route.query
this.instance.post("/appportaluserenterprise/queryDetailById", null, {
this.instance.post("/appfinancingdemand/queryDetailById", null, {
params: {id}
}).then(res => {
if (res?.data) {
@@ -61,16 +70,29 @@ export default {
})
},
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: "27338cb83e77461dbd44356a6760df86"})
}
})
},
handleCancel() {
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)
}
},
created() {
this.dict.load("auditStatus")
this.getDetail()
}
}

View File

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

View File

@@ -23,16 +23,14 @@ export default {
return !!this.$route.query.id ? GrabDetail : GrabList
}
},
data() {
return {}
},
created() {
this.dict.load("enterpriseName")
this.dict.load("financingDemandStatus", "productRepaymentTimeline", "financialFundPurpose")
}
}
</script>
<style lang="scss" scoped>
.AppGrabLog {
height: 100%;
}
</style>

View File

@@ -1,8 +1,8 @@
<template>
<section class="grabDetail">
<ai-detail>
<ai-title slot="title" title="融资详情" isShowBottomBorder isShowBack @onBackClick="$router.push({query:{}})">
<template #rightBtn>
<ai-title slot="title" title="融资详情" isShowBottomBorder isShowBack @onBackClick="back">
<template v-if="isFinanceUser" #rightBtn>
<el-button type="danger" @click="handleCancel">回退订单</el-button>
<el-button type="primary" @click="dialog=true">放款</el-button>
</template>
@@ -12,29 +12,37 @@
<ai-card title="融资需求">
<template #content>
<el-row type="flex" class="flexWrap">
<el-form-item label="意向金额">{{ detail.enterpriseName }}</el-form-item>
<el-form-item label="期望使用期限">{{ detail.enterpriseName }}</el-form-item>
<el-form-item label="资金用途">{{ detail.unifiedCode }}</el-form-item>
<el-form-item label="意向金额">{{ detail.loanAmount }}</el-form-item>
<el-form-item label="期望使用期限">
{{ 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="联系人">{{ dict.getLabel('enterpriseType', detail.enterpriseType) }}</el-form-item>
<el-form-item label="所在地区">{{ detail.address }}</el-form-item>
<el-form-item label="联系人">{{ detail.createUserName }}</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.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-form-item label="备注">{{ detail.operationPeriod }}</el-form-item>
<el-form-item label="备注">{{ detail.remark }}</el-form-item>
</template>
</ai-card>
<ai-card title="融资进度">
<template #content>
<el-row type="flex" class="flexWrap">
<el-form-item label="融资进度">{{ detail.enterpriseName }}</el-form-item>
<el-form-item label="贷款银行">{{ detail.enterpriseName }}</el-form-item>
<el-form-item label="贷款经理">{{ detail.unifiedCode }}</el-form-item>
<el-form-item label="融资进度">{{ dict.getLabel('financingDemandStatus', detail.status) }}</el-form-item>
<el-form-item label="贷款银行">{{ detail.organizationName }}</el-form-item>
<el-form-item label="贷款经理">{{ detail.auditUserName }}</el-form-item>
<el-form-item label="联系方式">{{ detail.phone }}</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.address }}</el-form-item>
<template v-if="detail.status==2">
<el-form-item label="放款金额">{{ detail.auditAmount }}</el-form-item>
<el-form-item label="放款日期">{{ detail.loanDate }}</el-form-item>
<el-form-item label="使用期限">
{{ dict.getLabel('productRepaymentTimeline', detail.auditLifespan) }}
</el-form-item>
</template>
</el-row>
</template>
</ai-card>
@@ -43,14 +51,14 @@
</ai-detail>
<ai-dialog :visible.sync="dialog" title="放款" @closed="form={}" @onConfirm="submitAudit" width="560px">
<el-form :model="form" :rules="rules" ref="AuditForm" size="small" label-width="120px">
<el-form-item label="放款金额(万)" prop="auditStatus">
<el-input v-model="form.auditDescription" placeholder="请输入"/>
<el-form-item label="放款金额(万)" prop="auditAmount">
<el-input v-model="form.auditAmount" placeholder="请输入"/>
</el-form-item>
<el-form-item label="使用期限(月)" prop="auditStatus">
<ai-select v-model="form.auditStatus" :selectList="dict.getDict('auditStatus')"/>
<el-form-item label="使用期限" prop="auditLifespan">
<ai-select v-model="form.auditLifespan" :selectList="dict.getDict('productRepaymentTimeline')"/>
</el-form-item>
<el-form-item label="放款日期" prop="auditStatus">
<el-date-picker v-model="form.time" placeholder="请选择"/>
<el-form-item label="放款日期" prop="loanDate">
<el-date-picker v-model="form.loanDate" placeholder="请选择"/>
</el-form-item>
</el-form>
</ai-dialog>
@@ -58,6 +66,8 @@
</template>
<script>
import {mapState} from "vuex";
export default {
name: "grabDetail",
props: {
@@ -65,20 +75,28 @@ export default {
dict: Object,
permissions: Function
},
computed: {
...mapState(['user']),
isFinanceUser() {
return !!this.user.financeUser?.id
}
},
data() {
return {
dialog: false,
detail: {},
form: {},
rules: {
auditStatus: [{required: true, message: "请选择审批结果"}]
auditAmount: [{required: true, message: "请输入 放款金额"}],
auditLifespan: [{required: true, message: "请选择 使用期限"}],
loanDate: [{required: true, message: "请选择 放款日期"}],
}
}
},
methods: {
getDetail() {
let {id} = this.$route.query
this.instance.post("/appportaluserenterprise/queryDetailById", null, {
this.instance.post("/appfinancingdemand/queryDetailById", null, {
params: {id}
}).then(res => {
if (res?.data) {
@@ -88,14 +106,21 @@ export default {
},
handleCancel() {
this.$confirm("是否要回退本次融资需求订单?").then(() => {
this.instance.post("/appfinancingdemand/cancelObtain", null, {
params: {id: this.detail.id}
}).then(res => {
if (res?.code == 0) {
this.$message.success("回退成功")
this.back()
}
})
}).catch(() => 0)
},
submitAudit() {
this.$refs.AuditForm.validate(v => {
if (v) {
let {id} = this.detail
this.instance.post("/appportaluserenterprise/auditEnterprise", null, {
this.instance.post("/appfinancingdemand/confirmLoan", null, {
params: {id, ...this.form}
}).then(res => {
if (res?.code == 0) {
@@ -106,10 +131,12 @@ export default {
})
}
})
},
back() {
this.$router.push({})
}
},
created() {
this.dict.load("auditStatus")
this.getDetail()
}
}

View File

@@ -5,14 +5,14 @@
<template #content>
<ai-search-bar>
<template #left>
<ai-select placeholder="订单状态" v-model="search.status" @change="page.current=1,getTableData()"/>
<ai-select placeholder="订单状态" v-model="search.status" @change="page.current=1,getTableData()"
:selectList="dict.getDict('financingDemandStatus')"/>
<ai-search label="申请时间">
<el-date-picker size="small" v-model="search.applyTime" type="daterange"
@change="page.current=1,getTableData()"/>
<el-date-picker size="small" v-model="search.applyTime" type="daterange" @change="handleFilterApplyTime"/>
</ai-search>
</template>
<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()"/>
</template>
</ai-search-bar>
@@ -49,23 +49,24 @@ export default {
tableData: [],
colConfigs: [
{label: "企业名称", prop: "enterpriseName"},
{label: "意向金额(万)", prop: "legalPersonName"},
{label: "申请时间", prop: "legalPersonName"},
{label: "联系人", prop: "phone"},
{label: "意向金额(万)", prop: "loanAmount"},
{label: "申请时间", prop: "createTime"},
{label: "联系人", prop: "name"},
{label: "联系方式", prop: "phone"},
{label: "客户经理", prop: "phone"},
{label: "贷款银行", prop: "phone"},
{label: "放款金额", prop: "phone"},
{label: "状态", prop: "status"},
{label: "备注", prop: "loginAccount"},
{label: "客户经理", prop: "auditUserName"},
{label: "贷款银行", prop: "organizationName"},
{label: "放款金额", prop: "auditAmount"},
{label: "状态", prop: "status", dict: "financingDemandStatus"},
{label: "备注", prop: "remark"},
{slot: "options"}
]
}
},
methods: {
getTableData() {
this.instance.post("/appportaluserenterprise/list", null, {
params: {...this.page, ...this.search, status: 1}
let status = this.search.status || 999
this.instance.post("/appfinancingdemand/list", null, {
params: {...this.page, ...this.search, organizationId: this.user.financeUser?.organizationId, status}
}).then(res => {
if (res?.data) {
this.tableData = res.data?.records
@@ -75,12 +76,16 @@ export default {
},
showDetail(id) {
this.$router.push({query: {id}})
},
handleFilterApplyTime() {
this.page.current = 1
this.search.createTimeStart = this.search.applyTime?.[0]
this.search.createTimeEnd = this.search.applyTime?.[1]
this.getTableData()
}
},
created() {
this.dict.load("enterpriseName")
this.getTableData()
this.search.areaId = this.user.info.areaId
}
}
</script>