Commit 94fdd0de authored by 黎博's avatar 黎博

20200709-KA联调平台功能迭代需求

parent 90fb0861
{
"semi": false,
"singleQuote": true
}
\ No newline at end of file
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
proxyTable: {}, proxyTable: {},
// Various Dev Server settings // Various Dev Server settings
host: '192.168.28.179', // can be overwritten by process.env.HOST host: '0.0.0.0', // can be overwritten by process.env.HOST
port: 9001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 9001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
}, },
"dependencies": { "dependencies": {
"axios": "0.18.0", "axios": "0.18.0",
"element-ui": "2.4.6", "element-ui": "2.13.2",
"js-cookie": "2.2.0", "js-cookie": "2.2.0",
"mockjs": "1.0.1-beta3", "mockjs": "1.0.1-beta3",
"moment": "^2.24.0", "moment": "^2.24.0",
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
"nprogress": "0.2.0", "nprogress": "0.2.0",
"vue": "2.5.17", "vue": "2.5.17",
"vue-router": "3.0.1", "vue-router": "3.0.1",
"vuex": "3.0.1" "vuex": "3.0.1",
"xlsx": "^0.16.4"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "8.5.0", "autoprefixer": "8.5.0",
......
import request from '@/utils/request' import request from '@/utils/request'
import xlsx from 'xlsx'
export function getChannels(data) { export function getChannels(data) {
return request({ return request({
...@@ -34,3 +35,24 @@ export function getChannelDetail(query) { ...@@ -34,3 +35,24 @@ export function getChannelDetail(query) {
params: query params: query
}) })
} }
export function exportExcel(postfix, data) {
const now = new Date()
const year = now.getFullYear()
const month = now.getMonth() + 1
const day = now.getDate()
const filename = year + '-' + month + '-' + day + '-' + postfix
// const worksheet = xlsx.utils.aoa_to_sheet(data)
const worksheet = xlsx.utils.json_to_sheet(data)
const newWorkbook = xlsx.utils.book_new()
xlsx.utils.book_append_sheet(newWorkbook, worksheet, 'SheetJS')
xlsx.writeFile(newWorkbook, filename + '.xlsx')
}
export function getChannelConf(params) {
return request({
url: '/channel/conf/export',
method: 'get',
params
})
}
import request from '@/utils/request'
export function getCustomerApplyInfo(params) {
return request({
url: '/customer/apply/info',
method: 'get',
params
})
}
...@@ -26,6 +26,7 @@ import '@/permission' // permission control ...@@ -26,6 +26,7 @@ import '@/permission' // permission control
// import '../mock' // simulation data // import '../mock' // simulation data
Vue.use(ElementUI, { locale }) Vue.use(ElementUI, { locale })
Vue.prototype.$message = ElementUI.Message
Vue.config.productionTip = false Vue.config.productionTip = false
......
...@@ -87,6 +87,18 @@ export const constantRouterMap = [ ...@@ -87,6 +87,18 @@ export const constantRouterMap = [
component: () => import('@/views/dashboard/index') component: () => import('@/views/dashboard/index')
}] }]
}, },
{
path: '/search',
component: Layout,
children: [
{
path: '',
name: 'search',
component: () => import('@/views/search/index'),
meta: { title: '用户查询', icon: 'nested' }
}
]
},
{ path: '*', redirect: '/404', hidden: true } { path: '*', redirect: '/404', hidden: true }
] ]
......
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container" style="padding-bottom:20px"> <div class="filter-container" style="padding-bottom:20px">
<el-input v-permission="['admin','operator']" v-model="listQuery.channelId" placeholder="渠道号" clearable style="width: 200px;" class="filter-item" @keyup.enter.native="getChannels"/> <el-input
<el-select v-permission="['channel']" v-model="listQuery.channelId" placeholder="渠道" clearable style="width: 200px" class="filter-item" > v-permission="['admin','operator']"
<el-option v-for="item in channels" :key="item.channelId" :label="item.channelName" :value="item.channelId"/> v-model="listQuery.channelId"
placeholder="渠道号"
clearable
style="width: 200px;"
class="filter-item"
@keyup.enter.native="getChannels"
/>
<el-select
v-permission="['channel']"
v-model="listQuery.channelId"
placeholder="渠道"
clearable
style="width: 200px"
class="filter-item"
>
<el-option
v-for="item in channels"
:key="item.channelId"
:label="item.channelName"
:value="item.channelId"
/>
</el-select> </el-select>
<el-input v-permission="['admin','operator']" v-model="listQuery.channelName" placeholder="渠道名称" clearable style="width: 200px;" class="filter-item" @keyup.enter.native="getChannels"/> <el-input
v-permission="['admin','operator']"
v-model="listQuery.channelName"
placeholder="渠道名称"
clearable
style="width: 200px;"
class="filter-item"
@keyup.enter.native="getChannels"
/>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getChannels">查询</el-button> <el-button class="filter-item" type="primary" icon="el-icon-search" @click="getChannels">查询</el-button>
<el-button v-permission="['admin','operator']" :disabled="!createBool" class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="handleCreate">添加</el-button> <el-button
v-permission="['admin','operator']"
:disabled="!createBool"
class="filter-item"
style="margin-left: 10px;"
type="primary"
icon="el-icon-edit"
@click="handleCreate"
>添加</el-button>
</div> </div>
<el-table <el-table
...@@ -19,15 +55,26 @@ ...@@ -19,15 +55,26 @@
size="medium" size="medium"
fit fit
highlight-current-row highlight-current-row
style="" style
@current-change="handleCurrentChange"> @current-change="handleCurrentChange"
>
<el-table-column label="ID" type="index" align="center" width="65" />
<el-table-column label="ID" type="index" align="center" width="65"/> <el-table-column sortable label="渠道号" prop="channelId" align="center" />
<el-table-column sortable label="渠道code" prop="channelCode" align="center" />
<el-table-column sortable label="渠道号" prop="channelId" align="center"/> <el-table-column label="渠道名称" prop="channelName" align="center" />
<el-table-column sortable label="渠道code" prop="channelCode" align="center"/> <el-table-column label="创建时间" prop="createdAt" align="center" />
<el-table-column label="渠道名称" prop="channelName" align="center"/> <el-table-column label="操作" align="center">
<el-table-column label="创建时间" prop="createdAt" align="center"/> <template slot-scope="scope">
<el-button
v-permission="['admin','operator']"
type="primary"
icon="el-icon-share"
size="mini"
@click="exportData(scope.row.channelId)"
>导出</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width"> <!-- <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -35,18 +82,26 @@ ...@@ -35,18 +82,26 @@
<el-button v-if="scope.row.status!='deleted'" size="mini" type="danger" @click="handleDelete(scope.row)">删除 <el-button v-if="scope.row.status!='deleted'" size="mini" type="danger" @click="handleDelete(scope.row)">删除
</el-button> </el-button>
</template> </template>
</el-table-column> --> </el-table-column>-->
</el-table> </el-table>
<pagination v-show="createBool && count>0" :total="count" :page.sync="page" :limit.sync="listQuery.pageSize" @pagination="getChannels" /> <pagination
v-show="createBool && count>0"
:total="count"
:page.sync="page"
:limit.sync="listQuery.pageSize"
@pagination="getChannels"
/>
<el-card v-show="channel.addInfo" class="box-card"> <el-card v-show="channel.addInfo" class="box-card">
<el-card
<el-card v-permission="['admin','operator']" class="box-card" style="margin-bottom:20px;float:left;width:45%;margin-right:1%"> v-permission="['admin','operator']"
<div slot="header" > class="box-card"
style="margin-bottom:20px;float:left;width:45%;margin-right:1%"
>
<div slot="header">
<span>基础配置</span> <span>基础配置</span>
</div> </div>
<el-form :inline="true" size="medium" > <el-form :inline="true" size="medium">
<el-form-item label="渠道号" style="width:30%"> <el-form-item label="渠道号" style="width:30%">
<el-input v-model="channel.basicInfo.channelId" :disabled="createBool" /> <el-input v-model="channel.basicInfo.channelId" :disabled="createBool" />
</el-form-item> </el-form-item>
...@@ -60,71 +115,193 @@ ...@@ -60,71 +115,193 @@
<el-form-item label="环境" style="width:30%"> <el-form-item label="环境" style="width:30%">
<el-input v-model="channel.basicInfo.env" /> <el-input v-model="channel.basicInfo.env" />
</el-form-item> </el-form-item>
<el-form-item label="存管资金方" style="width:30%"> <!-- <el-form-item label="存管资金方" style="width:30%">
<el-input v-model="channel.basicInfo.p2pFundId" /> <el-input v-model="channel.basicInfo.p2pFundId" />
</el-form-item> </el-form-item>-->
<el-form-item label="非存管资金方" style="width:30%"> <el-form-item label="资金方ID" style="width:30%">
<el-input v-model="channel.basicInfo.fundId" /> <el-input v-model="channel.basicInfo.fundId" />
</el-form-item> </el-form-item>
<el-form-item label="业务类型" style="width:30%"> <el-form-item label="业务类型" style="width:30%">
<el-input v-model="channel.basicInfo.bizType" /> <el-input v-model="channel.basicInfo.bizType" />
</el-form-item> </el-form-item>
<el-form-item label="授信code" style="width:30%"> <el-form-item label="通知节点" style="width:30%">
<el-input v-model="channel.basicInfo.callbackNoPushProgress" />
</el-form-item>
<el-form-item label="通知节点顺序" style="width:30%">
<el-input v-model="channel.basicInfo.preProgress" />
</el-form-item>
<!-- <el-form-item label="授信code" style="width:30%">
<el-input v-model="channel.basicInfo.authCode" /> <el-input v-model="channel.basicInfo.authCode" />
</el-form-item> </el-form-item>
<el-form-item label="爬虫code" style="width:30%"> <el-form-item label="爬虫code" style="width:30%">
<el-input v-model="channel.basicInfo.riskCode" /> <el-input v-model="channel.basicInfo.riskCode" />
</el-form-item> </el-form-item>-->
</el-form> </el-form>
<el-form size="medium" label-width="50px" > <el-form size="medium" label-width="50px">
<el-form-item label="AES" > <el-form-item label="AES">
<el-input v-model="channel.basicInfo.aesKey" :autosize="{ minRows: 1, maxRows: 4}" type="textarea"/> <el-input
v-model="channel.basicInfo.aesKey"
:autosize="{ minRows: 1, maxRows: 4}"
type="textarea"
/>
</el-form-item> </el-form-item>
<el-form-item label="MD5" > <el-form-item label="MD5">
<el-input v-model="channel.basicInfo.md5Key" :autosize="{ minRows: 1, maxRows: 4}" type="textarea"/> <el-input
v-model="channel.basicInfo.md5Key"
:autosize="{ minRows: 1, maxRows: 4}"
type="textarea"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<!-- <el-card :style="boxStyle" class="box-card" > --> <!-- <el-card :style="boxStyle" class="box-card" > -->
<el-card style="overflow:hidden" class="box-card" > <el-card style="overflow:hidden" class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>渠道自定义配置</span> <span>渠道自定义配置</span>
<!-- <el-button style="float: right; padding: 2px 0" type="text" @click="savevData">保存 </el-button> --> <!-- <el-button style="float: right; padding: 2px 0" type="text" @click="savevData">保存 </el-button> -->
</div> </div>
<el-form size="medium" label-width="130px"> <el-form size="medium" label-width="130px">
<el-form-item label="域名" > <el-form-item label="域名">
<el-input v-model="channel.addInfo.envPath" :disabled="createBool"/> <el-input v-model="channel.addInfo.envPath" :disabled="createBool" />
</el-form-item> </el-form-item>
<el-form-item label="审核状态通知地址" > <el-form-item label="审核状态通知地址">
<el-input v-model="channel.addInfo.approveCallBackUrl" /> <el-input v-model="channel.addInfo.approveCallBackUrl" />
</el-form-item> </el-form-item>
<el-form-item label="订单状态通知地址" > <el-form-item label="订单状态通知地址">
<el-input v-model="channel.addInfo.orderStatusCallBackUrl" /> <el-input v-model="channel.addInfo.orderStatusCallBackUrl" />
</el-form-item> </el-form-item>
<el-form-item label="还款结果通知地址" > <el-form-item label="还款结果通知地址">
<el-input v-model="channel.addInfo.repayResultCallBackUrl" /> <el-input v-model="channel.addInfo.repayResultCallBackUrl" />
</el-form-item> </el-form-item>
<el-form-item label="还款计划通知地址" > <el-form-item label="还款计划通知地址">
<el-input v-model="channel.addInfo.repaymentPlanCallBackUrl" /> <el-input v-model="channel.addInfo.repaymentPlanCallBackUrl" />
</el-form-item> </el-form-item>
<el-form-item label="IP地址" > <el-form-item label="IP地址">
<el-input v-model="channel.addInfo.channelIp" /> <el-input v-model="channel.addInfo.channelIp" />
</el-form-item> </el-form-item>
<el-form-item label="渠道rsa公钥配置">
<el-input v-model="channel.addInfo.publicKey" type="textarea" />
</el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<el-button style="float: right; padding: 20px 0" type="text" @click="savevData">保存</el-button>
</el-card> </el-card>
<!-- 进件项配置 -->
<!-- <el-card v-show="channel.applyConf" class="box-card"> -->
<!-- 进件项配置-1 -->
<!-- <el-card
v-permission="['admin','operator']"
v-show="channel.applyConf.length >= 1"
class="box-card"
style="margin-bottom:20px;float:left;width:45%;margin-right:1%"
>
<div slot="header" class="clearfix">
<span>进件项配置-1</span>
</div>
<el-form size="medium" label-width="130px">
<el-form-item label="地址">
<el-input v-model="firstApplyConf.address" />
</el-form-item>
<el-form-item label="联系人">
<el-input v-model="firstApplyConf.contact" />
</el-form-item>
<el-form-item label="职业">
<el-input v-model="firstApplyConf.occupation" />
</el-form-item>
<el-form-item label="学历">
<el-input v-model="firstApplyConf.education" />
</el-form-item>
<el-form-item label="收入">
<el-input v-model="firstApplyConf.income" />
</el-form-item>
<el-form-item label="email">
<el-input v-model="firstApplyConf.email" />
</el-form-item>
<el-form-item label="ocr">
<el-input v-model="firstApplyConf.ocr" />
</el-form-item>
</el-form>
</el-card>-->
<!-- 进件项配置-2-->
<!-- <el-card v-show="channel.applyConf.length === 2" class="box-card">
<div slot="header" class="clearfix">
<span>进件项配置-2</span>
</div>
<el-form size="medium" label-width="130px">
<el-form-item label="地址">
<el-input v-model="secondApplyConf.address" />
</el-form-item>
<el-form-item label="联系人">
<el-input v-model="secondApplyConf.contact" />
</el-form-item>
<el-form-item label="职业">
<el-input v-model="secondApplyConf.occupation" />
</el-form-item>
<el-form-item label="学历">
<el-input v-model="secondApplyConf.education" />
</el-form-item>
<el-form-item label="收入">
<el-input v-model="secondApplyConf.income" />
</el-form-item>
<el-form-item label="email">
<el-input v-model="secondApplyConf.email" />
</el-form-item>
<el-form-item label="ocr">
<el-input v-model="secondApplyConf.ocr" />
</el-form-item>
</el-form>
</el-card>-->
<el-card class="box-card">
<el-select v-model="confValue" @change="handleConfChange">
<el-option
v-for="item in confOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-card class="conf">
<el-form size="medium" label-width="100px">
<el-form-item label="地址">
<el-input v-model="selectConf.address" />
</el-form-item>
<el-form-item label="联系人">
<el-input v-model="selectConf.contact" />
</el-form-item>
<el-form-item label="职业">
<el-input v-model="selectConf.occupation" />
</el-form-item>
<el-form-item label="学历">
<el-input v-model="selectConf.education" />
</el-form-item>
<el-form-item label="收入">
<el-input v-model="selectConf.income" />
</el-form-item>
<el-form-item label="email">
<el-input v-model="selectConf.email" />
</el-form-item>
<el-form-item label="ocr">
<el-input v-model="selectConf.ocr" />
</el-form-item>
</el-form>
</el-card>
<el-button style="float: right; padding: 20px 0" type="text" @click="savevData">保存</el-button>
</el-card>
<!-- </el-card> -->
</div> </div>
</template> </template>
<script> <script>
import { getChannels, getChannelDetail, saveChannel } from '@/api/channel' import {
getChannels,
getChannelDetail,
saveChannel,
getChannelConf
} from '@/api/channel'
import store from '@/store' import store from '@/store'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import permission from '@/directive/permission/index.js' // 权限判断指令 import permission from '@/directive/permission/index.js' // 权限判断指令
...@@ -140,11 +317,19 @@ export default { ...@@ -140,11 +317,19 @@ export default {
pageSize: 10 pageSize: 10
}, },
channels: [], channels: [],
channel: { basicInfo: {}, addInfo: {}}, channel: { basicInfo: {}, addInfo: {}, applyConf: [] },
firstApplyConf: {},
secondApplyConf: {},
count: 1, count: 1,
page: 1, page: 1,
roles: undefined, roles: undefined,
createBool: true createBool: true,
confOptions: [
{ label: '一推', value: 1 },
{ label: '二推', value: 2 }
],
confValue: 1,
selectConf: {}
} }
}, },
created() { created() {
...@@ -161,42 +346,66 @@ export default { ...@@ -161,42 +346,66 @@ export default {
this.listQuery.pageNumber = this.page - 1 this.listQuery.pageNumber = this.page - 1
// this.channels = [] // this.channels = []
// this.count = 1 // this.count = 1
getChannels(this.listQuery).then(res => { getChannels(this.listQuery)
this.createBool = true .then((res) => {
if (res.data) { this.createBool = true
this.channels = res.data.content if (res.data) {
this.count = res.data.totalElements this.channels = res.data.content
this.$refs.myTable.setCurrentRow(this.channels[0]) this.count = res.data.totalElements
} this.$refs.myTable.setCurrentRow(this.channels[0])
}).catch(() => { }
}) })
.catch(() => {})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.channel = { basicInfo: {}, addInfo: {}} this.channel = { basicInfo: {}, addInfo: {}, applyConf: [] }
if (val) { if (val) {
getChannelDetail({ channelId: val.channelId }).then(res => { getChannelDetail({ channelId: val.channelId }).then((res) => {
if (res.data) { if (res.data) {
this.channel = res.data this.channel = res.data
this.firstApplyConf = this.channel.applyConf[0]
if (this.channel.applyConf.length >= 2) {
this.secondApplyConf = this.channel.applyConf[1]
}
if (this.confValue === 1) {
this.selectConf = this.firstApplyConf
}
if (this.confValue === 2) {
this.selectConf = this.secondApplyConf
}
} }
}) })
} }
}, },
boxStyle() { boxStyle() {
const boxStyle = this.roles.include('admin') ? { width: '54%' } : { width: '100%' } const boxStyle = this.roles.include('admin')
? { width: '54%' }
: { width: '100%' }
return boxStyle return boxStyle
}, },
handleCreate() { handleCreate() {
this.createBool = false this.createBool = false
this.channel = { basicInfo: {}, addInfo: {}} this.channel = { basicInfo: {}, addInfo: {}, applyConf: [] }
this.selectConf = {}
this.firstApplyConf = {}
this.secondApplyConf = {}
}, },
savevData() { savevData() {
if (this.roles.includes('channel')) { if (this.roles.includes('channel')) {
this.channel.basicInfo = { channelId: this.channel.basicInfo.channelId } this.channel.basicInfo = { channelId: this.channel.basicInfo.channelId }
} }
// 一推选项不为空
if (Object.keys(this.firstApplyConf).length !== 0) {
this.channel.applyConf.push(this.firstApplyConf)
}
// 二推选项不为空
if (Object.keys(this.secondApplyConf).length !== 0) {
this.channel.applyConf.push(this.secondApplyConf)
}
saveChannel(this.channel).then(() => { saveChannel(this.channel).then(() => {
this.$notify({ this.$notify({
title: '成功', title: '成功',
...@@ -207,6 +416,40 @@ export default { ...@@ -207,6 +416,40 @@ export default {
this.handleCurrentChange(this.channel.basicInfo) this.handleCurrentChange(this.channel.basicInfo)
this.getChannels() this.getChannels()
}) })
},
// 配置项变更
handleConfChange() {
if (this.confValue === 1) {
this.selectConf = this.firstApplyConf
}
if (this.confValue === 2) {
this.selectConf = this.secondApplyConf
}
},
// 下载文件
download: function(filename, text) {
var element = document.createElement('a')
element.setAttribute(
'href',
'data:text/plain;charset=utf-8,' + encodeURIComponent(text)
)
element.setAttribute('download', filename)
element.style.display = 'none'
document.body.appendChild(element)
element.click()
document.body.removeChild(element)
},
// 导出数据
exportData(channelId) {
getChannelConf({ channelId: channelId }).then((res) => {
const now = new Date()
const year = now.getFullYear()
const month = now.getMonth() + 1
const day = now.getDate()
const filename =
year + '-' + month + '-' + day + '-' + channelId + '.sql'
this.download(filename, res)
})
} }
} }
} }
...@@ -216,4 +459,9 @@ export default { ...@@ -216,4 +459,9 @@ export default {
.el-form-item { .el-form-item {
width: 100%; width: 100%;
} }
.conf {
margin-top: 10px;
width: 30%;
}
</style> </style>
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container" style="padding-bottom:20px"> <div class="filter-container" style="padding-bottom:20px">
<el-input v-model="listQuery.channelOrderNumber" placeholder="订单号" clearable style="width: 200px;" class="filter-item" @keyup.enter.native="getOrders"/> <el-input
<el-input v-model="listQuery.channelId" placeholder="渠道号" clearable style="width: 200px;" class="filter-item" @keyup.enter.native="getOrders"/> v-model="listQuery.channelOrderNumber"
<el-input v-if="isShow" v-model="listQuery.loanId" placeholder="loanId" clearable style="width: 200px;" class="filter-item" @keyup.enter.native="getOrders"/> placeholder="订单号"
<el-input v-if="isShow" v-model="listQuery.applyNo" placeholder="授信申请号" clearable style="width: 200px;" class="filter-item" @keyup.enter.native="getOrders"/> clearable
style="width: 200px;"
class="filter-item"
@keyup.enter.native="getOrders"
/>
<el-input
v-model="listQuery.channelId"
placeholder="渠道号"
clearable
style="width: 200px;"
class="filter-item"
@keyup.enter.native="getOrders"
/>
<el-input
v-if="isShow"
v-model="listQuery.loanId"
placeholder="loanId"
clearable
style="width: 200px;"
class="filter-item"
@keyup.enter.native="getOrders"
/>
<el-input
v-if="isShow"
v-model="listQuery.applyNo"
placeholder="授信申请号"
clearable
style="width: 200px;"
class="filter-item"
@keyup.enter.native="getOrders"
/>
<!-- <el-select v-model="listQuery.channelId" placeholder="渠道号" clearable style="width: 200px" class="filter-item" > <!-- <el-select v-model="listQuery.channelId" placeholder="渠道号" clearable style="width: 200px" class="filter-item" >
<el-option v-for="item in channelOptions" :key="item.key" :label="item.display_name" :value="item.key"/> <el-option v-for="item in channelOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select> --> </el-select>-->
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getOrders">查询</el-button> <el-button class="filter-item" type="primary" icon="el-icon-search" @click="getOrders">查询</el-button>
</div> </div>
...@@ -19,27 +49,37 @@ ...@@ -19,27 +49,37 @@
size="medium" size="medium"
fit fit
highlight-current-row highlight-current-row
@current-change="handleCurrentChange"> @current-change="handleCurrentChange"
>
<el-table-column label="ID" type="index" align="center" width="65"/> <el-table-column label="ID" type="index" align="center" width="65" />
<el-table-column sortable label="订单号" prop="channelOrderNumber" align="center"/> <el-table-column sortable label="订单号" prop="channelOrderNumber" align="center" />
<el-table-column label="渠道号" width="100" prop="channelId" align="center"/> <el-table-column label="渠道号" width="100" prop="channelId" align="center" />
<el-table-column v-if="isShow" label="loanId" width="120" prop="loanId" align="center"/> <el-table-column v-if="isShow" label="loanId" width="120" prop="loanId" align="center" />
<el-table-column v-if="isShow" label="授信申请号" prop="applyNo" align="center"/> <el-table-column v-if="isShow" label="授信申请号" prop="applyNo" align="center" />
<el-table-column label="创建时间" width="180" prop="createdAt" align="center"/> <el-table-column label="创建时间" width="180" prop="createdAt" align="center" />
<el-table-column label="订单状态" width="180" prop="status" align="center"/> <el-table-column label="订单状态" width="180" prop="status" align="center" />
<el-table-column label="操作" align="center" > <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-for="item in scope.row.opt" :key="item.action" size="mini" @click="handleOption(scope.row,item)">{{ item.name }}</el-button> <el-button
v-for="item in scope.row.opt"
:key="item.action"
size="mini"
@click="handleOption(scope.row,item)"
>{{ item.name }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="count>0" :total="count" :page.sync="page" :limit.sync="listQuery.pageSize" @pagination="getOrders" /> <pagination
v-show="count>0"
<el-card class="box-card" > :total="count"
:page.sync="page"
:limit.sync="listQuery.pageSize"
@pagination="getOrders"
/>
<el-card class="box-card">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="订单状态" name="orderHistory"> <el-tab-pane label="订单状态" name="orderHistory">
<el-table <el-table
...@@ -47,43 +87,34 @@ ...@@ -47,43 +87,34 @@
:data="orderHistory" :data="orderHistory"
fit fit
highlight-current-row highlight-current-row
style="margin-bottom:20px"> style="margin-bottom:20px"
>
<el-table-column label="订单状态" prop="status" align="center"/> <el-table-column label="订单状态" prop="status" align="center" />
<el-table-column label="创建时间" prop="updateTime" align="center"/> <el-table-column label="创建时间" prop="updateTime" align="center" />
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="通知记录" name="callbackRecords"> <el-tab-pane label="通知记录" name="callbackRecords">
<el-table <el-table :data="callbackRecords" fit highlight-current-row style="margin-bottom:20px">
:data="callbackRecords" <el-table-column label="订单号" prop="channelOrderNo" align="center" />
fit <el-table-column label="期数" prop="termNo" align="center" />
highlight-current-row <el-table-column label="通知类型" prop="noticeType" align="center" />
style="margin-bottom:20px"> <el-table-column label="状态枚举值" prop="callbackStatus" align="center" />
<el-table-column label="重试次数" prop="retryTimes" align="center" />
<el-table-column label="订单号" prop="channelOrderNo" align="center"/> <el-table-column label="失败原因" prop="failCode" align="center" />
<el-table-column label="期数" prop="termNo" align="center"/>
<el-table-column label="通知类型" prop="noticeType" align="center"/>
<el-table-column label="状态枚举值" prop="callbackStatus" align="center"/>
<el-table-column label="重试次数" prop="retryTimes" align="center"/>
<el-table-column label="失败原因" prop="failCode" align="center"/>
<el-table-column label="是否活跃" prop="isActive" align="center"> <el-table-column label="是否活跃" prop="isActive" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag >{{ scope.row.isActive | activeFilter }}</el-tag> <el-tag>{{ scope.row.isActive | activeFilter }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="其他数据" align="center">
label="其他数据"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.exdata"/> <el-input v-model="scope.row.exdata" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="通知结果" prop="tableName" align="center"/> <el-table-column label="通知结果" prop="tableName" align="center" />
<el-table-column label="创建时间" prop="createdAt" align="center"/> <el-table-column label="创建时间" prop="createdAt" align="center" />
<el-table-column label="修改时间" prop="updatedAt" align="center"/> <el-table-column label="修改时间" prop="updatedAt" align="center" />
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
...@@ -93,97 +124,100 @@ ...@@ -93,97 +124,100 @@
:data="repaymentPlan" :data="repaymentPlan"
fit fit
highlight-current-row highlight-current-row
style="margin-bottom:20px"> style="margin-bottom:20px"
>
<el-table-column label="期数" prop="periodNo" align="center"/> <el-table-column label="期数" prop="periodNo" align="center" />
<el-table-column label="还款状态" prop="repaymentStatus" align="center"/> <el-table-column label="还款状态" prop="repaymentStatus" align="center" />
<el-table-column label="应还本金" prop="principal" align="center"/> <el-table-column label="应还本金" prop="principal" align="center" />
<el-table-column label="应还利息" prop="interest" align="center"/> <el-table-column label="应还利息" prop="interest" align="center" />
<el-table-column label="逾期利息" prop="overdueInterest" align="center"/> <el-table-column label="逾期利息" prop="overdueInterest" align="center" />
<el-table-column label="服务费" prop="serviceFee" align="center"/> <el-table-column label="服务费" prop="serviceFee" align="center" />
<el-table-column label="其他费用" prop="otherFee" align="center"/> <el-table-column label="其他费用" prop="otherFee" align="center" />
<el-table-column label="当期到期日" align="center"> <el-table-column label="当期到期日" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span >{{ scope.row.dueTime | formatDate }}</span> <span>{{ scope.row.dueTime | formatDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实还本金" prop="actPrincipal" align="center"/> <el-table-column label="实还本金" prop="actPrincipal" align="center" />
<el-table-column label="实还利息" prop="actInterest" align="center"/> <el-table-column label="实还利息" prop="actInterest" align="center" />
<el-table-column label="实还服务费" prop="actServiceFee" align="center"/> <el-table-column label="实还服务费" prop="actServiceFee" align="center" />
<el-table-column label="实还逾期利息" prop="actOverdueInterest" align="center"/> <el-table-column label="实还逾期利息" prop="actOverdueInterest" align="center" />
<el-table-column label="实还其他费用" prop="actOtherFee" align="center"/> <el-table-column label="实还其他费用" prop="actOtherFee" align="center" />
<el-table-column label="应还总额" prop="requiredRepayment" align="center"/> <el-table-column label="应还总额" prop="requiredRepayment" align="center" />
<el-table-column label="实还总额" prop="repayAmount" align="center"/> <el-table-column label="实还总额" prop="repayAmount" align="center" />
<el-table-column label="发起还款时间" align="center"> <el-table-column label="发起还款时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span >{{ scope.row.repayTime | formatDate }}</span> <span>{{ scope.row.repayTime | formatDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="操作日志" name="logHistory"> <el-tab-pane label="操作日志" name="logHistory">
<el-table <el-table :data="logHistory" fit highlight-current-row style="margin-bottom:20px">
:data="logHistory" <el-table-column label="订单号" prop="channelOrderNumber" align="center" />
fit <el-table-column label="操作" prop="optName" align="center" />
highlight-current-row <el-table-column label="操作员" prop="optUser" align="center" />
style="margin-bottom:20px"> <el-table-column label="日志详细" prop="optLogDetail" align="center" />
<el-table-column label="订单号" prop="channelOrderNumber" align="center"/>
<el-table-column label="操作" prop="optName" align="center"/>
<el-table-column label="操作员" prop="optUser" align="center"/>
<el-table-column label="日志详细" prop="optLogDetail" align="center"/>
<el-table-column label="操作结果" prop="optResult" align="center"> <el-table-column label="操作结果" prop="optResult" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag >{{ scope.row.optResult | statusFilter }}</el-tag> <el-tag>{{ scope.row.optResult | statusFilter }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="createTime" align="center"/> <el-table-column label="创建时间" prop="createTime" align="center" />
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-card> </el-card>
<el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible"> <el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible">
<el-form :model="approveData" label-position="left" label-width="80px" style="margin-left:40px;"> <el-form
:model="approveData"
label-position="left"
label-width="80px"
style="margin-left:40px;"
>
<!-- <el-form-item label="审核结果" > <!-- <el-form-item label="审核结果" >
<el-select v-model="approveData.isPass" placeholder="Please select"> <el-select v-model="approveData.isPass" placeholder="Please select">
<el-option v-for="item in passOptions" :key="item.key" :label="item.display_name" :value="item.key"/> <el-option v-for="item in passOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select> </el-select>
</el-form-item> --> </el-form-item>-->
<el-form-item label="资金类型" > <el-form-item label="资金类型">
<el-select v-model="approveData.fundType" placeholder="Please select"> <el-select v-model="approveData.fundType" placeholder="Please select">
<el-option v-for="item in typeOptions" :key="item.key" :label="item.display_name" :value="item.key"/> <el-option
v-for="item in typeOptions"
:key="item.key"
:label="item.display_name"
:value="item.key"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="审核额度" style="width:50%"> <el-form-item label="审核额度" style="width:50%">
<el-input v-model="approveData.amount"/> <el-input v-model="approveData.amount" />
</el-form-item> </el-form-item>
<el-form-item label="审核期数" style="width:50%"> <el-form-item label="审核期数" style="width:50%">
<el-input v-model="approveData.period"/> <el-input v-model="approveData.period" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="handleApprove(false)">审核拒绝</el-button> <el-button @click="handleApprove(false)">审核拒绝</el-button>
<el-button :disabled="!(approveData.amount && approveData.period)" type="primary" @click="handleApprove(true)">审核通过</el-button> <el-button
:disabled="!(approveData.amount && approveData.period)"
type="primary"
@click="handleApprove(true)"
>审核通过</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogDeleteVisible" :data="order" title="Cancel"> <el-dialog :visible.sync="dialogDeleteVisible" :data="order" title="Cancel">
<span > <span>确定要 {{ opt }} {{ order.channelOrderNumber }} 吗?</span>
确定要 {{ opt }} {{ order.channelOrderNumber }} 吗?
</span>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogDeleteVisible = false">取消</el-button> <el-button @click="dialogDeleteVisible = false">取消</el-button>
<el-button type="primary" @click="cancelLoan()">确定</el-button> <el-button type="primary" @click="cancelLoan()">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -277,17 +311,18 @@ export default { ...@@ -277,17 +311,18 @@ export default {
} }
} }
this.listQuery.pageNumber = this.page - 1 this.listQuery.pageNumber = this.page - 1
getOrders(this.listQuery).then(res => { getOrders(this.listQuery)
this.orders = res.data.content .then((res) => {
this.count = res.data.totalElements this.orders = res.data.content
this.$refs.myTable.setCurrentRow(this.orders[0]) this.count = res.data.totalElements
this.$refs.myTable.setCurrentRow(this.orders[0])
// for test
// for (const o in this.orders) { // for test
// this.orders[o].opt = o % 2 === 0 ? [{ action: 'audit', name: '审核' }, { action: 'loan', name: '放款' }] : [{ action: 'audit', name: '审核' }] // for (const o in this.orders) {
// } // this.orders[o].opt = o % 2 === 0 ? [{ action: 'audit', name: '审核' }, { action: 'loan', name: '放款' }] : [{ action: 'audit', name: '审核' }]
}).catch(() => { // }
}) })
.catch(() => {})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -331,22 +366,24 @@ export default { ...@@ -331,22 +366,24 @@ export default {
} }
if (opt.action === 'second_audit') { if (opt.action === 'second_audit') {
secondAudit({ channelOrderNumber: this.order.channelOrderNumber }).then((res) => { secondAudit({ channelOrderNumber: this.order.channelOrderNumber }).then(
if (res.data) { (res) => {
this.$notify({ if (res.data) {
message: res.message, this.$notify({
type: 'success', message: res.message,
duration: 2000 type: 'success',
}) duration: 2000
} else { })
this.$notify({ } else {
message: res.message, this.$notify({
type: 'error', message: res.message,
duration: 2000 type: 'error',
}) duration: 2000
})
}
this.getOrders()
} }
this.getOrders() )
})
} }
}, },
...@@ -368,19 +405,23 @@ export default { ...@@ -368,19 +405,23 @@ export default {
cancelLoan() { cancelLoan() {
if (this.opt === '贷前关单') { if (this.opt === '贷前关单') {
cancelLoan({ channelOrderNumber: this.order.channelOrderNumber }).then((res) => { cancelLoan({ channelOrderNumber: this.order.channelOrderNumber }).then(
this.$notify({ (res) => {
message: res.message, this.$notify({
type: 'success', message: res.message,
duration: 2000 type: 'success',
}) duration: 2000
this.dialogDeleteVisible = false })
this.getOrders() this.dialogDeleteVisible = false
}) this.getOrders()
}
)
} }
if (this.opt === '贷后关单') { if (this.opt === '贷后关单') {
cancelLoanAfter({ channelOrderNumber: this.order.channelOrderNumber }).then((res) => { cancelLoanAfter({
channelOrderNumber: this.order.channelOrderNumber
}).then((res) => {
this.$notify({ this.$notify({
message: res.message, message: res.message,
type: 'success', type: 'success',
...@@ -395,45 +436,56 @@ export default { ...@@ -395,45 +436,56 @@ export default {
handleApprove(data) { handleApprove(data) {
this.approveData.channelOrderNumber = this.order.channelOrderNumber this.approveData.channelOrderNumber = this.order.channelOrderNumber
this.approveData.isPass = data this.approveData.isPass = data
approve(this.approveData).then(res => { approve(this.approveData)
if (res.data) { .then((res) => {
this.$notify({ if (res.data) {
message: res.message, this.$notify({
type: 'success', message: res.message,
duration: 5000 type: 'success',
}) duration: 5000
} else { })
this.$notify({ } else {
message: res.message, this.$notify({
type: 'error', message: res.message,
duration: 5000 type: 'error',
}) duration: 5000
} })
this.getOrders() }
}).catch(() => { this.getOrders()
}) })
.catch(() => {})
this.dialogFormVisible = false this.dialogFormVisible = false
}, },
handleClick() { handleClick() {
if (this.order.channelOrderNumber) { if (this.order.channelOrderNumber) {
if (this.activeName === 'orderHistory') { if (this.activeName === 'orderHistory') {
getOrderHistory({ channelOrderNumber: this.order.channelOrderNumber }).then(res => { getOrderHistory({
channelOrderNumber: this.order.channelOrderNumber
}).then((res) => {
this.orderHistory = res.data.historyStatus this.orderHistory = res.data.historyStatus
}) })
} }
if (this.activeName === 'callbackRecords') { if (this.activeName === 'callbackRecords') {
callbackRecord({ channelOrderNumber: this.order.channelOrderNumber }).then(res => { callbackRecord({
channelOrderNumber: this.order.channelOrderNumber
}).then((res) => {
this.callbackRecords = res.data this.callbackRecords = res.data
}) })
} }
if (this.activeName === 'repaymentPlan') { if (this.activeName === 'repaymentPlan') {
repaymentPlan({ channelOrderNumber: this.order.channelOrderNumber, loanId: this.order.loanId }).then(res => { this.repaymentPlan = []
repaymentPlan({
channelOrderNumber: this.order.channelOrderNumber,
loanId: this.order.loanId
}).then((res) => {
this.repaymentPlan = res.data.repaymentPlans this.repaymentPlan = res.data.repaymentPlans
}) })
} }
if (this.activeName === 'logHistory') { if (this.activeName === 'logHistory') {
logHistory({ channelOrderNumber: this.order.channelOrderNumber }).then(res => { logHistory({
channelOrderNumber: this.order.channelOrderNumber
}).then((res) => {
this.logHistory = res.data this.logHistory = res.data
}) })
} }
...@@ -444,5 +496,7 @@ export default { ...@@ -444,5 +496,7 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.el-tooltip__popper{max-width:80%} .el-tooltip__popper {
max-width: 80%;
}
</style> </style>
<template>
<div>
<!-- 头部搜索区域 -->
<div class="filter-container">
<el-input v-model="queryInfo.phoneNo" placeholder="手机号" style="width: 200px;" />
<el-input v-model="queryInfo.channelOrderNo" placeholder="订单号" style="width: 200px;" />
<el-button type="primary" icon="el-icon-search" @click="searchInfo">查询</el-button>
</div>
<!-- 用户基本信息 -->
<p style="margin-left: 20px; font-size: 20px">用户基本信息</p>
<div class="basic-info">
<div class="box">
<el-form label-position="left" label-width="80px">
<el-form-item label="姓名:">
<el-input v-model="userInfo.name" disabled size="medium" />
</el-form-item>
<el-form-item label="身份证:">
<el-input v-model="userInfo.idNo" disabled size="medium" />
</el-form-item>
<el-form-item label="手机号:">
<el-input v-model="userInfo.phoneNo" disabled size="medium" />
</el-form-item>
<el-form-item label="userId:">
<el-input v-model="userInfo.userId" disabled size="medium" />
</el-form-item>
<el-form-item label="uuid:">
<el-input v-model="userInfo.uuid" disabled size="medium" />
</el-form-item>
<el-form-item label="是否启用:">
<el-input v-model="userInfo.enable" disabled size="medium" />
</el-form-item>
</el-form>
</div>
<div class="box">
<el-form label-position="left" label-width="80px">
<el-form-item label="email:">
<el-input v-model="userInfo.email" disabled size="medium" />
</el-form-item>
<el-form-item label="职业:">
<el-input v-model="userInfo.occupation" disabled size="medium" />
</el-form-item>
<el-form-item label="学历:">
<el-input v-model="userInfo.education" disabled size="medium" />
</el-form-item>
<el-form-item label="收入类型:">
<el-input v-model="userInfo.income" disabled size="medium" />
</el-form-item>
<el-form-item label="收入范围:">
<el-input v-model="userInfo.incomeRange" disabled size="medium" />
</el-form-item>
<el-form-item label="地址:">
<el-input v-model="userInfo.address" disabled size="medium" />
</el-form-item>
</el-form>
</div>
<div class="box">
<el-form label-position="left" label-width="100px">
<el-form-item label="联系人1:">
<el-input v-model="userInfo.contactNameA" disabled size="medium" />
</el-form-item>
<el-form-item label="联系人2:">
<el-input v-model="userInfo.contactNameB" disabled size="medium" />
</el-form-item>
<el-form-item label="婚姻状态:">
<el-input v-model="userInfo.marryStatus" disabled size="medium" />
</el-form-item>
<el-form-item label="是否有车:">
<el-input v-model="userInfo.hasCar" disabled size="medium" />
</el-form-item>
<el-form-item label="是否有房:">
<el-input v-model="userInfo.hasHouse" disabled size="medium" />
</el-form-item>
<el-form-item label="是否有信用卡:">
<el-input v-model="userInfo.hasCreditCard" disabled size="medium" />
</el-form-item>
</el-form>
</div>
</div>
<!-- 用户ocr信息区域 -->
<!-- <p style="margin-left: 20px; font-size: 20px">风控场景数据</p> -->
<div v-show="userInfo.riskInfoList != null" class="wind-control">
<p style="margin-left: 20px; font-size: 20px">风控场景数据</p>
<div class="image-area">
<div class="box">
<el-image :src="src" />
</div>
<div class="box">
<el-image :src="src" />
</div>
</div>
<div class="living-body">
<p>活体类型:{{ livingType }}</p>
<p>活体信息:{{ livingInfo }}</p>
</div>
<div class="extra-info">
其他信息:
<el-input v-model="textarea2" type="textarea" placeholder="请输入内容" />
</div>
</div>
</div>
</template>
<script>
import { getCustomerApplyInfo } from '@/api/search'
export default {
data() {
return {
queryInfo: {
phoneNo: '',
channelOrderNo: ''
},
userInfo: {
name: '',
idNo: '',
phoneNo: '',
userId: '',
uuid: '',
enable: '',
email: '',
occupation: '',
education: '',
income: '',
incomeRange: '',
address: '',
contactNameA: '',
contactNameB: '',
marryStatus: '',
hasCar: '',
hasHouse: '',
hasCreditCard: ''
},
idCardFront: '',
idCardBack: '',
livingType: '',
livingInfo: ''
}
},
methods: {
searchInfo() {
if (this.queryInfo.phoneNo === '' && this.queryInfo.channelOrderNo === '') {
return this.$message.error('手机号和订单号不能同时为空!')
}
getCustomerApplyInfo(this.queryInfo).then((res) => {
console.log(res)
this.userInfo = res.data
})
}
}
}
</script>
<style lang="scss" scoped>
.filter-container {
margin: 20px;
}
.el-input {
width: 280px !important;
padding: 0 !important;
}
.basic-info {
border: 0.5px solid rgba(213, 216, 219, 0.4);
padding: 20px 10px;
display: flex;
margin: 20px;
.box {
flex: 1;
}
}
.image-area {
display: flex;
margin: 0 40px;
.box {
flex: 1;
padding: 20px 100px;
}
}
.wind-control {
border: 0.5px solid rgba(213, 216, 219, 0.4);
padding: 20px 10px;
margin: 20px;
}
.living-body {
display: flex;
margin: 0 40px;
p {
flex: 1;
margin: 20px 20px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment